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

Error when renaming question number

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 4.2
    • 4.2
    • Quiz
    • MOODLE_402_STABLE
    • MOODLE_402_STABLE
    • MDL-76968-master
    • Hide
      Manual test
      1. Log in as an editing teacher
      2. Create a question in a quiz
      3. On the Questions page, try to edit the question number.
      4. Confirm that you are able to change the question number.
      Unit test
      1. Run the test_mod_quiz_inplace_editable unit test. e.g. using MDK:

        mdk phpunit -r --filter test_mod_quiz_inplace_editable
        

      2. Confirm that it passes.
      Show
      Manual test Log in as an editing teacher Create a question in a quiz On the Questions page, try to edit the question number. Confirm that you are able to change the question number. Unit test Run the test_mod_quiz_inplace_editable unit test. e.g. using MDK: mdk phpunit -r --filter test_mod_quiz_inplace_editable Confirm that it passes.

      When editing the question number an error gets displayed:

      Exception - Class "external_api" not found
       
      Error code: generalexceptionmessage
      * line 1181 of /mod/quiz/lib.php: Error thrown
      * line 8059 of /lib/moodlelib.php: call to mod_quiz_inplace_editable()
      * line 470 of /lib/external/externallib.php: call to component_callback()
      * line ? of unknownfile: call to core_external::update_inplace_editable()
      * line 251 of /lib/external/classes/external_api.php: call to call_user_func_array()
      * line 83 of /lib/ajax/service.php: call to core_external\external_api::call_external_function()
      

      This can also be reproduced when running the test_mod_quiz_inplace_editable test case:

      1) mod_quiz\lib_test::test_mod_quiz_inplace_editable with data set "slot 1 customised to A1, displayednumber is A1" (1, 'A1')
      Error: Class "external_api" not found
       
      /Users/jun/Work/moodles/integration_master/moodle/mod/quiz/lib.php:1181
      /Users/jun/Work/moodles/integration_master/moodle/mod/quiz/tests/lib_test.php:1255
      /Users/jun/Work/moodles/integration_master/moodle/lib/phpunit/classes/advanced_testcase.php:80
       
      2) mod_quiz\lib_test::test_mod_quiz_inplace_editable with data set "slot 2 customised to "A2", displayednumber is A2" (2, 'A2')
      Error: Class "external_api" not found
       
      /Users/jun/Work/moodles/integration_master/moodle/mod/quiz/lib.php:1181
      /Users/jun/Work/moodles/integration_master/moodle/mod/quiz/tests/lib_test.php:1255
      /Users/jun/Work/moodles/integration_master/moodle/lib/phpunit/classes/advanced_testcase.php:80
       
      3) mod_quiz\lib_test::test_mod_quiz_inplace_editable with data set "slot 3 is not customised, displayednumber is 3" (3, '3')
      Error: Class "external_api" not found
       
      /Users/jun/Work/moodles/integration_master/moodle/mod/quiz/lib.php:1181
      /Users/jun/Work/moodles/integration_master/moodle/mod/quiz/tests/lib_test.php:1255
      /Users/jun/Work/moodles/integration_master/moodle/lib/phpunit/classes/advanced_testcase.php:80
       
      4) mod_quiz\lib_test::test_mod_quiz_inplace_editable with data set "slot 4 customised to "", displayednumber is 4" (4, '')
      Error: Class "external_api" not found
       
      /Users/jun/Work/moodles/integration_master/moodle/mod/quiz/lib.php:1181
      /Users/jun/Work/moodles/integration_master/moodle/mod/quiz/tests/lib_test.php:1255
      /Users/jun/Work/moodles/integration_master/moodle/lib/phpunit/classes/advanced_testcase.php:80
       
      ERRORS!
      Tests: 4, Assertions: 4, Errors: 4.
      

            jpataleta Jun Pataleta
            jpataleta Jun Pataleta
            Carlos Escobedo Carlos Escobedo
            Tim Hunt Tim Hunt
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                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.