mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 09:56:38 +02:00
MDL-15095 towards restore lib dml conversion
This commit is contained in:
parent
9db7dab2ca
commit
cd655b33f9
16 changed files with 207 additions and 238 deletions
|
@ -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')) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue