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

Backup: not restoring question sessions?

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 1.6.3
    • Fix Version/s: None
    • Component/s: Backup, Questions
    • Labels:
      None
    • Environment:
      Moodle 1.6.3+
      MySql
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_16_STABLE

      Description

      While restoring a course an error occurs (it is written into error log):

      [Tue Dec 19 09:19:41 2006] [error] [client *****] SQL Unknown column 'positionkey' in 'where clause' in /var/moodle/lib/datalib.php on line 579. STATEMENT: SELECT * FROM mdl_question_multianswer WHERE question = '376' AND positionkey = '' LIMIT 1

      It appears that the columnt positionkey has been removed from the DB as obsolete:

      In /mod/quiz/db/mysql.php there is an upgrade to DB [ if ($success && $oldversion < 2005051401) ] which (among others) states (line 738):

      $success = $success && modify_database('', 'ALTER TABLE `prefix_quiz_multianswers` DROP `positionkey`');

      At the same time, file /question/type/multianswer/questiontype.php states (line 504) references the column

      $db_multianswer = get_record ("question_multianswer","question",$new_question_id,
      "positionkey",$multianswer->positionkey);

      This obviously leads to an error in SQL. Don't know whether it affects question sessions.

      It happens with backing up courses with or without user data.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              timhunt Tim Hunt
              Reporter:
              trybicki Tomasz Rybicki
              Tester:
              Nobody
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: