Merge branch 'MDL-56754-master' of git://github.com/jleyva/moodle

This commit is contained in:
Andrew Nicols
2016-11-10 08:29:04 +08:00
3 changed files with 6 additions and 1 deletions
+4
View File
@@ -160,6 +160,7 @@ class core_course_external extends external_api {
//retrieve sections
$modinfo = get_fast_modinfo($course);
$sections = $modinfo->get_section_info_all();
$coursenumsections = course_get_format($course)->get_course()->numsections;
//for each sections (first displayed to last displayed)
$modinfosections = $modinfo->get_sections();
@@ -201,6 +202,7 @@ class core_course_external extends external_api {
external_format_text($section->summary, $section->summaryformat,
$context->id, 'course', 'section', $section->id, $options);
$sectionvalues['section'] = $section->section;
$sectionvalues['hiddenbynumsections'] = $section->section > $coursenumsections ? 1 : 0;
$sectioncontents = array();
//for each module of the section
@@ -329,6 +331,8 @@ class core_course_external extends external_api {
'summary' => new external_value(PARAM_RAW, 'Section description'),
'summaryformat' => new external_format_value('summary'),
'section' => new external_value(PARAM_INT, 'Section number inside the course', VALUE_OPTIONAL),
'hiddenbynumsections' => new external_value(PARAM_INT, 'Whether is a section hidden in the course format',
VALUE_OPTIONAL),
'modules' => new external_multiple_structure(
new external_single_structure(
array(
+1
View File
@@ -4,6 +4,7 @@ information provided here is intended especially for developers.
=== 3.2 ===
* External function core_course_external::get_course_contents now returns the section's number in the course (new section field).
* External function core_course_external::get_course_contents now returns if a section is hidden in the course format.
* External functions that were returning file information now return the following file fields:
filename, filepath, mimetype, filesize, timemodified and fileurl.
Those fields are now marked as VALUE_OPTIONAL for backwards compatibility.
+1 -1
View File
@@ -29,7 +29,7 @@
defined('MOODLE_INTERNAL') || die();
$version = 2016110801.02; // YYYYMMDD = weekly release date of this DEV branch.
$version = 2016111000.00; // YYYYMMDD = weekly release date of this DEV branch.
// RR = release increments - 00 in DEV branches.
// .XX = incremental changes.