quiz MDL-24760 recent fix quiz preview/review by teacher.
authorTim Hunt <T.J.Hunt@open.ac.uk>
Fri, 22 Oct 2010 17:24:09 +0000 (17:24 +0000)
committerTim Hunt <T.J.Hunt@open.ac.uk>
Fri, 22 Oct 2010 17:24:09 +0000 (17:24 +0000)
mod/quiz/attemptlib.php

index 6970058..b830ca2 100644 (file)
@@ -813,8 +813,11 @@ class quiz_attempt extends quiz {
         } else {
             $options = $this->get_render_options($id);
         }
+        if ($thispageurl instanceof moodle_url) {
+            $thispageurl = $thispageurl->out(false);
+        }
         if ($thispageurl) {
-            $this->quiz->thispageurl = str_replace($CFG->wwwroot, '', $thispageurl->out(false));
+            $this->quiz->thispageurl = str_replace($CFG->wwwroot, '', $thispageurl);
         } else {
             unset($thispageurl);
         }