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

Rewrite Form Change Checker in ES6

XMLWordPrintable

    • MOODLE_311_STABLE, MOODLE_400_STABLE
    • MOODLE_400_STABLE
    • MDL-69918-master
    • Hide

      These testing instructions are mostly a smoke test. It would be impossible to test every form, but these represent a sample.

      Admin settings

      1. Log in as admin
      2. Navigate to Site administration -> Plugins -> Activity modules -> URL
      3. Refresh the page
        1. Confirm that you weren't shown a warning about form changes
      4. For each of the following, change the value and without clicking off the element, refresh the page (please ensure that you do reload the page between each test):
        1. Frame height
        2. Include role names in parameters
        3. Available display options
        4. Display
        5. Confirm that you were shown a warning about form changes
          Note: The Password unmask field type does not currently fully support the Form change checker
          That is covered by a separate bug (MDL-71046)

      Feedback activity

      1. Create a new feedback activity
      2. Click on "Edit questions"
      3. Under 'Add question', choose "Short text answer"
        1. Confirm that you weren't shown a warning about form changes
      4. Fill in the form but do not press "Save question"
      5. Press the Refresh button
        1. Confirm that you were shown a warning about form changes
      6. Click cancel to stay on the page
      7. Click on "Dashboard" in the menu
        1. Confirm that you were shown a warning about form changes
      8. Click cancel to stay on the page
      9. Click on "Dashboard" again in the menu
      10. Confirm that you do want to leave the page
        1. Confirm that you were moved away

      Editor autosave

      1. Login as a teacher/admin
      2. Navigate to a course
      3. From the dropdown menu, choose "Edit settings" for the course
      4. In the "Course summary" enter some text
        Note: This should be an Atto editor. If it is not, you may need to change he Text format to HTML and then save changes, then edit the course settings again
      5. Wait for about 30 seconds until a notice underneath the editor states "Draft saved."
      6. Press the Refresh button on the page (confirm that you want to leave)
        1. Confirm that the value you had stored in the editor is restored
      7. Press the Refresh button on the page
        1. Confirm that you weren't shown a warning about form changes

      Data privacy

      1. Login as admin
      2. Navigate to Site administration -> Users -> Privacy and policies -> Data registry
      3. Press the "+" button for a Category to create a new category
      4. Type in a name
      5. Press the Refresh button on the page
        1. Confirm that you were shown a warning about form changes
      6. Press the cancel button in the prompt to stay on the page
      7. Press the cancel button in the modal to cancel adding a new Category
      8. Press the Refresh button on the page
        1. Confirm that you weren't shown a warning about form changes
      9. Press the "+" button for a Category to create a new category
      10. Type in a name
      11. Save changes
      12. Press the Refresh button on the page
        1. Confirm that you weren't shown a warning about form changes
      13. Press the "+" button for a Purpose to create a new Purpose
      14. Type in a namee
      15. Press the Refresh button on the page
        1. Confirm that you were shown a warning about form changes
      16. Press the cancel button in the prompt to stay on the page
      17. Press the cancel button in the modal to cancel adding a new Purpose
      18. Press the Refresh button on the page
        1. Confirm that you weren't shown a warning about form changes
      19. Press the "+" button for a Purpose to create a new Purpose
      20. Type in a name and select a lawful base
      21. Save changes
      22. Press the Refresh button on the page
        1. Confirm that you weren't shown a warning about form changes
      23. Add an additional Category and Purpose
      24. From the "Site" page:
        1. Select a different category and purpose but do not save changes
      25. Refresh the page
        1. Confirm that you were shown a warning about form changes

      Data policy

      1. Login as admin
      2. Navigate to Site administration -> Users -> Privacy and policies -> Policy settings
      3. Set "Site policy handler" to "Policies (tool_policy)"
      4. Save changes
      5. Navigate to Site administration -> Users -> Privacy and policies -> Manage policies
      6. Create a new policy:
        1. Name: MDL-69918
        2. Summary: Lorem ipsum
        3. Full policy: Lorem ipsum
        4. Policy status: Active
      7. Press Save
      8. Click on the "0 of x (0%)" link to view the list of users who have accepted it
      9. Press "Accept" for a user
      10. Type in a remark
      11. Press the Refresh button on the page
        1. Confirm that you were shown a warning about form changes
      12. Press the cancel button in the prompt to stay on the page
      13. Press the cancel button in the modal to close the modal without aggreeing
      14. Press the Refresh button on the page
        1. Confirm that you weren't shown a warning about form changes
      15. Press "Accept" for a user
      16. Type in a remark
      17. Save changes
      18. Press the Refresh button on the page
        1. Confirm that you weren't shown a warning about form changes

      Course completion

      1. Login as an admin/teacher
      2. Create or open a course
      3. Edit course settings
      4. Set Completion tracking -> Enable completion tracking to "Yes"
      5. Save changes
      6. From the course cog menu, choose "Course completion"
      7. At the top click on the "Bulk edit activity completion" tab
      8. Press the Refresh button on the page
        1. Confirm that you weren't shown a warning about form changes
      9. Click on at least one checkbox (one/many/all)
      10. Press the Refresh button on the page
        1. Confirm that you were shown a warning about form changes
      11. At the top click on the "Default activity completion" tab
      12. Press the Refresh button on the page
        1. Confirm that you weren't shown a warning about form changes
      13. Click on at least one checkbox (one/many/all)
      14. Press the Refresh button on the page
        1. Confirm that you were shown a warning about form changes
      15. Press cancel to remain on the page
      16. Press the "Edit" button
        1. Confirm that the edit page was shown instead
        2. Confirm that you weren't shown a warning about form changes

      Grade setup

      1. Login as an admin/teacher
      2. Create a course or take an existing course
      3. Create an assignment
      4. Choose Grades in the left-hand menu
      5. Choose Setup
      6. Press the Refresh button on the page
        1. Confirm that you weren't shown a warning about form changes
      7. Click on at least one checkbox (one/many/all)
      8. Press the Refresh button on the page
        1. Confirm that you were shown a warning about form changes
      9. Choose the "View" tab"
      10. Turn editing on
      11. Press the Refresh button on the page
        1. Confirm that you weren't shown a warning about form changes
      12. Enter a value for one user but do not save changes
      13. Press the Refresh button on the page
        1. Confirm that you were shown a warning about form changes
      14. Press cancel to remain on the page
      15. Press the save changes button
        1. Confirm that the page refreshed
        2. Confirm that you weren't shown a warning about form changes

      Autocompletion

      1. Login as an admin/teacher and navigate to a course
      2. Edit the course settings
      3. Expand the "Tags" section
      4. Type a value into the "Tags":
        1. DO NOT click away, press enter, etc.
      5. Press the Refresh button (Ctrl+R, F5, etc)
        1. Confirm that you were shown a warning about form changes
      6. Press cancel to remain on the page
      7. Add the new tag
      8. Press the save changes button
        1. Confirm that you weren't shown a warning about form changes

      Private files

      1. From the drawer navigation on the left choose "Private files"
      2. Upload a file
      3. Press the Refresh button (Ctrl+R, F5, etc)
        1. Confirm that you were shown a warning about form changes
      4. Press cancel to remain on the page
      5. Press the save changes button
        1. Confirm that you weren't shown a warning about form changes
      6. Open your user Dashboard
      7. Choose "Manage private files"
      8. Upload a file
      9. Press the Refresh button (Ctrl+R, F5, etc)
        1. Confirm that you were shown a warning about form changes
      10. Press cancel to remain on the page
      11. Close the Manage private files dialogue
      12. Press the Refresh button (Ctrl+R, F5, etc)
        1. Confirm that you weren't shown a warning about form changes
      13. Choose "Manage private files"
      14. Upload a file
      15. Save changes
        1. Confirm that you weren't shown a warning about form changes
      16. Press the Refresh button (Ctrl+R, F5, etc)
        1. Confirm that you weren't shown a warning about form changes

      File manager

      1. Login as an admin/teacher
      2. Navigate to a course
      3. From the cog, choose "Edit settings"
      4. Upload an image to "Course image"
      5. Press the Refresh button (Ctrl+R, F5, etc)
        1. Confirm that you were shown a warning about form changes
      6. Press "Save and display"
        1. Confirm that you weren't shown a warning about form changes
      7. Edit the course settings again
      8. Delete the file from the course image
      9. Press the Refresh button (Ctrl+R, F5, etc)
        1. Confirm that you were shown a warning about form changes
      10. Press cancel to remain on the page
      11. Press "Save and display"
        1. Confirm that you weren't shown a warning about form changes

      Assignment grading

      1. Login as an admin/teacher
      2. Create a course or take an existing course and enrol some users
      3. Create an assignment
      4. Open the assignment and press "Grade users"
      5. Enter a grade, or some feedback
      6. Press the Refresh button (Ctrl+R, F5, etc)
        1. Confirm that you were shown a warning about form changes
      7. Press cancel to remain on the page
      8. Save changes
        1. Confirm that you weren't shown a warning about form changes
      9. Press the Refresh button (Ctrl+R, F5, etc)
        1. Confirm that you weren't shown a warning about form changes

      Relative dates

      1. Navigate to Site administration -> Development -> Experimental -> Experimental settings
      2. Enable course relative dates and save changes
      3. Navigate to Site administration -> Courses -> Add a new course
      4. Create a new course and set:
        1. Course full name: MDL-69918
        2. Course shortname: MDL-69918
        3. Relative dates mode: Yes
        4. Course start date: 1st March 2021 00:00
        5. Course end date: 1st March 2022 00:00
      5. Enrol some users in the course
      6. Create a new assignment
      7. View the assignment
      8. From the cog menu choose "User overrides"
      9. Choose a user
        1. Confirm that you weren't shown a warning about form changes
      10. Change the "Allow submissions from" date
      11. Press the Refresh button (Ctrl+R, F5, etc)
        1. Confirm that you were shown a warning about form changes
      12. Press cancel to remain on the page
      13. Save changes
        1. Confirm that you weren't shown a warning about form changes

      Forum

      1. Login as a teacher or admin
      2. Navigate to a course
      3. Create a forum
      4. Create a new discussion
      5. View the discussion
      6. Click on the "Reply" button
      7. Press the Refresh button (Ctrl+R, F5, etc)
        1. Confirm that you weren't shown a warning about form changes
      8. Click on the "Reply" button
      9. Enter a value but do not click "Post to forum"
      10. Press the Refresh button (Ctrl+R, F5, etc)
        1. Confirm that you were shown a warning about form changes
      11. Press cancel to remain on the page
      12. Post to the forum
        1. Confirm that you weren't shown a warning about form changes
      13. Open the user menu and choose "Preferences"
      14. Choose "Forum preferences"
      15. Set the value "Use experimental nested discussion view" to "Yes"
      16. Save changes
      17. Repeat the steps 5 - 12 with the new format

      Forum Part 2

      After completing the previous section:

      1. Open the forum to the discussion list
      2. From the forum cog menu choose "Forum summary report"
      3. Press the Refresh button (Ctrl+R, F5, etc)
        1. Confirm that you weren't shown a warning about form changes
      4. Press the "Dates" button
      5. Press the Refresh button (Ctrl+R, F5, etc)
        1. Confirm that you weren't shown a warning about form changes
      6. Press the "Dates" button
      7. Toggle one of the "Enable" checkboxes
      8. Press the Refresh button (Ctrl+R, F5, etc)
        1. Confirm that you were shown a warning about form changes

      Quiz

      1. Create a new quiz:
        1. Set a time limit of 30 seconds
      2. Create a question in the quiz
      3. Attempt the quiz
      4. Press the Refresh button (Ctrl+R, F5, etc)
        1. Confirm that you weren't shown a warning about form changes
      5. Choose a value for the question, but do not save it
      6. Press the Refresh button (Ctrl+R, F5, etc)
        1. Confirm that you were shown a warning about form changes
      7. Press cancel to remain on the page
      8. Wait 30 seconds for the quiz to time out
        1. Confirm that you weren't shown a warning about form changes
        2. Confirm that you were redirected to the review page
      9. Attempt the quiz again
      10. Select a value
      11. Submit your attempt
        1. Confirm that you weren't shown a warning about form changes
      Show
      These testing instructions are mostly a smoke test. It would be impossible to test every form, but these represent a sample. Admin settings Log in as admin Navigate to Site administration -> Plugins -> Activity modules -> URL Refresh the page Confirm that you weren't shown a warning about form changes For each of the following, change the value and without clicking off the element, refresh the page (please ensure that you do reload the page between each test): Frame height Include role names in parameters Available display options Display Confirm that you were shown a warning about form changes Note: The Password unmask field type does not currently fully support the Form change checker That is covered by a separate bug ( MDL-71046 ) Feedback activity Create a new feedback activity Click on "Edit questions" Under 'Add question', choose "Short text answer" Confirm that you weren't shown a warning about form changes Fill in the form but do not press "Save question" Press the Refresh button Confirm that you were shown a warning about form changes Click cancel to stay on the page Click on "Dashboard" in the menu Confirm that you were shown a warning about form changes Click cancel to stay on the page Click on "Dashboard" again in the menu Confirm that you do want to leave the page Confirm that you were moved away Editor autosave Login as a teacher/admin Navigate to a course From the dropdown menu, choose "Edit settings" for the course In the "Course summary" enter some text Note: This should be an Atto editor. If it is not, you may need to change he Text format to HTML and then save changes, then edit the course settings again Wait for about 30 seconds until a notice underneath the editor states "Draft saved." Press the Refresh button on the page (confirm that you want to leave) Confirm that the value you had stored in the editor is restored Press the Refresh button on the page Confirm that you weren't shown a warning about form changes Data privacy Login as admin Navigate to Site administration -> Users -> Privacy and policies -> Data registry Press the "+" button for a Category to create a new category Type in a name Press the Refresh button on the page Confirm that you were shown a warning about form changes Press the cancel button in the prompt to stay on the page Press the cancel button in the modal to cancel adding a new Category Press the Refresh button on the page Confirm that you weren't shown a warning about form changes Press the "+" button for a Category to create a new category Type in a name Save changes Press the Refresh button on the page Confirm that you weren't shown a warning about form changes Press the "+" button for a Purpose to create a new Purpose Type in a namee Press the Refresh button on the page Confirm that you were shown a warning about form changes Press the cancel button in the prompt to stay on the page Press the cancel button in the modal to cancel adding a new Purpose Press the Refresh button on the page Confirm that you weren't shown a warning about form changes Press the "+" button for a Purpose to create a new Purpose Type in a name and select a lawful base Save changes Press the Refresh button on the page Confirm that you weren't shown a warning about form changes Add an additional Category and Purpose From the "Site" page: Select a different category and purpose but do not save changes Refresh the page Confirm that you were shown a warning about form changes Data policy Login as admin Navigate to Site administration -> Users -> Privacy and policies -> Policy settings Set "Site policy handler" to "Policies (tool_policy)" Save changes Navigate to Site administration -> Users -> Privacy and policies -> Manage policies Create a new policy: Name: MDL-69918 Summary: Lorem ipsum Full policy: Lorem ipsum Policy status: Active Press Save Click on the "0 of x (0%)" link to view the list of users who have accepted it Press "Accept" for a user Type in a remark Press the Refresh button on the page Confirm that you were shown a warning about form changes Press the cancel button in the prompt to stay on the page Press the cancel button in the modal to close the modal without aggreeing Press the Refresh button on the page Confirm that you weren't shown a warning about form changes Press "Accept" for a user Type in a remark Save changes Press the Refresh button on the page Confirm that you weren't shown a warning about form changes Course completion Login as an admin/teacher Create or open a course Edit course settings Set Completion tracking -> Enable completion tracking to "Yes" Save changes From the course cog menu, choose "Course completion" At the top click on the "Bulk edit activity completion" tab Press the Refresh button on the page Confirm that you weren't shown a warning about form changes Click on at least one checkbox (one/many/all) Press the Refresh button on the page Confirm that you were shown a warning about form changes At the top click on the "Default activity completion" tab Press the Refresh button on the page Confirm that you weren't shown a warning about form changes Click on at least one checkbox (one/many/all) Press the Refresh button on the page Confirm that you were shown a warning about form changes Press cancel to remain on the page Press the "Edit" button Confirm that the edit page was shown instead Confirm that you weren't shown a warning about form changes Grade setup Login as an admin/teacher Create a course or take an existing course Create an assignment Choose Grades in the left-hand menu Choose Setup Press the Refresh button on the page Confirm that you weren't shown a warning about form changes Click on at least one checkbox (one/many/all) Press the Refresh button on the page Confirm that you were shown a warning about form changes Choose the "View" tab" Turn editing on Press the Refresh button on the page Confirm that you weren't shown a warning about form changes Enter a value for one user but do not save changes Press the Refresh button on the page Confirm that you were shown a warning about form changes Press cancel to remain on the page Press the save changes button Confirm that the page refreshed Confirm that you weren't shown a warning about form changes Autocompletion Login as an admin/teacher and navigate to a course Edit the course settings Expand the "Tags" section Type a value into the "Tags": DO NOT click away, press enter, etc. Press the Refresh button (Ctrl+R, F5, etc) Confirm that you were shown a warning about form changes Press cancel to remain on the page Add the new tag Press the save changes button Confirm that you weren't shown a warning about form changes Private files From the drawer navigation on the left choose "Private files" Upload a file Press the Refresh button (Ctrl+R, F5, etc) Confirm that you were shown a warning about form changes Press cancel to remain on the page Press the save changes button Confirm that you weren't shown a warning about form changes Open your user Dashboard Choose "Manage private files" Upload a file Press the Refresh button (Ctrl+R, F5, etc) Confirm that you were shown a warning about form changes Press cancel to remain on the page Close the Manage private files dialogue Press the Refresh button (Ctrl+R, F5, etc) Confirm that you weren't shown a warning about form changes Choose "Manage private files" Upload a file Save changes Confirm that you weren't shown a warning about form changes Press the Refresh button (Ctrl+R, F5, etc) Confirm that you weren't shown a warning about form changes File manager Login as an admin/teacher Navigate to a course From the cog, choose "Edit settings" Upload an image to "Course image" Press the Refresh button (Ctrl+R, F5, etc) Confirm that you were shown a warning about form changes Press "Save and display" Confirm that you weren't shown a warning about form changes Edit the course settings again Delete the file from the course image Press the Refresh button (Ctrl+R, F5, etc) Confirm that you were shown a warning about form changes Press cancel to remain on the page Press "Save and display" Confirm that you weren't shown a warning about form changes Assignment grading Login as an admin/teacher Create a course or take an existing course and enrol some users Create an assignment Open the assignment and press "Grade users" Enter a grade, or some feedback Press the Refresh button (Ctrl+R, F5, etc) Confirm that you were shown a warning about form changes Press cancel to remain on the page Save changes Confirm that you weren't shown a warning about form changes Press the Refresh button (Ctrl+R, F5, etc) Confirm that you weren't shown a warning about form changes Relative dates Navigate to Site administration -> Development -> Experimental -> Experimental settings Enable course relative dates and save changes Navigate to Site administration -> Courses -> Add a new course Create a new course and set: Course full name: MDL-69918 Course shortname: MDL-69918 Relative dates mode: Yes Course start date: 1st March 2021 00:00 Course end date: 1st March 2022 00:00 Enrol some users in the course Create a new assignment View the assignment From the cog menu choose "User overrides" Choose a user Confirm that you weren't shown a warning about form changes Change the "Allow submissions from" date Press the Refresh button (Ctrl+R, F5, etc) Confirm that you were shown a warning about form changes Press cancel to remain on the page Save changes Confirm that you weren't shown a warning about form changes Forum Login as a teacher or admin Navigate to a course Create a forum Create a new discussion View the discussion Click on the "Reply" button Press the Refresh button (Ctrl+R, F5, etc) Confirm that you weren't shown a warning about form changes Click on the "Reply" button Enter a value but do not click "Post to forum" Press the Refresh button (Ctrl+R, F5, etc) Confirm that you were shown a warning about form changes Press cancel to remain on the page Post to the forum Confirm that you weren't shown a warning about form changes Open the user menu and choose "Preferences" Choose "Forum preferences" Set the value "Use experimental nested discussion view" to "Yes" Save changes Repeat the steps 5 - 12 with the new format Forum Part 2 After completing the previous section: Open the forum to the discussion list From the forum cog menu choose "Forum summary report" Press the Refresh button (Ctrl+R, F5, etc) Confirm that you weren't shown a warning about form changes Press the "Dates" button Press the Refresh button (Ctrl+R, F5, etc) Confirm that you weren't shown a warning about form changes Press the "Dates" button Toggle one of the "Enable" checkboxes Press the Refresh button (Ctrl+R, F5, etc) Confirm that you were shown a warning about form changes Quiz Create a new quiz: Set a time limit of 30 seconds Create a question in the quiz Attempt the quiz Press the Refresh button (Ctrl+R, F5, etc) Confirm that you weren't shown a warning about form changes Choose a value for the question, but do not save it Press the Refresh button (Ctrl+R, F5, etc) Confirm that you were shown a warning about form changes Press cancel to remain on the page Wait 30 seconds for the quiz to time out Confirm that you weren't shown a warning about form changes Confirm that you were redirected to the review page Attempt the quiz again Select a value Submit your attempt Confirm that you weren't shown a warning about form changes
    • 0
    • Internationals - 3.11 Sprint 7, Internationals - 3.11 Sprint 8, Internationals - 3.11 Sprint 9, Internationals - 4.0 Sprint 1, HQ Team International Sprint 2

      The Change Checker was written many years ago for YUI, but we should update it to use an ES6 module and provide a b/c layer as we move over.

        1. iShot2021-04-19 10.55.06.mov
          9.88 MB
        2. MDL-69918_Screenshot1.png
          MDL-69918_Screenshot1.png
          833 kB
        3. MDL-69918_Screenshot2.png
          MDL-69918_Screenshot2.png
          698 kB
        4. MDL-69918_Screenshot3.png
          MDL-69918_Screenshot3.png
          665 kB
        5. MDL-69918_Screenshot4.png
          MDL-69918_Screenshot4.png
          1.10 MB
        6. MDL-69918_Screenshot5.png
          MDL-69918_Screenshot5.png
          829 kB
        7. MDL-69918_Screenshot6.png
          MDL-69918_Screenshot6.png
          467 kB
        8. MDL-69918_Screenshot7.png
          MDL-69918_Screenshot7.png
          624 kB

            dobedobedoh Andrew Lyons
            dobedobedoh Andrew Lyons
            Dongsheng Cai Dongsheng Cai
            Victor Déniz Falcón Victor Déniz Falcón
            Gladys Basiana Gladys Basiana
            Votes:
            3 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 days, 5 hours, 30 minutes
                3d 5h 30m

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