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

Upgrade to Moodle 2.5 breaks if question_shortanswer table contains duplicate rows

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5, 2.6
    • Fix Version/s: 2.5.1
    • Component/s: Installation, Questions
    • Labels:
      None
    • Testing Instructions:
      Hide

      You need to test upgrading from 2.4.x to 2.5 or master.

      1. Before you upgrade, create some shortanwser questions somewhere in your question bank.

      2. Go into the mdl_question_shortanswer table in the database, and duplicate some of the rows there (so, in the duplicate row, only the id column will be different from the original).

      3. Upgrade to 2.5 or master. Make sure that there are no unique key related errors.

      4. Check in the database. The key table will have been renamed to qtype_shortanswer_options. Ensure that there is now only one row for each questionid, and that it has the correct value for 'usecase'.

      Show
      You need to test upgrading from 2.4.x to 2.5 or master. 1. Before you upgrade, create some shortanwser questions somewhere in your question bank. 2. Go into the mdl_question_shortanswer table in the database, and duplicate some of the rows there (so, in the duplicate row, only the id column will be different from the original). 3. Upgrade to 2.5 or master. Make sure that there are no unique key related errors. 4. Check in the database. The key table will have been renamed to qtype_shortanswer_options. Ensure that there is now only one row for each questionid, and that it has the correct value for 'usecase'.
    • Affected Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      When upgrading one of our sites to Moodle 2.5 is fails with an error about the qtype_shortanswer

      I do have a screenshot - but cant seem to attach it at the moment...

      It is all linked to http://docs.moodle.org/25/en/error/moodle/ddlexecuteerror

      This seems to occur when I upgrade straight from Moodle 2.3 or upgrading the site by stepping it up to Moodle 2.4 first. Our testing site works fine, and so has another site. I have our main moodle site to do next week, so I want to ensure this isn't going to happen on that one as well...

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  8/Jul/13