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

Delete function discrepancy when deleting course modules

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.7
    • Fix Version/s: None
    • Component/s: Course
    • Labels:
    • Affected Branches:
      MOODLE_37_STABLE

      Description

      Found this while handling MDL-65803.
      There is a discrepancy between how the course_delete_module and remove_course_contents functions behave, specifically when the latter handles deletion of course modules. For instance, if you call 'delete_course' which calls 'remove_course_contents', it doesn't trigger the 'pre_course_module_delete' callback

      Steps to reproduce:

      • Debug the updated unit test 'test_get_recent_items' from the related issue
      • Put a breakpoint in the 'block_recentlyaccesseditems_pre_course_module_delete'
      • Confirm the breakpoint doesn't get hit

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              peterdias Peter Dias
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: