replacing get_site() in add_to_log() for efficiency. Moodle 1.5 will have this done more thoroughly.
This commit is contained in:
+1
-2
@@ -2279,8 +2279,7 @@ function add_to_log($courseid, $module, $action, $url="", $info="", $cm=0, $user
|
||||
echo "<P>Error: Could not insert a new entry to the Moodle log</P>"; // Don't throw an error
|
||||
}
|
||||
if (!$user and isset($USER->id)) {
|
||||
$site = get_site();
|
||||
if ($courseid == $site->id) {
|
||||
if ($courseid == 1) {
|
||||
update_user_in_db();
|
||||
} else if (isstudent($courseid)) {
|
||||
$db->Execute("UPDATE {$CFG->prefix}user_students SET timeaccess = '$timenow' ".
|
||||
|
||||
Reference in New Issue
Block a user