MDL-82385 course: Return new section fields in core_course_get_contents
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
issueNumber: MDL-82385
|
||||
notes:
|
||||
core_course:
|
||||
- message: >-
|
||||
The external function core_course::get_course_contents now returns the
|
||||
component and itemid of sections.
|
||||
type: changed
|
||||
@@ -212,6 +212,8 @@ class core_course_external extends external_api {
|
||||
if (!empty($section->availableinfo)) {
|
||||
$sectionvalues['availabilityinfo'] = \core_availability\info::format_info($section->availableinfo, $course);
|
||||
}
|
||||
$sectionvalues['component'] = $section->component;
|
||||
$sectionvalues['itemid'] = $section->itemid;
|
||||
|
||||
$sectioncontents = array();
|
||||
|
||||
@@ -447,6 +449,10 @@ class core_course_external extends external_api {
|
||||
VALUE_OPTIONAL),
|
||||
'uservisible' => new external_value(PARAM_BOOL, 'Is the section visible for the user?', VALUE_OPTIONAL),
|
||||
'availabilityinfo' => new external_value(PARAM_RAW, 'Availability information.', VALUE_OPTIONAL),
|
||||
'component' => new external_value(PARAM_COMPONENT, 'The delegate component of this section if any.',
|
||||
VALUE_OPTIONAL),
|
||||
'itemid' => new external_value(PARAM_INT,
|
||||
'The optional item id delegate component can use to identify its instance.', VALUE_OPTIONAL),
|
||||
'modules' => new external_multiple_structure(
|
||||
new external_single_structure(
|
||||
array(
|
||||
|
||||
Reference in New Issue
Block a user