]> git.mjollnir.org Git - moodle.git/commitdiff
question editing from quiz: MDL-20709 better return URL.
authorTim Hunt <T.J.Hunt@open.ac.uk>
Thu, 19 Nov 2009 19:09:04 +0000 (19:09 +0000)
committerTim Hunt <T.J.Hunt@open.ac.uk>
Thu, 19 Nov 2009 19:09:04 +0000 (19:09 +0000)
question/type/questiontype.php

index fe277f44b5e74e9145916e618870dab742b2569a..7157f97c0700b192c936f79b1947da9e668ec7dc 100644 (file)
@@ -1061,7 +1061,8 @@ class default_questiontype {
 
         if (!empty($cmoptions->thispageurl)) {
         /// The module allow editing in the same window, print an ordinary link.
-            return '<a href="' . $CFG->wwwroot . $linkurl . '&amp;returnurl=' . urlencode($cmoptions->thispageurl) .
+            return '<a href="' . $CFG->wwwroot . $linkurl . '&amp;returnurl=' .
+                    urlencode($cmoptions->thispageurl . '#q' . $question->id) .
                     '" title="' . $stredit . '">' . $linktext . '</a>';
         } else {
         /// We have to edit in a pop-up.