Project: moodle
Issue MDL-40043: Replace add_to_log with an event trigger - course
Replace the add_to_log calls in the following directories, with new events which contains the same information: *Course* /course/recent.php:41: add_to_log($course->id, "course", "recent", "recent.php?id=$course->id", $course->id); /course/delete.php:68: add_to_log(SITEID, "course", "delete", "view.php?id=$course->id", "$course->fullname (ID $course->id)"); /course/manage.php:252: add_to_log($course->id, "course", ($visible ? 'show' : 'hide'), "edit.php?id=$course->id", $course->id); /course/manage.php:280: add_to_log($movecourse->id, "course", "move", "edit.php?id=$movecourse->id", $movecourse->id); /course/lib.php:2041: add_to_log($course->id, "course", "move", "edit.php?id=$course->id", $course->id); /course/lib.php:2291: add_to_log(SITEID, 'course', 'new', 'view.php?id='.$course->id, $data->fullname.' (ID '.$course->id.')'); /course/lib.php:2380: add_to_log($course->id, "course", "update", "edit.php?id=$course->id", $course->id); /course/user.php:108: add_to_log($course->id, "course", "user report", "user.php?id=$course->id&user=$user->id&mode=$mode", "$user->id"); /course/editsection.php:72: add_to_log($course->id, "course", "editsection", "editsection.php?id=$id", "$sectionnum"); /course/view.php:117: add_to_log($course->id, 'course', $loglabel, "view.php?". $logparam, $infoid); /course/loginas.php:70: add_to_log($course->id, "course", "loginas", "../user/view.php?id=$course->id&user=$userid", "$oldfullname -> $newfullname"); /index.php:79: add_to_log(SITEID, 'course', 'view', 'view.php?id='.SITEID, SITEID);
Story points: 20