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

Existing Quiz Feedback on Non-Graded Quizzes Prevents Editing

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.9.10, 2.0.2
    • 1.9.11, 2.0.3
    • Quiz
    • RHEL 5, PHP 5, MySQL 5
    • MOODLE_19_STABLE, MOODLE_20_STABLE
    • MOODLE_19_STABLE, MOODLE_20_STABLE
    • Moderate

    Description

      When a quiz has feedback text or boundaries associated with it - but is marked as non-graded - it becomes impossible to edit the quiz because the fields which are marked as disabled (because mdl_quiz.grade = 0) have content which returns validation errors, but the feedback cannot be truncated without using developer tools to modify the DOM directly.

      Here's a query to find the affected quiz feedback in your system (assumes a mdl_ prefix):

      SELECT mdl_quiz_feedback.*
      FROM mdl_quiz_feedback, mdl_course_modules AS m, mdl_modules AS m2, mdl_quiz AS q
      WHERE mdl_quiz_feedback.quizid = m.instance
      AND m.instance = q.id
      AND m.module = m2.id
      AND m2.name = 'quiz'
      AND q.grade = 0
      AND mdl_quiz_feedback.feedbacktext != ''

      You can swap the SELECT to DELETE to mass "fix" this issue. I would propose that these fields be automatically truncated by simply not populating them when the quiz is not graded.

      Attachments

        Activity

          People

            timhunt Tim Hunt
            jrchamp Jonathan Champ
            David Mudrák (@mudrd8mz) David Mudrák (@mudrd8mz)
            Tim Hunt, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              21/Feb/11