mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
MDL-13978 - Notice when adding a new quiz
This commit is contained in:
parent
aceb739d2c
commit
d45459b7c1
1 changed files with 18 additions and 16 deletions
|
@ -378,6 +378,7 @@ function quiz_grade_item_update($quiz, $grades=NULL) {
|
|||
}
|
||||
|
||||
$gradebook_grades = grade_get_grades($quiz->course, 'mod', 'quiz', $quiz->id);
|
||||
if (!empty($gradebook_grades->items)) {
|
||||
$grade_item = $gradebook_grades->items[0];
|
||||
if ($grade_item->locked) {
|
||||
$confirm_regrade = optional_param('confirm_regrade', 0, PARAM_INT);
|
||||
|
@ -396,6 +397,7 @@ function quiz_grade_item_update($quiz, $grades=NULL) {
|
|||
return GRADE_UPDATE_ITEM_LOCKED;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return grade_update('mod/quiz', $quiz->course, 'mod', 'quiz', $quiz->id, 0, $grades, $params);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue