Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
33efee9
)
MDL-45933 Assign: Prevent fatal error when there are no users in the grading table
author
Damyon Wiese
<damyon@moodle.com>
Wed, 18 Jun 2014 07:17:02 +0000
(15:17 +0800)
committer
Damyon Wiese
<damyon@moodle.com>
Wed, 18 Jun 2014 07:17:02 +0000
(15:17 +0800)
mod/assign/locallib.php
patch
|
blob
|
blame
|
history
diff --git
a/mod/assign/locallib.php
b/mod/assign/locallib.php
index
9c323eb
..
42ad711
100644
(file)
--- a/
mod/assign/locallib.php
+++ b/
mod/assign/locallib.php
@@
-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;