mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 17:02:03 +02:00
MDL-45933 Assign: Prevent fatal error when there are no users in the grading table
This commit is contained in:
parent
33efee99ff
commit
1165b7ded7
@ -4984,6 +4984,10 @@ class assign {
|
||||
$users[$userid] = $record;
|
||||
}
|
||||
|
||||
if (empty($users)) {
|
||||
return get_string('nousersselected', 'assign');
|
||||
}
|
||||
|
||||
list($userids, $params) = $DB->get_in_or_equal(array_keys($users), SQL_PARAMS_NAMED);
|
||||
$params['assignid1'] = $this->get_instance()->id;
|
||||
$params['assignid2'] = $this->get_instance()->id;
|
||||
|
Loading…
x
Reference in New Issue
Block a user