mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-46455 mod_*: added restore mapping to events
This commit is contained in:
parent
ef15eae433
commit
0bfafc5ba0
170 changed files with 1364 additions and 19 deletions
|
@ -67,4 +67,8 @@ class course_module_viewed extends \core\event\course_module_viewed {
|
|||
throw new \coding_exception('Other must contain the key viewed.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
return array('db' => 'survey', 'restore' => 'survey');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -104,4 +104,15 @@ class report_downloaded extends \core\event\base {
|
|||
throw new \coding_exception('The \'type\' value must be set in other.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
return array('db' => 'survey', 'restore' => 'survey');
|
||||
}
|
||||
|
||||
public static function get_other_mapping() {
|
||||
$othermapped = array();
|
||||
$othermapped['groupid'] = array('db' => 'groups', 'restore' => 'group');
|
||||
|
||||
return $othermapped;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -93,4 +93,15 @@ class report_viewed extends \core\event\base {
|
|||
return array($this->courseid, "survey", "view report", "report.php?id=" . $this->contextinstanceid, $this->objectid,
|
||||
$this->contextinstanceid);
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
return array('db' => 'survey', 'restore' => 'survey');
|
||||
}
|
||||
|
||||
public static function get_other_mapping() {
|
||||
$othermapped = array();
|
||||
$othermapped['groupid'] = array('db' => 'groups', 'restore' => 'group');
|
||||
|
||||
return $othermapped;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -99,4 +99,11 @@ class response_submitted extends \core\event\base {
|
|||
throw new \coding_exception('The \'surveyid\' value must be set in other.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_other_mapping() {
|
||||
$othermapped = array();
|
||||
$othermapped['surveyid'] = array('db' => 'survey', 'restore' => 'survey');
|
||||
|
||||
return $othermapped;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue