mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 04:22:07 +02:00
MDL-57890 ws: Return cmid in all get_by_courses WebServices
This commit is contained in:
parent
f99313477d
commit
16840c7126
@ -185,6 +185,7 @@ class mod_folder_external extends external_api {
|
||||
new external_single_structure(
|
||||
array(
|
||||
'id' => new external_value(PARAM_INT, 'Module id'),
|
||||
'coursemodule' => new external_value(PARAM_INT, 'Course module id'),
|
||||
'course' => new external_value(PARAM_INT, 'Course id'),
|
||||
'name' => new external_value(PARAM_RAW, 'Page name'),
|
||||
'intro' => new external_value(PARAM_RAW, 'Summary'),
|
||||
|
@ -152,8 +152,9 @@ class mod_folder_external_testcase extends externallib_advanced_testcase {
|
||||
$returndescription = mod_folder_external::get_folders_by_courses_returns();
|
||||
|
||||
// Create what we expect to be returned when querying the two courses.
|
||||
$expectedfields = array('id', 'course', 'name', 'intro', 'introformat', 'introfiles', 'revision', 'timemodified',
|
||||
'display', 'showexpanded', 'showdownloadfolder', 'section', 'visible', 'groupmode', 'groupingid');
|
||||
$expectedfields = array('id', 'coursemodule', 'course', 'name', 'intro', 'introformat', 'introfiles', 'revision',
|
||||
'timemodified', 'display', 'showexpanded', 'showdownloadfolder', 'section', 'visible',
|
||||
'groupmode', 'groupingid');
|
||||
|
||||
// Add expected coursemodule and data.
|
||||
$folder1->coursemodule = $folder1->cmid;
|
||||
|
@ -120,6 +120,7 @@ class mod_label_external extends external_api {
|
||||
new external_single_structure(
|
||||
array(
|
||||
'id' => new external_value(PARAM_INT, 'Module id'),
|
||||
'coursemodule' => new external_value(PARAM_INT, 'Course module id'),
|
||||
'course' => new external_value(PARAM_INT, 'Course id'),
|
||||
'name' => new external_value(PARAM_RAW, 'Label name'),
|
||||
'intro' => new external_value(PARAM_RAW, 'Label contents'),
|
||||
|
@ -82,8 +82,8 @@ class mod_label_external_testcase extends externallib_advanced_testcase {
|
||||
$returndescription = mod_label_external::get_labels_by_courses_returns();
|
||||
|
||||
// Create what we expect to be returned when querying the two courses.
|
||||
$expectedfields = array('id', 'course', 'name', 'intro', 'introformat', 'introfiles', 'timemodified', 'section',
|
||||
'visible', 'groupmode', 'groupingid');
|
||||
$expectedfields = array('id', 'coursemodule', 'course', 'name', 'intro', 'introformat', 'introfiles', 'timemodified',
|
||||
'section', 'visible', 'groupmode', 'groupingid');
|
||||
|
||||
// Add expected coursemodule and data.
|
||||
$label1->coursemodule = $label1->cmid;
|
||||
|
@ -189,6 +189,7 @@ class mod_page_external extends external_api {
|
||||
new external_single_structure(
|
||||
array(
|
||||
'id' => new external_value(PARAM_INT, 'Module id'),
|
||||
'coursemodule' => new external_value(PARAM_INT, 'Course module id'),
|
||||
'course' => new external_value(PARAM_INT, 'Course id'),
|
||||
'name' => new external_value(PARAM_RAW, 'Page name'),
|
||||
'intro' => new external_value(PARAM_RAW, 'Summary'),
|
||||
|
@ -152,7 +152,7 @@ class mod_page_external_testcase extends externallib_advanced_testcase {
|
||||
$returndescription = mod_page_external::get_pages_by_courses_returns();
|
||||
|
||||
// Create what we expect to be returned when querying the two courses.
|
||||
$expectedfields = array('id', 'course', 'name', 'intro', 'introformat', 'introfiles',
|
||||
$expectedfields = array('id', 'coursemodule', 'course', 'name', 'intro', 'introformat', 'introfiles',
|
||||
'content', 'contentformat', 'contentfiles', 'legacyfiles', 'legacyfileslast', 'display',
|
||||
'displayoptions', 'revision', 'timemodified', 'section', 'visible', 'groupmode', 'groupingid');
|
||||
|
||||
|
@ -186,6 +186,7 @@ class mod_resource_external extends external_api {
|
||||
new external_single_structure(
|
||||
array(
|
||||
'id' => new external_value(PARAM_INT, 'Module id'),
|
||||
'coursemodule' => new external_value(PARAM_INT, 'Course module id'),
|
||||
'course' => new external_value(PARAM_INT, 'Course id'),
|
||||
'name' => new external_value(PARAM_RAW, 'Page name'),
|
||||
'intro' => new external_value(PARAM_RAW, 'Summary'),
|
||||
|
@ -153,7 +153,7 @@ class mod_resource_external_testcase extends externallib_advanced_testcase {
|
||||
$returndescription = mod_resource_external::get_resources_by_courses_returns();
|
||||
|
||||
// Create what we expect to be returned when querying the two courses.
|
||||
$expectedfields = array('id', 'course', 'name', 'intro', 'introformat', 'introfiles',
|
||||
$expectedfields = array('id', 'coursemodule', 'course', 'name', 'intro', 'introformat', 'introfiles',
|
||||
'contentfiles', 'tobemigrated', 'legacyfiles', 'legacyfileslast', 'display', 'displayoptions',
|
||||
'filterfiles', 'revision', 'timemodified', 'section', 'visible', 'groupmode', 'groupingid');
|
||||
|
||||
|
@ -185,6 +185,7 @@ class mod_url_external extends external_api {
|
||||
new external_single_structure(
|
||||
array(
|
||||
'id' => new external_value(PARAM_INT, 'Module id'),
|
||||
'coursemodule' => new external_value(PARAM_INT, 'Course module id'),
|
||||
'course' => new external_value(PARAM_INT, 'Course id'),
|
||||
'name' => new external_value(PARAM_RAW, 'URL name'),
|
||||
'intro' => new external_value(PARAM_RAW, 'Summary'),
|
||||
|
@ -152,8 +152,9 @@ class mod_url_external_testcase extends externallib_advanced_testcase {
|
||||
$returndescription = mod_url_external::get_urls_by_courses_returns();
|
||||
|
||||
// Create what we expect to be returned when querying the two courses.
|
||||
$expectedfields = array('id', 'course', 'name', 'intro', 'introformat', 'introfiles', 'externalurl', 'display',
|
||||
'displayoptions', 'parameters', 'timemodified', 'section', 'visible', 'groupmode', 'groupingid');
|
||||
$expectedfields = array('id', 'coursemodule', 'course', 'name', 'intro', 'introformat', 'introfiles', 'externalurl',
|
||||
'display', 'displayoptions', 'parameters', 'timemodified', 'section', 'visible', 'groupmode',
|
||||
'groupingid');
|
||||
|
||||
// Add expected coursemodule and data.
|
||||
$url1->coursemodule = $url1->cmid;
|
||||
|
Loading…
x
Reference in New Issue
Block a user