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

Quiz Restore break on special symbols

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.0.2
    • Fix Version/s: None
    • Component/s: Backup, Quiz
    • Labels:
    • Database:
      MySQL
    • Testing Instructions:
      Hide

      1) Create a course, add quiz.
      2) Add questions having special symbols / html as answer.
      3) Backup course
      4) Restore course as a new course

      Show
      1) Create a course, add quiz. 2) Add questions having special symbols / html as answer. 3) Backup course 4) Restore course as a new course
    • Affected Branches:
      MOODLE_20_STABLE

      Description

      We are unable to restore course backups. Backup fails with error_question_answers_missing_in_db or error_question_match_sub_missing_in_db.

      We tested restoring course in new installation and it worked but restore fails on production site.

      On further investigation it was found that during restore operation db select queries like[1] remove special symbols like '&' from query which results in empty results.

      We also checked restored course in new installation. All questions/answers had removed special symbols. For e.g. 'Both A & B' was converted into 'Both A B'.

      Another major problem is that restore operation is reconverting html into html. It means that all html code ( for e.g. <P> Tag) is now displayed to user in browser.

      [1] SELECT id FROM

      {question_answers}

      WHERE question = ? AND answer = ?

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                fred Frédéric Massart
                Reporter:
                modguru Jai Gupta
                Participants:
                Component watchers:
                Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              • Votes:
                5 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: