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

Backup: not restoring question sessions?

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • 1.6.3
    • Backup, Questions
    • None
    • Moodle 1.6.3+
      MySql
    • MySQL
    • MOODLE_16_STABLE

      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.

            timhunt Tim Hunt
            trybicki Tomasz Rybicki (Inactive)
            Nobody Nobody (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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