Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
|
This class is one varying singleton that, for all the logs corresponding to one task, is in charge of storing all its restore_log_rule rules, dispatching to the correct one and insert/log the resulting information. More...
Public Member Functions | |
process_log_record ($log) | |
Static Public Member Functions | |
static | get_instance ($task, $values) |
static | register_log_rules_for_course () |
Adds all the activity restore_log_rule rules defined in activity task but corresponding to log records at course level (cmid = 0). | |
This class is one varying singleton that, for all the logs corresponding to one task, is in charge of storing all its restore_log_rule rules, dispatching to the correct one and insert/log the resulting information.
Each time the task getting the instance changes, the rules are completely reloaded with the ones in the new task. And all rules are informed with new fixed values if explicity set.
This class adopts the singleton pattern to be able to provide some persistency of rules along the restore of all the logs corresponding to one restore_task