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

Make Quiz Tiny integration less fragile

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.11.11, 4.0.5
    • 3.11.10, 4.0.4
    • Quiz
    • MOODLE_311_STABLE, MOODLE_400_STABLE
    • MOODLE_311_STABLE, MOODLE_400_STABLE
    • MDL-75782-master
    • Hide

      Configuration

      In your config.php add:

      $CFG->forced_plugin_settings = [
          'quiz' => ['autosaveperiod' => 10],
      ];
      

      Setup

      1. Create a quiz with an Essay question
      2. Ensure that the auto-save admin setting is turned on.

      Test steps

      Note: These testing instructions should be completed using TinyMCE as your editor, as well as the Atto editor.
      You can configure your editor in:
      User preferences -> Editor preferences

      1. Attempt the quiz as a student.
      2. Open your browser dev tools and go to the Network tab
      3. You might see a lot of requests going on due to the core_session_touch requests. So filter the network output with the requests containing the "autosave" keyword
      4. Enter some text into the Essay question
      5. Wait for at least 10 seconds
        1. Confirm that there was an autosave request in the Network tab of your browsers developer tools
      Show
      Configuration In your config.php add: $CFG->forced_plugin_settings = [ 'quiz' => ['autosaveperiod' => 10], ]; Setup Create a quiz with an Essay question Ensure that the auto-save admin setting is turned on. Test steps Note: These testing instructions should be completed using TinyMCE as your editor, as well as the Atto editor. You can configure your editor in: User preferences -> Editor preferences Attempt the quiz as a student. Open your browser dev tools and go to the Network tab You might see a lot of requests going on due to the core_session_touch requests. So filter the network output with the requests containing the "autosave" keyword Enter some text into the Essay question Wait for at least 10 seconds Confirm that there was an autosave request in the Network tab of your browsers developer tools

      The current quiz autosave has hooks straight into the Tiny API but does so in an unsafe way which links it explicitly to TinyMCE 3.

        1. atto_MDL-75782_master.png
          atto_MDL-75782_master.png
          103 kB
        2. atto_MDL-75782_v311.png
          atto_MDL-75782_v311.png
          154 kB
        3. atto_MDL-75782_v400.png
          atto_MDL-75782_v400.png
          85 kB
        4. tinymce_MDL-75782_master.png
          tinymce_MDL-75782_master.png
          94 kB
        5. tinymce_MDL-75782_v311.png
          tinymce_MDL-75782_v311.png
          131 kB
        6. tinymce_MDL-75782_v400.png
          tinymce_MDL-75782_v400.png
          73 kB

            dobedobedoh Andrew Lyons
            dobedobedoh Andrew Lyons
            Tim Hunt Tim Hunt
            Jun Pataleta Jun Pataleta
            John Edward Pedregosa John Edward Pedregosa
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 40 minutes
                2h 40m

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