Permalink
Browse files

MDL-34905 quiz: missing global $DB;

This code normally only runs when JS is disabled, which is why this was
not noticed before.
  • Loading branch information...
1 parent e6aac11 commit 2a077c0d1b1952cf1466c1585de4ab69bd3daf8b @timhunt timhunt committed Aug 15, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 mod/quiz/attemptlib.php
@@ -1335,6 +1335,8 @@ public function process_submitted_actions($timestamp, $becomingoverdue = false)
* flagged state was changed in the request.
*/
public function save_question_flags() {
+ global $DB;
+
$transaction = $DB->start_delegated_transaction();
$this->quba->update_question_flags();
question_engine::save_questions_usage_by_activity($this->quba);

0 comments on commit 2a077c0

Please sign in to comment.