Project: moodle
Issue MDL-40061: Replace add_to_log with an event trigger - mod_data
Replace the add_to_log calls for the following area, with a call to the get_legacy_logdata function in the event class. *mod/data (9 calls)* /mod/data/templates.php:76: add_to_log($course->id, 'data', 'templates view', "templates.php?id=$cm->id&d=$data->id", $data->id, $cm->id); /mod/data/templates.php:141: add_to_log($course->id, 'data', 'templates saved', "templates.php?id=$cm->id&d=$data->id", $data->id, $cm->id); /mod/data/index.php:42: add_to_log($course->id, "data", "view all", "index.php?id=$course->id", ""); /mod/data/field.php:124: add_to_log($course->id, 'data', 'fields add', /mod/data/field.php:166: add_to_log($course->id, 'data', 'fields update', /mod/data/field.php:197: add_to_log($course->id, 'data', 'fields delete', /mod/data/edit.php:189: add_to_log($course->id, 'data', 'update', "view.php?d=$data->id&rid=$rid", $data->id, $cm->id); /mod/data/edit.php:239: add_to_log($course->id, 'data', 'add', "view.php?d=$data->id&rid=$recordid", $data->id, $cm->id); /mod/data/view.php:255: add_to_log($course->id, 'data', 'view', "view.php?id=$cm->id", $data->id, $cm->id); /mod/data/view.php:377: add_to_log($course->id, 'data', 'record delete', "view.php?id=$cm->id", $data->id, $cm->id); Please also check /mod/data/lib.php data_delete_record() add_to_log call (if MDL-40871 is integrated) add_to_log($courseid, 'data', 'record delete', "view.php?id=$cmid", $data->id, $cmid);
Story points: 40