Merge branch 'MOODLE_38_MDL-67540' of https://github.com/golenkovm/moodle into MOODLE_38_STABLE
This commit is contained in:
@@ -2152,14 +2152,14 @@ function quiz_add_quiz_question($questionid, $quiz, $page = 0, $maxmark = null)
|
||||
);
|
||||
}
|
||||
|
||||
$trans = $DB->start_delegated_transaction();
|
||||
$slots = $DB->get_records('quiz_slots', array('quizid' => $quiz->id),
|
||||
'slot', 'questionid, slot, page, id');
|
||||
if (array_key_exists($questionid, $slots)) {
|
||||
$trans->allow_commit();
|
||||
return false;
|
||||
}
|
||||
|
||||
$trans = $DB->start_delegated_transaction();
|
||||
|
||||
$maxpage = 1;
|
||||
$numonlastpage = 0;
|
||||
foreach ($slots as $slot) {
|
||||
|
||||
Reference in New Issue
Block a user