mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 17:06:53 +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
|
@ -100,4 +100,9 @@ class attempt_deleted extends \core\event\base {
|
|||
throw new \coding_exception('The \'attemptid\' must be set in other.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_other_mapping() {
|
||||
// Can't map the 'attemptid' value.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,5 +53,9 @@ class course_module_viewed extends \core\event\course_module_viewed {
|
|||
return array($this->courseid, 'scorm', 'pre-view', 'view.php?id=' . $this->contextinstanceid, $this->objectid,
|
||||
$this->contextinstanceid);
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
return array('db' => 'scorm', 'restore' => 'scorm');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -115,4 +115,11 @@ class interactions_viewed extends \core\event\base {
|
|||
throw new \coding_exception('The \'instanceid\' must be set in other.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_other_mapping() {
|
||||
$othermapped = array();
|
||||
$othermapped['instanceid'] = array('db' => 'scorm', 'restore' => 'scorm');
|
||||
|
||||
return $othermapped;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -105,4 +105,11 @@ class report_viewed extends \core\event\base {
|
|||
throw new \coding_exception('The \'mode\' value must be set in other.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_other_mapping() {
|
||||
$othermapped = array();
|
||||
$othermapped['scormid'] = array('db' => 'scorm', 'restore' => 'scorm');
|
||||
|
||||
return $othermapped;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -102,4 +102,15 @@ class sco_launched extends \core\event\base {
|
|||
throw new \coding_exception('The \'loadedcontent\' value must be set in other.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
return array('db' => 'scorm_scoes', 'restore' => 'scorm_sco');
|
||||
}
|
||||
|
||||
public static function get_other_mapping() {
|
||||
$othermapped = array();
|
||||
$othermapped['instanceid'] = array('db' => 'scorm', 'restore' => 'scorm');
|
||||
|
||||
return $othermapped;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -118,4 +118,12 @@ class tracks_viewed extends \core\event\base {
|
|||
throw new \coding_exception('The \'scoid\' value must be set in other.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_other_mapping() {
|
||||
$othermapped = array();
|
||||
$othermapped['instanceid'] = array('db' => 'scorm', 'restore' => 'scorm');
|
||||
$othermapped['scoid'] = array('db' => 'scorm_scoes', 'restore' => 'scorm_scoe');
|
||||
|
||||
return $othermapped;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -112,4 +112,11 @@ class user_report_viewed extends \core\event\base {
|
|||
throw new \coding_exception('The \'instanceid\' value must be set in other.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_other_mapping() {
|
||||
$othermapped = array();
|
||||
$othermapped['instanceid'] = array('db' => 'scorm', 'restore' => 'scorm');
|
||||
|
||||
return $othermapped;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue