Moodle
  1. Moodle
  2. MDL-31315

Warn users before moving away from modified forms

    Details

    • Testing Instructions:
      Hide

      Open the Moodle Login Page

      • Make a change to to the username
      • Hit Refresh
      • The page refreshes

      Log in to Moodle and navigate to a course

      • Choose Edit Settings
      Without any changes
      • Refresh the page (the page refreshes)
      • Hit the back button (you go back in time and space)
      • Go back to the Edit Settings Page
      • Try closing the browser window (it closes)
      • Click Save and Display (the form saves)
      Now make some changes to various fields
      • Go back to the Edit Settings Page
      • Make a change to the 'Course full name'
      • Refresh the page (you get a popup) - click to stay
      • Hit the back button (you get a popup) - click to stay
      • Try closing the browser window/tab (you get a popup) - click to stay
      • Click Save and Display (the form saves)

      Repeat the above steps using a select instead of 'Course full name'
      Repeat the above steps using a textarea (not TinyMCE) instead of 'Course full name'

      Go back to the course and create an Assignment
      • Choose Edit Settings
      Without any changes
      • Refresh the page to confirm that it refreshes when there have been no changes
      Make some changes to the TinyMCE editor
      • Refresh the page (you get a popup) - click to stay
      • Hit the back button (you get a popup) - click to stay
      • Try closing the browser window/tab (you get a popup) - click to stay
      • Click Save and Display (the form saves)
      Uploading files
      • As a Student, choose the 'Upload Files' option
      • Refresh the page to confirm that it refreshes when there have been no changes
      • Upload a file using the 'Add' button and the filepicker
      • Refresh the page (you get a popup) - click to stay
      • Hit the back button (you get a popup) - click to stay
      • Try closing the browser window/tab (you get a popup) - click to stay
      • Refresh the page and this time leave to start afresh
      • Upload a file using the drag/drop functionality (Supported browsers only - Chrome and Firefox)
      • Refresh the page (you get a popup) - click to stay
      • Hit the back button (you get a popup) - click to stay
      • Try closing the browser window/tab (you get a popup) - click to stay
      • Click 'Save Changes'
      Modify existing files
      • Choose the 'Edit these files' button
      • Refresh the page and this time leave to start afresh
      • From the drop-down on a file, choose the rename option and enter a new name
      • Upload a file using the drag/drop functionality (Supported browsers only - Chrome and Firefox)
      • Refresh the page (you get a popup) - click to stay
      • Hit the back button (you get a popup) - click to stay
      • Try closing the browser window/tab (you get a popup) - click to stay
      • Refresh the page and this time leave to start afresh
      • From the drop-down menu on a file, choose the Delete option and confirm
      • Refresh the page (you get a popup) - click to stay
      • Hit the back button (you get a popup) - click to stay
      • Try closing the browser window/tab (you get a popup) - click to stay
      • Refresh the page and this time leave to start afresh
      • Create a new directory
      • From the drop-down menu on a file, choose the Delete option and confirm
      • Refresh the page (you get a popup) - click to stay
      • Hit the back button (you get a popup) - click to stay
      • Try closing the browser window/tab (you get a popup) - click to stay
      • Refresh the page and this time leave to start afresh
      • Add an additional files using either option
      • From the drop-down menu on a file, choose the Delete option and confirm
      • Refresh the page (you get a popup) - click to stay
      • Hit the back button (you get a popup) - click to stay
      • Try closing the browser window/tab (you get a popup) - click to stay
      Show
      Open the Moodle Login Page Make a change to to the username Hit Refresh The page refreshes Log in to Moodle and navigate to a course Choose Edit Settings Without any changes Refresh the page (the page refreshes) Hit the back button (you go back in time and space) Go back to the Edit Settings Page Try closing the browser window (it closes) Click Save and Display (the form saves) Now make some changes to various fields Go back to the Edit Settings Page Make a change to the 'Course full name' Refresh the page (you get a popup) - click to stay Hit the back button (you get a popup) - click to stay Try closing the browser window/tab (you get a popup) - click to stay Click Save and Display (the form saves) Repeat the above steps using a select instead of 'Course full name' Repeat the above steps using a textarea (not TinyMCE) instead of 'Course full name' Go back to the course and create an Assignment Choose Edit Settings Without any changes Refresh the page to confirm that it refreshes when there have been no changes Make some changes to the TinyMCE editor Refresh the page (you get a popup) - click to stay Hit the back button (you get a popup) - click to stay Try closing the browser window/tab (you get a popup) - click to stay Click Save and Display (the form saves) Uploading files As a Student, choose the 'Upload Files' option Refresh the page to confirm that it refreshes when there have been no changes Upload a file using the 'Add' button and the filepicker Refresh the page (you get a popup) - click to stay Hit the back button (you get a popup) - click to stay Try closing the browser window/tab (you get a popup) - click to stay Refresh the page and this time leave to start afresh Upload a file using the drag/drop functionality (Supported browsers only - Chrome and Firefox) Refresh the page (you get a popup) - click to stay Hit the back button (you get a popup) - click to stay Try closing the browser window/tab (you get a popup) - click to stay Click 'Save Changes' Modify existing files Choose the 'Edit these files' button Refresh the page and this time leave to start afresh From the drop-down on a file, choose the rename option and enter a new name Upload a file using the drag/drop functionality (Supported browsers only - Chrome and Firefox) Refresh the page (you get a popup) - click to stay Hit the back button (you get a popup) - click to stay Try closing the browser window/tab (you get a popup) - click to stay Refresh the page and this time leave to start afresh From the drop-down menu on a file, choose the Delete option and confirm Refresh the page (you get a popup) - click to stay Hit the back button (you get a popup) - click to stay Try closing the browser window/tab (you get a popup) - click to stay Refresh the page and this time leave to start afresh Create a new directory From the drop-down menu on a file, choose the Delete option and confirm Refresh the page (you get a popup) - click to stay Hit the back button (you get a popup) - click to stay Try closing the browser window/tab (you get a popup) - click to stay Refresh the page and this time leave to start afresh Add an additional files using either option From the drop-down menu on a file, choose the Delete option and confirm Refresh the page (you get a popup) - click to stay Hit the back button (you get a popup) - click to stay Try closing the browser window/tab (you get a popup) - click to stay
    • Affected Branches:
      MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-31315-master-6
    • Rank:
      37784

      Description

      We've just had a spate of users who have uploaded files for an assignment, but not clicked the 'Save Changes' button.

      I see two potential aids to prevent this:

      • automatically save (background ajax?) when uploading; and/or
      • window.onbeforeunload to pop up a warning before closing.

      The possibility of autosave is being investigated elsewhere. This patch introduces a warning popup when navigating away from partially filled in forms.

        Issue Links

          Activity

          Andrew Nicols created issue -
          Andrew Nicols made changes -
          Field Original Value New Value
          Assignee moodle.com [ moodle.com ] Andrew Nicols [ dobedobedoh ]
          Stephen Bourget made changes -
          Link This issue has been marked as being related by MDL-24398 [ MDL-24398 ]
          Stephen Bourget made changes -
          Link This issue has been marked as being related by MDL-24390 [ MDL-24390 ]
          Stephen Bourget made changes -
          Link This issue has been marked as being related by MDL-30531 [ MDL-30531 ]
          Petr Škoda made changes -
          Link This issue has a non-specific relationship to MDL-31309 [ MDL-31309 ]
          Michael de Raadt made changes -
          Fix Version/s STABLE backlog [ 10463 ]
          Labels triaged
          Affects Version/s 2.2.1 [ 11456 ]
          Affects Version/s 2.3 [ 10657 ]
          Andrew Nicols made changes -
          Pull Master Diff URL https://git.luns.net.uk/?p=moodle.git;a=commitdiff;h=bfc7b1958af0fe7acec39e45c836bd8beb489485
          Pull Master Branch MDL-31315-master-1
          Testing Instructions Open the Moodle Login Page
          * Make a change to to the username
          * Hit Refresh
          * The page refreshes

          Log in to Moodle and navigate to a course
          * Choose Edit Settings
          h5. Without any changes
          * Refresh the page (the page refreshes)
          * Hit the back button (you go back in time and space)
          * Go back to the Edit Settings Page
          * Try closing the browser window (it closes)
          * Click Save and Display (the form saves)

          h5. Now make some changes to various fields
          * Go back to the Edit Settings Page
          * Make a change to the 'Course full name'
          * Refresh the page (you get a popup) - click to stay
          * Hit the back button (you get a popup) - click to stay
          * Try closing the browser window/tab (you get a popup) - click to stay
          * Click Save and Display (the form saves)

          Repeat the above steps using a select
          Repeat the above steps using a textarea (not TinyMCE)
          Description We've just had a spate of users who have uploaded files for an assignment, but not clicked the 'Save Changes' button.

          I see two potential aids to prevent this:
          * automatically save (background ajax?) when uploading; and/or
          * window.onbeforeunload to pop up a warning before closing
          We've just had a spate of users who have uploaded files for an assignment, but not clicked the 'Save Changes' button.

          I see two potential aids to prevent this:
          * automatically save (background ajax?) when uploading; and/or
          * window.onbeforeunload to pop up a warning before closing.
          Pull from Repository git://git.luns.net.uk/moodle.git
          Andrew Nicols made changes -
          Testing Instructions Open the Moodle Login Page
          * Make a change to to the username
          * Hit Refresh
          * The page refreshes

          Log in to Moodle and navigate to a course
          * Choose Edit Settings
          h5. Without any changes
          * Refresh the page (the page refreshes)
          * Hit the back button (you go back in time and space)
          * Go back to the Edit Settings Page
          * Try closing the browser window (it closes)
          * Click Save and Display (the form saves)

          h5. Now make some changes to various fields
          * Go back to the Edit Settings Page
          * Make a change to the 'Course full name'
          * Refresh the page (you get a popup) - click to stay
          * Hit the back button (you get a popup) - click to stay
          * Try closing the browser window/tab (you get a popup) - click to stay
          * Click Save and Display (the form saves)

          Repeat the above steps using a select
          Repeat the above steps using a textarea (not TinyMCE)
          Open the Moodle Login Page
          * Make a change to to the username
          * Hit Refresh
          * The page refreshes

          Log in to Moodle and navigate to a course
          * Choose Edit Settings

          h5. Without any changes
          * Refresh the page (the page refreshes)
          * Hit the back button (you go back in time and space)
          * Go back to the Edit Settings Page
          * Try closing the browser window (it closes)
          * Click Save and Display (the form saves)

          h5. Now make some changes to various fields
          * Go back to the Edit Settings Page
          * Make a change to the 'Course full name'
          * Refresh the page (you get a popup) - click to stay
          * Hit the back button (you get a popup) - click to stay
          * Try closing the browser window/tab (you get a popup) - click to stay
          * Click Save and Display (the form saves)

          Repeat the above steps using a select instead of 'Course full name'
          Repeat the above steps using a textarea (not TinyMCE) instead of 'Course full name'
          Andrew Nicols made changes -
          Status Open [ 1 ] Waiting for peer review [ 10012 ]
          Andrew Nicols made changes -
          Labels triaged patch triaged
          Component/s Forms Library [ 10091 ]
          Andrew Nicols made changes -
          Summary It's too easy to upload a file for an assignment and then leave the page without saving Warn users before moving away from modified forms
          Andrew Nicols made changes -
          Testing Instructions Open the Moodle Login Page
          * Make a change to to the username
          * Hit Refresh
          * The page refreshes

          Log in to Moodle and navigate to a course
          * Choose Edit Settings

          h5. Without any changes
          * Refresh the page (the page refreshes)
          * Hit the back button (you go back in time and space)
          * Go back to the Edit Settings Page
          * Try closing the browser window (it closes)
          * Click Save and Display (the form saves)

          h5. Now make some changes to various fields
          * Go back to the Edit Settings Page
          * Make a change to the 'Course full name'
          * Refresh the page (you get a popup) - click to stay
          * Hit the back button (you get a popup) - click to stay
          * Try closing the browser window/tab (you get a popup) - click to stay
          * Click Save and Display (the form saves)

          Repeat the above steps using a select instead of 'Course full name'
          Repeat the above steps using a textarea (not TinyMCE) instead of 'Course full name'
          Open the Moodle Login Page
          * Make a change to to the username
          * Hit Refresh
          * The page refreshes

          Log in to Moodle and navigate to a course
          * Choose Edit Settings

          h5. Without any changes
          * Refresh the page (the page refreshes)
          * Hit the back button (you go back in time and space)
          * Go back to the Edit Settings Page
          * Try closing the browser window (it closes)
          * Click Save and Display (the form saves)

          h5. Now make some changes to various fields
          * Go back to the Edit Settings Page
          * Make a change to the 'Course full name'
          * Refresh the page (you get a popup) - click to stay
          * Hit the back button (you get a popup) - click to stay
          * Try closing the browser window/tab (you get a popup) - click to stay
          * Click Save and Display (the form saves)

          Repeat the above steps using a select instead of 'Course full name'
          Repeat the above steps using a textarea (not TinyMCE) instead of 'Course full name'

          h5. Go back to the course and create an Assignment
          * Choose Edit Settings

          h5. Without any changes
          * Refresh the page to confirm that it refreshes when there have been no changes

          h5. Make some changes to the TinyMCE editor
          * Refresh the page (you get a popup) - click to stay
          * Hit the back button (you get a popup) - click to stay
          * Try closing the browser window/tab (you get a popup) - click to stay
          * Click Save and Display (the form saves)

          h5. Uploading files
          * As a Student, choose the 'Upload Files' option
          * Refresh the page to confirm that it refreshes when there have been no changes

          * Upload a file using the 'Add' button and the filepicker
          * Refresh the page (you get a popup) - click to stay
          * Hit the back button (you get a popup) - click to stay
          * Try closing the browser window/tab (you get a popup) - click to stay

          * Refresh the page and this time leave to start afresh
          * Upload a file using the drag/drop functionality (Supported browsers only - Chrome and Firefox)
          * Refresh the page (you get a popup) - click to stay
          * Hit the back button (you get a popup) - click to stay
          * Try closing the browser window/tab (you get a popup) - click to stay

          * Click 'Save Changes'

          h5. Modify existing files
          * Choose the 'Edit these files' button
          * Refresh the page and this time leave to start afresh

          * From the drop-down on a file, choose the rename option and enter a new name
          * Upload a file using the drag/drop functionality (Supported browsers only - Chrome and Firefox)
          * Refresh the page (you get a popup) - click to stay
          * Hit the back button (you get a popup) - click to stay
          * Try closing the browser window/tab (you get a popup) - click to stay

          * Refresh the page and this time leave to start afresh
          * From the drop-down menu on a file, choose the Delete option and confirm
          * Refresh the page (you get a popup) - click to stay
          * Hit the back button (you get a popup) - click to stay
          * Try closing the browser window/tab (you get a popup) - click to stay

          * Refresh the page and this time leave to start afresh
          * Create a new directory
          * From the drop-down menu on a file, choose the Delete option and confirm
          * Refresh the page (you get a popup) - click to stay
          * Hit the back button (you get a popup) - click to stay
          * Try closing the browser window/tab (you get a popup) - click to stay

          * Refresh the page and this time leave to start afresh
          * Add an additional files using either option
          * From the drop-down menu on a file, choose the Delete option and confirm
          * Refresh the page (you get a popup) - click to stay
          * Hit the back button (you get a popup) - click to stay
          * Try closing the browser window/tab (you get a popup) - click to stay
          Andrew Nicols made changes -
          Link This issue has a non-specific relationship to MDL-26969 [ MDL-26969 ]
          Andrew Davis made changes -
          Original Estimate 0 minutes [ 0 ]
          Remaining Estimate 0 minutes [ 0 ]
          Status Waiting for peer review [ 10012 ] Peer review in progress [ 10013 ]
          Peer reviewer andyjdavis
          Andrew Davis made changes -
          Status Peer review in progress [ 10013 ] Development in progress [ 3 ]
          Andrew Nicols made changes -
          Status Development in progress [ 3 ] Waiting for peer review [ 10012 ]
          Andrew Davis made changes -
          Status Waiting for peer review [ 10012 ] Peer review in progress [ 10013 ]
          Andrew Davis made changes -
          Status Peer review in progress [ 10013 ] Development in progress [ 3 ]
          Andrew Nicols made changes -
          Description We've just had a spate of users who have uploaded files for an assignment, but not clicked the 'Save Changes' button.

          I see two potential aids to prevent this:
          * automatically save (background ajax?) when uploading; and/or
          * window.onbeforeunload to pop up a warning before closing.
          We've just had a spate of users who have uploaded files for an assignment, but not clicked the 'Save Changes' button.

          I see two potential aids to prevent this:
          * automatically save (background ajax?) when uploading; and/or
          * window.onbeforeunload to pop up a warning before closing.

          The possibility of autosave is being investigated elsewhere. This patch introduces a warning popup when navigating away from partially filled in forms.
          Andrew Nicols made changes -
          Status Development in progress [ 3 ] Waiting for integration review [ 10010 ]
          Fix Version/s 2.3 [ 10657 ]
          Fix Version/s STABLE backlog [ 10463 ]
          Eloy Lafuente (stronk7) made changes -
          Currently in integration Yes [ 10041 ]
          Sam Hemelryk made changes -
          Status Waiting for integration review [ 10010 ] Integration review in progress [ 10004 ]
          Integrator samhemelryk
          Sam Hemelryk made changes -
          Status Integration review in progress [ 10004 ] Waiting for testing [ 10005 ]
          Adrian Greeve made changes -
          Status Waiting for testing [ 10005 ] Testing in progress [ 10011 ]
          Tester abgreeve
          Adrian Greeve made changes -
          Status Testing in progress [ 10011 ] Problem during testing [ 10007 ]
          Aparup Banerjee made changes -
          Attachment download-file-stay-leave-question.png [ 26878 ]
          Attachment download-stay-leave-2.png [ 26879 ]
          Sam Hemelryk made changes -
          Status Problem during testing [ 10007 ] Integration review in progress [ 10004 ]
          Sam Hemelryk made changes -
          Status Integration review in progress [ 10004 ] Waiting for testing [ 10005 ]
          Sam Hemelryk made changes -
          Status Waiting for testing [ 10005 ] Testing in progress [ 10011 ]
          Adrian Greeve made changes -
          Link This issue testing discovered MDL-31655 [ MDL-31655 ]
          Sam Hemelryk made changes -
          Status Testing in progress [ 10011 ] Tested [ 10006 ]
          Aparup Banerjee made changes -
          Link This issue discovered while testing MDL-31656 [ MDL-31656 ]
          Andrew Nicols made changes -
          Link This issue has been marked as being related by MDL-31660 [ MDL-31660 ]
          Eloy Lafuente (stronk7) made changes -
          Status Tested [ 10006 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Currently in integration Yes [ 10041 ]
          Stephen Bourget made changes -
          Link This issue is duplicated by MDL-24044 [ MDL-24044 ]
          Eloy Lafuente (stronk7) made changes -
          Integration date 17/Feb/12
          Charles Fulton made changes -
          Link This issue has a non-specific relationship to MDL-26902 [ MDL-26902 ]
          Dan Poltawski made changes -
          Link This issue will help resolve MDL-26902 [ MDL-26902 ]

            People

            • Votes:
              11 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: