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

Delete Course Button can be clicked twice

XMLWordPrintable

    • MOODLE_400_STABLE
    • MOODLE_401_STABLE, MOODLE_402_STABLE
    • MDL-76937-401
    • Hide
      1. As an admin
      2. Go to Site administration / Development / Make test course
      3. Generate a M or L test course called Test Big Course
      4. Go to Site administration / Courses / Manage courses and categories
      5. Click on the delete icon next to Test Big Course
      6. On the Confirm dialog, click Delete
      7. Ensure that there is a message "Deleting Test Big Course" with a spinner next to it
      8. Ensure that the Delete and Cancel buttons have disappeared
      9. Ensure that the course is deleted.
      Show
      As an admin Go to Site administration / Development / Make test course Generate a M or L test course called Test Big Course Go to Site administration / Courses / Manage courses and categories Click on the delete icon next to Test Big Course On the Confirm dialog, click Delete Ensure that there is a message "Deleting Test Big Course" with a spinner next to it Ensure that the Delete and Cancel buttons have disappeared Ensure that the course is deleted.
    • 1
    • HQ 2023 Sprint I4.1 Moppies

      When deleting a course, you click the delete button, and then get an "Are you sure" page with a further Delete button and a Cancel button. When you click that further Delete button, the deletion starts, but nothing changes on the page until the deletion has finished - which can take quite a bit of time. 

      During that time, you can click the Delete button a second time, which starts a second copy of the deletion process. This can then result in either (a) The first process deleting the course completely but the second one failing because things it wants to delete are no longer there (and it's the result of the second one that the user sees), or (b) the two deletion processes interfering with each other and both failing, leaving the course in a broken state.

      It's easy to do this - because the Delete button is still on the page a while after you clicked it, it is easy to think that you must have failed to click it, and hence click it again instinctively.

      In order to stop this being possible, the Delete confirmation button needs to be disabled/hidden/etc as soon as it is clicked the first time. It also needs to be visibly different, so the user knows they've clicked it.

      Bug seen on version 3.11.11, but have checked Github to confirm no changes to source files between this and 3.11.12.

        1. (1) 1 Passed -- (Master)MDL-76937.png
          17 kB
          Kim Jared Lucas
        2. (1) 2 Passed -- (Master)MDL-76937.png
          37 kB
          Kim Jared Lucas
        3. image-2023-09-04-16-27-38-437.png
          18 kB
          Laurent David
        4. image-2023-09-04-16-28-48-468.png
          17 kB
          Laurent David
        5. image-2023-09-15-10-22-31-179.png
          6 kB
          Laurent David
        6. MDL-76937_Deleting course.webm
          2.33 MB
          Mikel Martín Corrales
        7. screencast-mdk.MDL-76937.webm
          8.84 MB
          Laurent David

            laurent.david@moodle.com Laurent David
            DavidNorman99 David Norman
            Mikel Martín Corrales Mikel Martín Corrales
            Ferran Recio Ferran Recio
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            5 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 5 hours, 26 minutes
                1d 5h 26m

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