Project: moodle
Issue MDL-40054: Replace add_to_log with an event trigger - mod_lesson
Replace the add_to_log calls for the following area, with a call to the get_legacy_logdata function in the event class. *mod/lesson (9 calls)* /mod/lesson/index.php:42: add_to_log($course->id, "lesson", "view all", "index.php?id=$course->id", ""); /mod/lesson/essay.php:133: add_to_log($course->id, 'lesson', 'update grade', "essay.php?id=$cm->id", $lesson->name, $cm->id); /mod/lesson/essay.php:247: add_to_log($course->id, 'lesson', 'update email essay grade', "essay.php?id=$cm->id", format_string($pages[$attempt->pageid]->title,true).': '.fullname($users[$attempt->userid]), $cm->id); /mod/lesson/essay.php:303: add_to_log($course->id, 'lesson', 'view grade', "essay.php?id=$cm->id", get_string('manualgrading', 'lesson'), $cm->id); /mod/lesson/highscores.php:149: add_to_log($course->id, 'lesson', 'update highscores', "highscores.php?id=$cm->id", $name, $cm->id); /mod/lesson/highscores.php:160: add_to_log($course->id, 'lesson', 'view highscores', "highscores.php?id=$cm->id", $lesson->name, $cm->id); /mod/lesson/view.php:182: add_to_log($course->id, 'lesson', 'start', 'view.php?id='. $cm->id, $lesson->id, $cm->id); /mod/lesson/view.php:286: add_to_log($PAGE->course->id, 'lesson', 'view', 'view.php?id='. $PAGE->cm->id, $page->id, $PAGE->cm->id); /mod/lesson/view.php:417: add_to_log($course->id, "lesson", "end", "view.php?id=".$PAGE->cm->id, "$lesson->id", $PAGE->cm->id);
Story points: 40