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

Child course tries to identify deleted meta course, resulting in an error

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.5.1
    • 2.4.7, 2.5.3
    • Enrolments
    • MOODLE_25_STABLE
    • MOODLE_24_STABLE, MOODLE_25_STABLE
    • wip-mdl-41590
    • Hide
      1. Log in as admin
      2. Enable the Meta course sync enrolment plugin at Site admin > Plugins > Enrolment > Manage enrol plugins
      3. Create a new course with no enrolments
      4. Enable Meta course sync enrolments for the course at Course admin > Users > Enrolment methods
      5. Link the course to a parent (meta) course with users already enrolled
      6. Check the list of enrolments in the child course at Site admin > Users > Enrolled users
      7. Delete the parent course at Site admin > Courses > Add/edit courses > (category)
      8. Check the list of enrolments in the child course again
      9. Check the enabled enrolment methods at Course admin > Users > Enrolment methods
      10. No notice or warning should appear.
      11. Enrolment details should show id of deleted course.
      Show
      Log in as admin Enable the Meta course sync enrolment plugin at Site admin > Plugins > Enrolment > Manage enrol plugins Create a new course with no enrolments Enable Meta course sync enrolments for the course at Course admin > Users > Enrolment methods Link the course to a parent (meta) course with users already enrolled Check the list of enrolments in the child course at Site admin > Users > Enrolled users Delete the parent course at Site admin > Courses > Add/edit courses > (category) Check the list of enrolments in the child course again Check the enabled enrolment methods at Course admin > Users > Enrolment methods No notice or warning should appear. Enrolment details should show id of deleted course.
    • BACKEND Sprint 4

    Description

      Using the Meta course sync enrolment method, if a parent course is deleted, the enrolments in the child course remain, but are disabled and roles are removed (under default settings).

      The problem is that, even when the enrolment is disabled, when the list of enrolments is shown it attempts to include the name of the (now deleted) parent course, and fails, resulting in an error...

      Notice: Trying to get property of non-object in D:\xampp\htdocs\master_integration\lib\moodlelib.php on line 9487
      

      This error also appears on the page showing the enrolment methods (Course admin > Users > Enrolment methods).

      There should probably be a check in both places before including the name of the parent course.

      There is no way to link the child course to another course without deleting the Meta course sync enrolment method and then adding it again.

      Replication steps:

      1. Log in as admin
      2. Enable the Meta course sync enrolment plugin at Site admin > Plugins > Enrolment > Manage enrol plugins
      3. Create a new course with no enrolments
      4. Enable Meta course sync enrolments for the course at Course admin > Users > Enrolment methods
      5. Link the course to a parent (meta) course with users already enrolled
      6. Check the list of enrolments in the child course at Site admin > Users > Enrolled users
      7. Delete the parent course at Site admin > Courses > Add/edit courses > (category)
      8. Check the list of enrolments in the child course again
      9. Check the enabled enrolment methods at Course admin > Users > Enrolment methods

      Expected result: Details of the recently delete parent course will not be shown

      Actual result: No details are shown, but the page tries to show the name of the parent course and ends up producing an error.

      Attachments

        Issue Links

          Activity

            People

              rajeshtaneja Rajesh Taneja
              salvetore Michael de Raadt
              Petr Skoda Petr Skoda
              Sam Hemelryk Sam Hemelryk
              Adrian Greeve Adrian Greeve
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                11/Nov/13