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

Quiz Restore break on special symbols

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Critical Critical
    • None
    • 2.0.2
    • 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

      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 = ?

            fred Frédéric Massart
            modguru Jai Gupta
            Votes:
            5 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

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