Skip to content

Commit

Permalink
Merge branch 'MDL-44370-master' of git://github.com/ankitagarwal/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
Damyon Wiese committed Mar 5, 2014
2 parents b33ec06 + cebfb9e commit 0cc30f6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 6 additions & 1 deletion backup/moodle2/restore_final_task.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
4 changes: 3 additions & 1 deletion course/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ function make_log_url($module, $url) {
case 'login':
case 'lib':
case 'admin':
case 'calendar':
case 'category':
case 'mnet course':
if (strpos($url, '../') === 0) {
Expand All @@ -76,6 +75,9 @@ function make_log_url($module, $url) {
$url = "/course/$url";
}
break;
case 'calendar':
$url = "/calendar/$url";
break;
case 'user':
case 'blog':
$url = "/$module/$url";
Expand Down

0 comments on commit 0cc30f6

Please sign in to comment.