mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
on line #277, return null instead of throwing an error
This commit is contained in:
parent
ecb00e05e2
commit
9959aab238
@ -274,7 +274,7 @@ function lesson_grades($lessonid) {
|
||||
global $CFG;
|
||||
|
||||
if (!$lesson = get_record("lesson", "id", $lessonid)) {
|
||||
error("Lesson record not found");
|
||||
return NULL;
|
||||
}
|
||||
if ($lesson->usemaxgrade) {
|
||||
$grades = get_records_sql_menu("SELECT userid,MAX(grade) FROM {$CFG->prefix}lesson_grades WHERE
|
||||
|
Loading…
x
Reference in New Issue
Block a user