diff --git a/course/edit.php b/course/edit.php index 766bed437fa..9add1fa212a 100644 --- a/course/edit.php +++ b/course/edit.php @@ -74,7 +74,6 @@ } $USER->teacher[$newcourseid] = true; - save_session("USER"); redirect("view.php?id=$newcourseid", get_string("changessaved")); } diff --git a/course/enrol.php b/course/enrol.php index 570f1421db5..cede916a182 100644 --- a/course/enrol.php +++ b/course/enrol.php @@ -38,12 +38,10 @@ } $USER->student["$id"] = true; - save_session("USER"); if ($SESSION->wantsurl) { $destination = $SESSION->wantsurl; unset($SESSION->wantsurl); - save_session("SESSION"); } else { $destination = "$CFG->wwwroot/course/view.php?id=$id"; } @@ -72,12 +70,10 @@ } $USER->student["$id"] = true; - save_session("USER"); if ($SESSION->wantsurl) { $destination = $SESSION->wantsurl; unset($SESSION->wantsurl); - save_session("SESSION"); } else { $destination = "$CFG->wwwroot/course/view.php?id=$id"; } diff --git a/course/loginas.php b/course/loginas.php index 9c903ce0341..9091d8aeda4 100644 --- a/course/loginas.php +++ b/course/loginas.php @@ -18,7 +18,6 @@ $USER = get_user_info_from_db("id", $USER->realuser); $USER->loggedin = true; $USER->site = $CFG->wwwroot; - save_session("USER"); redirect($_SERVER["HTTP_REFERER"]); exit; } @@ -42,7 +41,6 @@ $USER->loggedin = true; $USER->site = $CFG->wwwroot; $USER->realuser = $teacher_id; - save_session("USER"); set_moodle_cookie($USER->username); $student_name = "$USER->firstname $USER->lastname"; diff --git a/course/mod.php b/course/mod.php index 52994dbaf80..53535e5964e 100644 --- a/course/mod.php +++ b/course/mod.php @@ -9,7 +9,6 @@ if (!empty($SESSION->returnpage)) { $return = $SESSION->returnpage; unset($SESSION->returnpage); - save_session("SESSION"); redirect($return); } else { redirect("view.php?id=$mod->course"); @@ -22,7 +21,6 @@ if (isset($SESSION->modform)) { // Variables are stored in the session $mod = $SESSION->modform; unset($SESSION->modform); - save_session("SESSION"); } else { $mod = (object)$_POST; } @@ -94,7 +92,6 @@ if (!empty($SESSION->returnpage)) { $return = $SESSION->returnpage; unset($SESSION->returnpage); - save_session("SESSION"); redirect($return); } else { redirect("view.php?id=$mod->course"); @@ -192,7 +189,6 @@ if (isset($return)) { $SESSION->returnpage = "$CFG->wwwroot/mod/$module->name/view.php?id=$cm->id"; - save_session("SESSION"); } $form->coursemodule = $cm->id; @@ -276,7 +272,6 @@ } unset($SESSION->modform); // Clear any old ones that may be hanging around. - save_session("SESSION"); $modform = "../mod/$module->name/mod.html"; diff --git a/course/topics.php b/course/topics.php index 1e7ae735ff9..a91cd48063b 100644 --- a/course/topics.php +++ b/course/topics.php @@ -14,7 +14,6 @@ } else { $USER->topic = $topic; } - save_session("USER"); } if (isteacher($course->id) and isset($marker)) { diff --git a/course/unenrol.php b/course/unenrol.php index 9c524aa9711..3c32377dd47 100644 --- a/course/unenrol.php +++ b/course/unenrol.php @@ -34,7 +34,6 @@ if ($user->id == $USER->id) { unset($USER->student["$id"]); - save_session("USER"); redirect("$CFG->wwwroot"); } diff --git a/course/view.php b/course/view.php index 04f4ff14fa2..da4ab280416 100644 --- a/course/view.php +++ b/course/view.php @@ -33,7 +33,6 @@ } else if ($edit == "off") { $USER->editing = false; } - save_session("USER"); } } @@ -43,11 +42,9 @@ } else if ($help == "off") { $USER->help = false; } - save_session("USER"); } $SESSION->fromdiscussion = "$CFG->wwwroot/course/view.php?id=$course->id"; - save_session("SESSION"); if (! $course->category) { // This course is not a real course. redirect("$CFG->wwwroot/"); diff --git a/course/weeks.php b/course/weeks.php index 99f966cc69a..dbcfaf283d2 100644 --- a/course/weeks.php +++ b/course/weeks.php @@ -11,7 +11,6 @@ } else { $USER->section = $week; } - save_session("USER"); } if ($course->newsitems) {