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

Neither formchangechecker, nor quiz autosave detects changes in Atto editors

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Open a page with an editor and form change checker
      2. Refresh the page
        • Confirm that the change checker did not warn
      3. Click into the editor but do not insert any content
      4. Refresh the page
        • Confirm that the change checker did not warn
      5. Click into the editor but do not insert any content
      6. Click around the editor but not on any buttons
      7. Toggle the 'Show more buttons' collapse plugin
      8. Refresh the page
        • Confirm that the change checker did not warn
      9. Click into the editor but do not insert any content
      10. Click on some of the buttons like Bold, Italic, etc.
      11. Refresh the page
        • Confirm that the change checker warned of changes
      12. Click into the editor and type some content. Do NOT click outside the editor
      13. Refresh the page by hitting F5 - e.g. do not use the mouse
        • Confirm that the change checker warned of changes
      14. Click into the editor and type some content.
      15. Click outside the edtor
      16. Refresh the page
        • Confirm that the change checker warned of changes
      17. Add the following to your config.php:

        $CFG->forced_plugin_settings = array('quiz' => array('autosaveperiod' => 3));
        

      18. Create a quiz containing one essay question, that uses the 'HTML editor with file picker' response type.
      19. Attempt the quiz, and Open the console. (The autosave code outputs useful debug messages to tell you what is going on - assuming you have developer debug on.)
      20. Type something in Atto, and verify that 3 seconds later (or whatever delay you set) an autosave ajax request happens.
      21. Add an image to Atto using the filepicker, and verify that cause an autosave too.
      Show
      Open a page with an editor and form change checker Refresh the page Confirm that the change checker did not warn Click into the editor but do not insert any content Refresh the page Confirm that the change checker did not warn Click into the editor but do not insert any content Click around the editor but not on any buttons Toggle the 'Show more buttons' collapse plugin Refresh the page Confirm that the change checker did not warn Click into the editor but do not insert any content Click on some of the buttons like Bold, Italic, etc. Refresh the page Confirm that the change checker warned of changes Click into the editor and type some content. Do NOT click outside the editor Refresh the page by hitting F5 - e.g. do not use the mouse Confirm that the change checker warned of changes Click into the editor and type some content. Click outside the edtor Refresh the page Confirm that the change checker warned of changes Add the following to your config.php: $CFG->forced_plugin_settings = array('quiz' => array('autosaveperiod' => 3)); Create a quiz containing one essay question, that uses the 'HTML editor with file picker' response type. Attempt the quiz, and Open the console. (The autosave code outputs useful debug messages to tell you what is going on - assuming you have developer debug on.) Type something in Atto, and verify that 3 seconds later (or whatever delay you set) an autosave ajax request happens. Add an image to Atto using the filepicker, and verify that cause an autosave too.
    • Affected Branches:
      MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE
    • Pull Master Branch:
      MDL-45780-master
    • Story Points:
      13
    • Sprint:
      FRONTEND Sprint 13

      Description

      Both quiz autosave code mod/quiz/yui/src/autosave/js/autosave.js, and lib/yui/src/formchangechecker/js/formchangechecker.js require special code to work with TinyMCE.

      It seems that it they will alos need special code to work with Atto, but no-one has written that.

      To reproduce (Quiz)

      1. (Optional) Add $CFG->forced_plugin_settings = array('quiz' => array('autosaveperiod' => 3)); to your config.php to make thes easier to test. (Just a 3 second delay between a change and an auto-save.)
      2. Ensure you have a default set-up using Atto, not TinyMCE or another editor.
      3. Create a quiz containing one essay question, that uses the 'HTML editor with file picker' response type.
      4. Attempt the quiz, and Open the console. (The autosave code outputs useful debug messages to tell you what is going on - assuming you have developer debug on.)
      5. Type something in Atto, and verify that 3 seconds later (or whatever delay you set) an autosave ajax request happens.
      6. Add an image to Atto using the filepicker, and verify that cause an autosave too.

      To reproduce (Formchangechecker)

      1. Go to a form, and click to make a new post.
      2. Type an X in the message box.
      3. Click the back button. You should get a warning that you are about to leave a page with unsaved data, but you don't.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dobedobedoh Andrew Nicols
              Reporter:
              timhunt Tim Hunt
              Peer reviewer:
              Damyon Wiese
              Integrator:
              Marina Glancy
              Tester:
              Adrian Greeve
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                8/Sep/14