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

Long quiz names break deletion ad hoc task when questions are backed up

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.5.8
    • Fix Version/s: None
    • Component/s: Questions, Quiz
    • Labels:
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_35_STABLE

      Description

      When deleting a quiz, if some of the questions should be saved and the quiz name is very long, the database will error when attempting to create the new category for the saved questions.  I believe that this is because it is prepended with the string:

      "Questions saved from context {quiz name}".

        If the quiz name was approaching the database field, then the additional "Questions saved..." string will push it over and cause an error, stopping the ad hoc task from completing. 

      This appears to be happening in lib/questionlib.php:500.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              schiem Michael Yoder
              Participants:
              Component watchers:
              Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: