Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-24429

course backup will not include course questions (Oracle only)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • 1.9.10
    • 1.9.4
    • Backup
    • None
    • Oracle
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE

      When you make backup for course that include some questions and then make restore for this course you will notice that the new resulting course does not have any questions .

      We have solved this problem by editing two functions in this file:

      • c:\\root-dir\qustion\backuplib.php

      as the following :

      • First function called [ backup_question () ] : You need to change (order by) clause in the select query by changing from [ "ORDER BY parent ASC,id"] to [ "ORDER BY q.parent ASC,q.id"]
      • Second funciton called [ question_insert_q_ids() ] : You need to enter space or text in this query because oracle database doesnt recognize the empty parameter in select statment.The solution to enter any text as this query

      "INSERT INTO {$CFG->prefix}backup_ids
      (backup_code, table_name, old_id, info)
      SELECT '$backup_unique_code', 'question', q.id, ' [Enter here any text or space ] '
      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'
      AND bk.backup_code = '$backup_unique_code'"

            stronk7 Eloy Lafuente (stronk7)
            ahmadabudawod ahmad hassan mohammad abudawod (Inactive)
            Nobody Nobody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.