Merge branch 'MDL-55284-31' of git://github.com/damyon/moodle into MOODLE_31_STABLE

This commit is contained in:
Dan Poltawski
2016-07-25 15:53:39 +01:00
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -2602,11 +2602,12 @@ class mod_assign_external extends external_api {
* @param string $filter search string to filter the results.
* @param int $skip Number of records to skip
* @param int $limit Maximum number of records to return
* @param bool $onlyids Only return user ids.
* @return array of warnings and status result
* @since Moodle 3.1
* @throws moodle_exception
*/
public static function list_participants($assignid, $groupid, $filter, $skip, $limit) {
public static function list_participants($assignid, $groupid, $filter, $skip, $limit, $onlyids) {
global $DB, $CFG;
require_once($CFG->dirroot . "/mod/assign/locallib.php");
require_once($CFG->dirroot . "/user/lib.php");
@@ -2617,7 +2618,8 @@ class mod_assign_external extends external_api {
'groupid' => $groupid,
'filter' => $filter,
'skip' => $skip,
'limit' => $limit
'limit' => $limit,
'onlyids' => $onlyids
));
$warnings = array();
+1 -1
View File
@@ -2294,7 +2294,7 @@ class mod_assign_external_testcase extends externallib_advanced_testcase {
$DB->update_record('user', $student);
$this->setUser($teacher);
$participants = mod_assign_external::list_participants($assignment->id, 0, '', 0, 0);
$participants = mod_assign_external::list_participants($assignment->id, 0, '', 0, 0, false);
$this->assertCount(1, $participants);
// Asser that we have a valid response data.