MDL-15095 towards restore lib dml conversion

This commit is contained in:
skodak 2008-06-03 23:35:50 +00:00
parent 9db7dab2ca
commit cd655b33f9
16 changed files with 207 additions and 238 deletions

View file

@ -212,6 +212,7 @@ function hotpot_restore_responses(&$restore, $status, &$xml, &$record) {
);
}
function hotpot_restore_details(&$restore, $status, &$xml, &$record) {
global $DB;
// $xml is an XML tree for an attempt record
// $record is the newly added attempt record
if (empty($record->details)) {
@ -220,7 +221,7 @@ function hotpot_restore_details(&$restore, $status, &$xml, &$record) {
$details = new stdClass();
$details->attempt = $record->id;
$details->details = $record->details;
if (insert_record('hotpot_details', $details)) {
if ($DB->insert_record('hotpot_details', $details)) {
$status = true;
} else {
if (!defined('RESTORE_SILENTLY')) {