diff --git a/course/externallib.php b/course/externallib.php index 999f71adaea..32214693cbe 100644 --- a/course/externallib.php +++ b/course/externallib.php @@ -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( diff --git a/course/upgrade.txt b/course/upgrade.txt index b9309b15b7a..047e0be2083 100644 --- a/course/upgrade.txt +++ b/course/upgrade.txt @@ -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. diff --git a/version.php b/version.php index 24a6eac8fee..674abc884a5 100644 --- a/version.php +++ b/version.php @@ -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.