]> git.mjollnir.org Git - moodle.git/commitdiff
Quiz module sometimes left the user staring at a blank page. Now there is an error...
authortjhunt <tjhunt>
Tue, 13 Jun 2006 18:59:41 +0000 (18:59 +0000)
committertjhunt <tjhunt>
Tue, 13 Jun 2006 18:59:41 +0000 (18:59 +0000)
mod/quiz/edit.php

index 0923693b2929335c9ed7e2dc2e3e198dce5af38c..564da591bc8a5eb85c08db68e7f0cdd361c5a1bb 100644 (file)
         if (isset($SESSION->modform)) {
             $modform = $SESSION->modform;
         } else {
-            exit;
+            error('cmunknown');
         }
     } else {
         // we might get here after editing a question in
         // a popup window. So close window automatically.
+        // 
+        // But we certainly should not be doing this before
+        // print_header, since it throws browsers into quirks mode.
+        // Unfortunately there is no easy fix. Bug #5811 covers this. 
 ?>
 <script type="text/javascript">
 <!--
@@ -88,7 +92,7 @@ if (self.name == 'editquestion') {
         if (isset($SESSION->modform)) {
             $modform = $SESSION->modform;
         } else {
-            exit;
+            print_error('cmunknown');
         }
     }