From: skodak Date: Sat, 3 Jun 2006 23:49:15 +0000 (+0000) Subject: Bug #5716 - Impossible to turn off highlighted current topic; merged from MOODLE_16_S... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=f4f0bc84cb1c1a54181f3e6a42091d9aa6ec2bad;p=moodle.git Bug #5716 - Impossible to turn off highlighted current topic; merged from MOODLE_16_STABLE --- diff --git a/course/format/lams/format.php b/course/format/lams/format.php index 680d0fa5b4..6e7a8523e4 100644 --- a/course/format/lams/format.php +++ b/course/format/lams/format.php @@ -30,7 +30,7 @@ if ($topic != -1) { } } -if (isteacher($course->id) and !empty($marker) and confirm_sesskey()) { +if (($marker >=0) and isteacher($course->id) and confirm_sesskey()) { $course->marker = $marker; if (! set_field("course", "marker", $marker, "id", $course->id)) { error("Could not mark that topic for this course"); diff --git a/course/format/topics/format.php b/course/format/topics/format.php index 198bfd8997..80f2ae4245 100644 --- a/course/format/topics/format.php +++ b/course/format/topics/format.php @@ -31,7 +31,7 @@ } } - if ($marker && isteacher($course->id) && confirm_sesskey()) { + if (($marker >=0) && isteacher($course->id) && confirm_sesskey()) { $course->marker = $marker; if (! set_field("course", "marker", $marker, "id", $course->id)) { error("Could not mark that topic for this course"); diff --git a/course/view.php b/course/view.php index d9afd08fd0..db0458cdc9 100644 --- a/course/view.php +++ b/course/view.php @@ -15,7 +15,7 @@ $studentview = optional_param('studentview', -1, PARAM_BOOL); $section = optional_param('section', 0, PARAM_INT); $move = optional_param('move', 0, PARAM_INT); - $marker = optional_param('marker',0 , PARAM_INT); + $marker = optional_param('marker',-1 , PARAM_INT); if (empty($id) && empty($name) && empty($idnumber)) {