Skip to content
Snippets Groups Projects
Commit a3d589f3 authored by Chris Sangwin's avatar Chris Sangwin
Browse files

Code tidy.

parent 08e45ae6
No related branches found
No related tags found
No related merge requests found
...@@ -62,7 +62,8 @@ $question->apply_attempt_state($qa->get_step(0)); ...@@ -62,7 +62,8 @@ $question->apply_attempt_state($qa->get_step(0));
// We have a slight problem accessing the user connected to that attempt and // We have a slight problem accessing the user connected to that attempt and
// therefore this will only work with `quiz` type activities for now. // therefore this will only work with `quiz` type activities for now.
$params = [$qa->get_usage_id(), 'mod_quiz']; $params = [$qa->get_usage_id(), 'mod_quiz'];
$tmp = $DB->get_record_sql('SELECT qas.userid FROM {quiz_attempts} qas, {question_usages} qu WHERE qu.id = ? AND qu.component = ? AND qu.id = qas.uniqueid;', $params, IGNORE_MISSING); $tmp = $DB->get_record_sql('SELECT qas.userid FROM {quiz_attempts} qas, {question_usages} qu ' .
'WHERE qu.id = ? AND qu.component = ? AND qu.id = qas.uniqueid;', $params, IGNORE_MISSING);
$usageuser = -1; $usageuser = -1;
if ($tmp !== false) { if ($tmp !== false) {
$usageuser = $tmp->userid; $usageuser = $tmp->userid;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment