Project: moodle
Issue MDL-40909: Replace add_to_log with an event trigger - enrol
Replace the add_to_log calls for the following area, with a call to the get_legacy_logdata function in the event class. *enrol* /enrol/paypal/unenrolself.php:52: add_to_log($course->id, 'course', 'unenrol', '../enrol/users.php?id='.$course->id, $course->id); //there should be userid somewhere! /enrol/self/unenrolself.php:52: add_to_log($course->id, 'course', 'unenrol', '../enrol/users.php?id='.$course->id, $course->id); //TODO: there should be userid somewhere! /enrol/manual/unenrolself.php:52: add_to_log($course->id, 'course', 'unenrol', '../enrol/users.php?id='.$course->id, $course->id); //TODO: there should be userid somewhere! /enrol/manual/manage.php:142: add_to_log($course->id, 'course', 'unenrol', '../enrol/users.php?id='.$course->id, $course->id); //there should be userid somewhere! /enrol/manual/manage.php:126: add_to_log($course->id, 'course', 'enrol', '../enrol/users.php?id='.$course->id, $course->id); //there should be userid somewhere! /enrol/self/lib.php:198: add_to_log($instance->courseid, 'course', 'enrol', '../enrol/users.php?id='.$instance->courseid, $instance->courseid); /enrol/imsenterprise/lib.php:440: add_to_log(SITEID, "course", "new", "view.php?id=$course->id", "$course->fullname (ID $course->id)");
Story points: 20