Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

questions: MDL-20280 oracle compatibility in question backup.

Problem and fix thanks to Sara Arjona
  • Loading branch information...
commit 26605cb7dadf2d25fc96c70599243b2435695d1b 1 parent c0b6790
tjhunt authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 question/backuplib.php
View
4 question/backuplib.php
@@ -168,7 +168,7 @@ function backup_question($bf,$preferences,$category, $level = 4) {
"WHERE q.category= $category AND ".
"bk.old_id=q.id AND ".
"bk.backup_code = {$preferences->backup_unique_code} ".
- "ORDER BY parent ASC, id");
+ "ORDER BY parent ASC, q.id");
//If there are questions
if ($questions) {
//Write start tag
@@ -454,7 +454,7 @@ function question_insert_q_ids($backup_unique_code, $info){
//put the ids of the questions from all these categories into the db.
$status = execute_sql("INSERT INTO {$CFG->prefix}backup_ids
(backup_code, table_name, old_id, info)
- SELECT '$backup_unique_code', 'question', q.id, ''
+ SELECT '$backup_unique_code', 'question', q.id, '" . sql_empty() . "'
FROM {$CFG->prefix}question q, {$CFG->prefix}backup_ids bk
WHERE q.category = bk.old_id AND bk.table_name = 'question_categories'
AND " . sql_compare_text('bk.info') . " = '$info'
Please sign in to comment.
Something went wrong with that request. Please try again.