MDL-18293 removed obsoleted checking of return values from insert and update_record + unused strings cleanup

This commit is contained in:
skodak 2009-06-13 17:55:51 +00:00
parent a8c31db2a3
commit 0bcf8b6f0d
10 changed files with 21 additions and 83 deletions

View file

@ -873,9 +873,7 @@ function data_update_instance($data) {
$data->notification = 0;
}
if (! $DB->update_record('data', $data)) {
return false;
}
$DB->update_record('data', $data);
data_grade_item_update($data);

View file

@ -81,9 +81,7 @@
$newrating->userid = $USER->id;
$newrating->recordid = $record->id;
$newrating->rating = $rating;
if (! $DB->insert_record('data_ratings', $newrating)) {
print_error('cannotinsertrate', 'error', '', (object)array('id'=>$record->id, 'rating'=>$rating));
}
$DB->insert_record('data_ratings', $newrating);
data_update_grades($data, $record->userid);
}
}