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

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.5, 2.6
    • 2.5.1
    • Installation, Questions
    • None
    • MOODLE_25_STABLE, MOODLE_26_STABLE
    • MOODLE_25_STABLE
    • 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'.

    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

              timhunt Tim Hunt
              jrickard John Rickard
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Rajesh Taneja Rajesh Taneja
              Matteo Scaramuccia, Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Stevani Andolo, Safat Shahin, Tim Hunt, Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                8/Jul/13