mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 17:36: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
|
@ -808,9 +808,7 @@
|
|||
global $CFG;
|
||||
$status = true;
|
||||
|
||||
if ($scorms = get_records_sql ("SELECT s.id, s.summary
|
||||
FROM {$CFG->prefix}scorm s
|
||||
WHERE s.course = $restore->course_id")) {
|
||||
if ($scorms = $DB->get_records('scorm', array('course'=>$restore->course_id), '', "id,summary")) {
|
||||
|
||||
$i = 0; //Counter to send some output to the browser to avoid timeouts
|
||||
foreach ($scorms as $scorm) {
|
||||
|
@ -821,11 +819,11 @@
|
|||
|
||||
if ($result != $content) {
|
||||
//Update record
|
||||
$scorm->summary = addslashes($result);
|
||||
$status = update_record("scorm",$scorm);
|
||||
$scorm->summary = $result;
|
||||
$status = $DB->update_record("scorm",$scorm);
|
||||
if (debugging()) {
|
||||
if (!defined('RESTORE_SILENTLY')) {
|
||||
echo '<br /><hr />'.htmlentities($content).'<br />changed to<br />'.htmlentities($result).'<hr /><br />';
|
||||
echo '<br /><hr />'.s($content).'<br />changed to<br />'.s($result).'<hr /><br />';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue