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

Thrown exception doesn't exist for invalid $CFG->quizquestionbankcolumns

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.9.7, 3.10.4
    • 3.9.5
    • Quiz
    • MOODLE_39_STABLE
    • MOODLE_310_STABLE, MOODLE_39_STABLE
    • Hide
      1. Add the following to your site configuration file:

        $CFG->quizquestionbankcolumns = 'foobar';
        

      2. Create a new course
      3. Add a quiz
      4. Press Edit quiz to start adding questions
      5. Confirm you see the following error:

        Coding error detected, it must be fixed by a programmer: Invalid quiz question bank column
        Debug info: foobar
        Error code: codingerror 
        

      Show
      Add the following to your site configuration file: $CFG->quizquestionbankcolumns = 'foobar'; Create a new course Add a quiz Press Edit quiz to start adding questions Confirm you see the following error: Coding error detected, it must be fixed by a programmer: Invalid quiz question bank column Debug info: foobar Error code: codingerror

      When setting $CFG->quizquestionbankcolumns = '...'; to include an invalid column class, a confusing exception is thrown because the desired one doesn't exist in the class namespace, which leads to an exception being thrown about the unknown exception class:

      Exception - Class 'mod_quiz\question\bank\coding_exception' not found
      

            pholden Paul Holden
            pholden Paul Holden
            Sujith Haridasan Sujith Haridasan
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Gladys Basiana Gladys Basiana
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 55 minutes
                1h 55m

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