Permalink
Browse files

Remember timeaccess settings even after returning from logging as

another person
  • Loading branch information...
1 parent 46a6505 commit a5daf57cdc1b72f9e4e9dc66224246c70eedce27 moodler committed May 21, 2004
Showing with 10 additions and 0 deletions.
  1. +10 −0 course/loginas.php
View
@@ -25,6 +25,10 @@
$SESSION->currentgroup[$course->id] = $SESSION->oldcurrentgroup;
unset($SESSION->oldcurrentgroup);
}
+ if (isset($SESSION->oldtimeaccess)) { // Restore previous timeaccess settings
+ $USER->timeaccess = $SESSION->oldtimeaccess;
+ unset($SESSION->oldtimeaccess);
+ }
redirect($_SERVER["HTTP_REFERER"]);
exit;
@@ -44,6 +48,12 @@
error("You can not login as this person!");
}
+ // Remember current timeaccess settings for later
+
+ if (isset($USER->timeaccess)) {
+ $SESSION->oldtimeaccess = $USER->timeaccess;
+ }
+
// Login as this student and return to course home page.
$teacher_name = fullname($USER, true);

0 comments on commit a5daf57

Please sign in to comment.