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

Existing Quiz Feedback on Non-Graded Quizzes Prevents Editing

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9.10, 2.0.2
    • Fix Version/s: 1.9.11, 2.0.3
    • Component/s: Quiz
    • Labels:
    • Environment:
      RHEL 5, PHP 5, MySQL 5
    • Difficulty:
      Moderate
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE

      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

            Assignee:
            timhunt Tim Hunt
            Reporter:
            jrchamp Jonathan Champ
            Tester:
            David Mudrák (@mudrd8mz)
            Participants:
            Component watchers:
            Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              21/Feb/11