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

Error, questionsummary too big, mod/quiz upgrade from 2.0.6 to 2.2+ (Build: 20111209)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 2.1.4, 2.2.1
    • 2.2
    • Quiz
    • None
    • Linux server, Apache,
    • MySQL
    • MOODLE_22_STABLE
    • MOODLE_21_STABLE, MOODLE_22_STABLE
    • Hide

      Updated question/engine/upgrade/upgradelib.php
      line 248 by adding

      if (isset($qa->questionsummary) && (strlen($qa->questionsummary) > 65535))

      { $qa->questionsummary = substr($qa->questionsummary, 0, 65534); }
      Show
      Updated question/engine/upgrade/upgradelib.php line 248 by adding if (isset($qa->questionsummary) && (strlen($qa->questionsummary) > 65535)) { $qa->questionsummary = substr($qa->questionsummary, 0, 65534); }
    • Hide

      This needs to be tested on MySQL. Ideally on all supported databases, but that is probably too much to ask.

      1. Import the question in the attached .xml file into a 2.0 site.
      2. Add that question to a quiz.
      3. Attempt the quiz as a student.
      4. Try upgrading the site to Moodle 2.1 or 2.2. Make sure there are no errors.

      5. Import the attached question to a 2.1 or 2.2 site.
      6. Try to preview the question. Make sure there are no errors.

      Show
      This needs to be tested on MySQL. Ideally on all supported databases, but that is probably too much to ask. 1. Import the question in the attached .xml file into a 2.0 site. 2. Add that question to a quiz. 3. Attempt the quiz as a student. 4. Try upgrading the site to Moodle 2.1 or 2.2. Make sure there are no errors. 5. Import the attached question to a 2.1 or 2.2 site. 6. Try to preview the question. Make sure there are no errors.

      When I upgrade our Clone from 2.0.6 to 2.2+ (after a previous update from 1.9.10 to 2.0.6), I
      get the following error:
      ---------------------
      Debug info: Data too long for column 'questionsummary' at row 1
      INSERT INTO moquestion_attempts (questionid,variant,behaviour,questionsummary,rightanswer,maxmark,minfraction,flagged,responsesummary,timemodified,questionusageid,slot) VALUES(?,?,?,?,?,?,?,?,?,?,?,?)
      -------------------
      The complete output is attached. Apparently, the questionsummary created is too large.
      The upgrade script should check whether the string is to large and cut it to the maximum size
      of the questionsummary field (type text) when necessary.

            timhunt Tim Hunt
            jzimmer Juergen Zimmer
            Sam Hemelryk Sam Hemelryk
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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