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

The contents of the field feedback in essay questions disappear after an update

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.1.2, 2.2
    • Fix Version/s: 2.1.7, 2.2.4
    • Component/s: Questions
    • Labels:
    • Database:
      Any
    • Testing Instructions:
      Hide

      1. In a Moodle 2.0 (or 1.9) site, create some essay questions with various combinations of General feedback and Feedback.

      2. Upgrade the site to Moodle 2.1 or 2.2.

      3. Verify that the General feedback and Feedback have been concatenated into the General feedback field during the upgrade.

      For extra credit:

      A. Test this on all supported databases.

      B. Test with various combinations of text format for General feedback and Feedback. (e.g. FORMAT_MOODLE, FORMAT_HTML.)

      Show
      1. In a Moodle 2.0 (or 1.9) site, create some essay questions with various combinations of General feedback and Feedback. 2. Upgrade the site to Moodle 2.1 or 2.2. 3. Verify that the General feedback and Feedback have been concatenated into the General feedback field during the upgrade. For extra credit: A. Test this on all supported databases. B. Test with various combinations of text format for General feedback and Feedback. (e.g. FORMAT_MOODLE, FORMAT_HTML.)
    • Workaround:
      Hide

      A solution that we considered would be to copy the contents of the field feedback from the field to the table mdl_question_answer generalfeedback table mdl_question ex:

      MySQL Query

      UPDATE mdl_question_answers a JOIN mdl_question b ON b.id = a.question AND b.qtype = "essay" AND LENGTH(a.feedback) > 0
      JOIN mdl_quiz_question_instances c ON c.question = b.id
      JOIN mdl_quiz d ON d.id = c.quiz 
      JOIN mdl_question e ON e.id = a.question
      SET e.generalfeedback = CONCAT(e.generalfeedback, a.feedback)

      Show
      A solution that we considered would be to copy the contents of the field feedback from the field to the table mdl_question_answer generalfeedback table mdl_question ex: MySQL Query UPDATE mdl_question_answers a JOIN mdl_question b ON b.id = a.question AND b.qtype = "essay" AND LENGTH(a.feedback) > 0 JOIN mdl_quiz_question_instances c ON c.question = b.id JOIN mdl_quiz d ON d.id = c.quiz JOIN mdl_question e ON e.id = a.question SET e.generalfeedback = CONCAT(e.generalfeedback, a.feedback)
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      We recently updated our production environment to move from version 2.0.3 to version 2.1.2and we no longer see the feedback contents of essay questions.

      Digging a bit, we noticed that with the new version, there is simply no more entries in the table "mdl_question_answer" created for questions of this type.
      Its a normal behaviour but the bug I think is that the old fieldback field content is now unavailable.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  3 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    9/Jul/12