use PARAM_ALPHANUM on "section" parameter so that "section=all" is allowed

This commit is contained in:
gbateson
2007-05-22 04:27:55 +00:00
parent 844aed0573
commit b72135d360
+6 -1
View File
@@ -45,7 +45,12 @@
$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 {