]> git.mjollnir.org Git - moodle.git/commitdiff
use PARAM_ALPHANUM on "section" parameter so that "section=all" is allowed
authorgbateson <gbateson>
Tue, 22 May 2007 04:28:27 +0000 (04:28 +0000)
committergbateson <gbateson>
Tue, 22 May 2007 04:28:27 +0000 (04:28 +0000)
mod/hotpot/index.php

index 35eb2e01b59b2117d268ec40f324b41b11b4a878..c50c0c07b636e5778991548042ddc42f1f69ba6f 100644 (file)
     $next_url = "$CFG->wwwroot/course/view.php?id=$course->id";
 
     // get display section, if any
-    $section = optional_param('section', 0, PARAM_INT);
+    $section = optional_param('section', 0, PARAM_ALPHANUM);
+    if ($section=='all') {
+        // do nothing
+    } else {
+        $section = intval($section);
+    }
     if ($section) {
         $displaysection = course_set_display($course->id, $section);
     } else {