]> git.mjollnir.org Git - moodle.git/commitdiff
fix for MDL-10835 Results and Preview Tabs broken - requred param 'cmid' missing...
authorjamiesensei <jamiesensei>
Tue, 14 Aug 2007 02:50:56 +0000 (02:50 +0000)
committerjamiesensei <jamiesensei>
Tue, 14 Aug 2007 02:50:56 +0000 (02:50 +0000)
mod/quiz/attempt.php
mod/quiz/report.php

index e50ec7712bc8d806c4d3dd1ae765fd7438f15b3f..3f1ae33448e225f7d96a51a8b6893a6f63ccd962 100644 (file)
@@ -62,7 +62,7 @@
 
     // 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);
+        redirect('edit.php?cmid='.$cm->id);
     }
 
     // Get number for the next or unfinished attempt
         $navlinks[] = array('name' => $strquizzes, 'link' => "index.php?id=$course->id", 'type' => 'activity');
         $navlinks[] = array('name' => format_string($quiz->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance');
         $navlinks[] = array('name' => $strattemptnum, 'link' => '', 'type' => 'title');
-        
+
         $navigation = build_navigation($navlinks);
-        
+
         print_header_simple(format_string($quiz->name), "", $navigation, "", $headtags, true, $strupdatemodule);
     }
 
index 4ffaa4dddd232eca4c1738f756829e85284b7278..fcb7f7daf2687965600dbbe980ff5f7baff12009 100644 (file)
 
     // 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);
+        redirect('edit.php?cmid='.$cm->id);
     }
 
-    // Upgrade any attempts that have not yet been upgraded to the 
+    // Upgrade any attempts that have not yet been upgraded to the
     // Moodle 1.5 model (they will not yet have the timestamp set)
     if ($attempts = get_records_sql("SELECT a.*".
            "  FROM {$CFG->prefix}quiz_attempts a, {$CFG->prefix}question_states s".