mirror of
https://github.com/moodle/moodle.git
synced 2025-04-26 19:03:38 +02:00
questions: MDL-20280 oracle compatibility in question backup.
Problem and fix thanks to Sara Arjona
This commit is contained in:
parent
95e88597ea
commit
7fc368e14a
@ -168,7 +168,7 @@
|
||||
WHERE q.category= ? AND
|
||||
bk.old_id=q.id AND
|
||||
bk.backup_code = ?
|
||||
ORDER BY parent ASC, id", array($category, $preferences->backup_unique_code));
|
||||
ORDER BY parent ASC, q.id", array($category, $preferences->backup_unique_code));
|
||||
//If there are questions
|
||||
if ($questions) {
|
||||
//Write start tag
|
||||
@ -444,11 +444,12 @@
|
||||
global $CFG,$DB;
|
||||
//put the ids of the questions from all these categories into the db.
|
||||
$status = $DB->execute("INSERT INTO {backup_ids} (backup_code, table_name, old_id, info)
|
||||
SELECT '$backup_unique_code', 'question', q.id, ''
|
||||
SELECT ?, 'question', q.id, ?
|
||||
FROM {question} q, {backup_ids} bk
|
||||
WHERE q.category = bk.old_id AND bk.table_name = 'question_categories'
|
||||
AND " . $DB->sql_compare_text('bk.info') . " = ?
|
||||
AND bk.backup_code = ?", array($info, $backup_unique_code));
|
||||
AND bk.backup_code = ?",
|
||||
array($backup_unique_code, $DB->sql_empty(), $info, $backup_unique_code));
|
||||
return $status;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user