mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 17:36:38 +02:00
MDL-14679 fixed remaining old style set_field()s
This commit is contained in:
parent
dd88de0ebd
commit
f685e83030
26 changed files with 82 additions and 167 deletions
|
@ -417,7 +417,7 @@
|
|||
// see: $QTYPES['random']->get_question_options()
|
||||
if ($question->qtype == 'random' && $creatingnewquestion) {
|
||||
$question->parent = $question->id;
|
||||
$status = $DB->set_field('question', 'parent', $question->parent, array('id'=>$question->id));
|
||||
$DB->set_field('question', 'parent', $question->parent, array('id'=>$question->id));
|
||||
}
|
||||
|
||||
//Save newid to backup tables
|
||||
|
@ -457,10 +457,7 @@
|
|||
if ($parent = backup_getid($restore->backup_unique_code,"question",$question->parent)) {
|
||||
$question->parent = $parent->new_id;
|
||||
if ($question->parent != $restored_questions[$i]->parent) {
|
||||
if (!$DB->set_field('question', 'parent', $question->parent, array('id'=>$newid))) {
|
||||
echo 'Could not update parent '.$question->parent.' for question '.$oldid.'<br />';
|
||||
$status = false;
|
||||
}
|
||||
$DB->set_field('question', 'parent', $question->parent, array('id'=>$newid));
|
||||
}
|
||||
} else {
|
||||
echo 'Could not recode parent '.$question->parent.' for question '.$oldid.'<br />';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue