Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-44370 calendar: Add support for restoring calendar log rules

  • Loading branch information...
commit 1d6c74a0c8cba92ec54370cedd322b3e755de6ba 1 parent a6b1963
@ankitagarwal ankitagarwal authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 backup/moodle2/restore_final_task.class.php
7 backup/moodle2/restore_final_task.class.php
@@ -162,7 +162,12 @@ static public function define_restore_log_rules() {
// rules from other tasks (activities) not belonging to one module instance (cmid = 0), so are restored here
$rules = array_merge($rules, restore_logs_processor::register_log_rules_for_course());
- // TODO: Other logs like 'calendar', 'upload'... will go here
+ // Calendar rules.
+ $rules[] = new restore_log_rule('calendar', 'add', 'event.php?action=edit&id={event}', '[name]');
+ $rules[] = new restore_log_rule('calendar', 'edit', 'event.php?action=edit&id={event}', '[name]');
+ $rules[] = new restore_log_rule('calendar', 'edit all', 'event.php?action=edit&id={event}', '[name]');
+ // TODO: Other logs like 'upload'... will go here
return $rules;
Please sign in to comment.
Something went wrong with that request. Please try again.