]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-18293 exception and DML cleanup
authorskodak <skodak>
Tue, 17 Feb 2009 17:15:47 +0000 (17:15 +0000)
committerskodak <skodak>
Tue, 17 Feb 2009 17:15:47 +0000 (17:15 +0000)
lib/datalib.php

index cd9562a9a742cc22acb5d19fff624061dddc76d6..3a04e29172f5c70e33d5ae0d60aa48624dcb79da 100644 (file)
@@ -1993,9 +1993,7 @@ function user_accesstime_log($courseid=0) {
         $last->lastip     = getremoteaddr();
         $last->lastaccess = $timenow;
 
-        if (!$DB->update_record_raw('user', $last)) {
-            debugging('Error: Could not update global user lastaccess information', DEBUG_ALL);  // Don't throw an error
-        }
+        $DB->update_record_raw('user', $last);
     }
 
     if ($courseid == SITEID) {
@@ -2016,9 +2014,7 @@ function user_accesstime_log($courseid=0) {
             $last->userid     = $USER->id;
             $last->courseid   = $courseid;
             $last->timeaccess = $timenow;
-            if (!$DB->insert_record_raw('user_lastaccess', $last, false)) {
-                debugging('Error: Could not insert course user lastaccess information', DEBUG_ALL);  // Don't throw an error
-            }
+            $DB->insert_record_raw('user_lastaccess', $last, false);
 
         } else if ($timenow - $lastaccess <  LASTACCESS_UPDATE_SECS) {
             // no need to update now, it was updated recently in concurrent login ;-)
@@ -2027,9 +2023,7 @@ function user_accesstime_log($courseid=0) {
             // Update course lastaccess for next checks
             $USER->currentcourseaccess[$courseid] = $timenow;
 
-            if (!$DB->set_field('user_lastaccess', 'timeaccess', $timenow, array('userid'=>$USER->id, 'courseid'=>$courseid))) {
-                debugging('Error: Could not update course user lastacess information');  // Don't throw an error
-            }
+            $DB->set_field('user_lastaccess', 'timeaccess', $timenow, array('userid'=>$USER->id, 'courseid'=>$courseid));
         }
     }
 }