]> git.mjollnir.org Git - moodle.git/commitdiff
Fix toyomoyo's syntax errors.
authortjhunt <tjhunt>
Tue, 22 Aug 2006 13:12:24 +0000 (13:12 +0000)
committertjhunt <tjhunt>
Tue, 22 Aug 2006 13:12:24 +0000 (13:12 +0000)
mod/quiz/attempt.php

index 34409901b6d5442a528efe04f9c67d2ad3855048..46f29dbd26d5a826127d8411aec53829797ba90c 100644 (file)
@@ -62,8 +62,8 @@
     $coursecontext = get_context_instance(CONTEXT_COURSE, $id); // course context
     $context = get_context_instance(CONTEXT_MODULE, $cm->id);
     // if no questions have been set up yet redirect to edit.php
-    if (!$quiz->questions and has_capability('mod/quiz:manage', $context) {
-        redirect('edit.php?quizid='.$quiz->id);
+    if (!$quiz->questions and has_capability('mod/quiz:manage', $context)) {
+        redirect('edit.php?quizid=' . $quiz->id);
     }
 
 // Get number for the next or unfinished attempt
     if (!$attempt) {
         // Check if this is a preview request from a teacher
         // in which case the previous previews should be deleted
-        if (has_capability('mod/quiz:preview', $context) {
+        if (has_capability('mod/quiz:preview', $context)) {
             if ($oldattempts = get_records_select('quiz_attempts', "quiz = '$quiz->id'
              AND userid = '$USER->id'")) {
                 delete_records('quiz_attempts', 'quiz', $quiz->id, 'userid', $USER->id);