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

Quiz Restore break on special symbols

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Cannot Reproduce
    • 2.0.2
    • None
    • Backup, Quiz
    • MySQL
    • MOODLE_20_STABLE
    • 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

    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

              fred Frédéric Massart
              modguru Jai Gupta
              Adrian Greeve, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, Tim Hunt, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
              Votes:
              5 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: