mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Merge branch 'MDL-69809' of https://github.com/paulholden/moodle
This commit is contained in:
commit
e988d9ec4d
@ -197,6 +197,7 @@ class mod_folder_external extends external_api {
|
||||
'display' => new external_value(PARAM_INT, 'Display type of folder contents on a separate page or inline'),
|
||||
'showexpanded' => new external_value(PARAM_INT, '1 = expanded, 0 = collapsed for sub-folders'),
|
||||
'showdownloadfolder' => new external_value(PARAM_INT, 'Whether to show the download folder button'),
|
||||
'forcedownload' => new external_value(PARAM_INT, 'Whether file download is forced'),
|
||||
'section' => new external_value(PARAM_INT, 'Course section id'),
|
||||
'visible' => new external_value(PARAM_INT, 'Module visibility'),
|
||||
'groupmode' => new external_value(PARAM_INT, 'Group mode'),
|
||||
|
@ -131,11 +131,13 @@ class mod_folder_external_testcase extends externallib_advanced_testcase {
|
||||
// First folder.
|
||||
$record = new stdClass();
|
||||
$record->course = $course1->id;
|
||||
$record->forcedownload = 1;
|
||||
$folder1 = self::getDataGenerator()->create_module('folder', $record);
|
||||
|
||||
// Second folder.
|
||||
$record = new stdClass();
|
||||
$record->course = $course2->id;
|
||||
$record->forcedownload = 0;
|
||||
$folder2 = self::getDataGenerator()->create_module('folder', $record);
|
||||
|
||||
// Execute real Moodle enrolment as we'll call unenrol() method on the instance later.
|
||||
@ -154,7 +156,7 @@ class mod_folder_external_testcase extends externallib_advanced_testcase {
|
||||
// Create what we expect to be returned when querying the two courses.
|
||||
$expectedfields = array('id', 'coursemodule', 'course', 'name', 'intro', 'introformat', 'introfiles', 'revision',
|
||||
'timemodified', 'display', 'showexpanded', 'showdownloadfolder', 'section', 'visible',
|
||||
'groupmode', 'groupingid');
|
||||
'forcedownload', 'groupmode', 'groupingid');
|
||||
|
||||
// Add expected coursemodule and data.
|
||||
$folder1->coursemodule = $folder1->cmid;
|
||||
|
Loading…
x
Reference in New Issue
Block a user