From 684209685d423aed55099592628397294f1f9585 Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Fri, 1 Jun 2007 07:12:43 +0200 Subject: [PATCH] [svn r12520] Fixed bug preventing natural behaviour of studentView (checking for &studentView but not &studentView - now always using &studentView everywhere) --- main/inc/lib/main_api.lib.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/main/inc/lib/main_api.lib.php b/main/inc/lib/main_api.lib.php index 94b09eec6f..85b9bfebeb 100644 --- a/main/inc/lib/main_api.lib.php +++ b/main/inc/lib/main_api.lib.php @@ -1154,7 +1154,7 @@ function api_display_tool_view_option() else { $sourceurl = $_SERVER['REQUEST_URI']; - $sourceurl = str_replace('&', '&', $sourceurl); + //$sourceurl = str_replace('&', '&', $sourceurl); } if ($isStudentView == "true" and $_SESSION["studentview"]) { @@ -1164,7 +1164,7 @@ function api_display_tool_view_option() // we have to remove the isStudentView=true from the $sourceurl $sourceurl = str_replace("&isStudentView=true", "", $sourceurl); $sourceurl = str_replace("&isStudentView=false", "", $sourceurl); - $output_string .= "".get_lang("CourseManagerview").""; + $output_string .= "".get_lang("CourseManagerview").""; } elseif ($isStudentView == "false" and $_SESSION["studentview"]) { @@ -1173,19 +1173,19 @@ function api_display_tool_view_option() $sourceurl = str_replace("&isStudentView=false", "", $sourceurl); // We are in teacherview here $_SESSION["studentview"] = "teacherview"; - $output_string .= "".get_lang("StudentView").""; + $output_string .= "".get_lang("StudentView").""; } elseif ($_SESSION["studentview"]) { // no switching if ($_SESSION["studentview"] == "teacherview") { - $output_string .= "".get_lang("StudentView").""; + $output_string .= "".get_lang("StudentView").""; } if ($_SESSION["studentview"] == "studentenview") { $sourceurl = str_replace("&isStudentView=true", "", $sourceurl); - $output_string .= " ".get_lang("CourseManagerview").""; + $output_string .= " ".get_lang("CourseManagerview").""; } } elseif (!$_SESSION["studentview"]) @@ -1193,7 +1193,7 @@ function api_display_tool_view_option() // initialisation // We are in teacherview here $_SESSION["studentview"] = "teacherview"; - $output_string .= "".get_lang("StudentView").""; + $output_string .= "".get_lang("StudentView").""; } if (api_get_setting('show_student_view') == "true")