mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 17:36:38 +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
|
@ -115,4 +115,8 @@ class all_submissions_downloaded extends base {
|
|||
|
||||
parent::validate_data();
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
return array('db' => 'assign', 'restore' => 'assign');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -150,4 +150,13 @@ class assessable_submitted extends base {
|
|||
throw new \coding_exception('The \'submission_editable\' value must be set in other.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
return array('db' => 'assign_submission', 'restore' => 'submission');
|
||||
}
|
||||
|
||||
public static function get_other_mapping() {
|
||||
// Nothing to map.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -123,4 +123,11 @@ class batch_set_marker_allocation_viewed extends base {
|
|||
throw new \coding_exception('The \'assignid\' value must be set in other.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_other_mapping() {
|
||||
$othermapped = array();
|
||||
$othermapped['assignid'] = array('db' => 'assign', 'restore' => 'assign');
|
||||
|
||||
return $othermapped;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -123,4 +123,11 @@ class batch_set_workflow_state_viewed extends base {
|
|||
throw new \coding_exception('The \'assignid\' value must be set in other.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_other_mapping() {
|
||||
$othermapped = array();
|
||||
$othermapped['assignid'] = array('db' => 'assign', 'restore' => 'assign');
|
||||
|
||||
return $othermapped;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -121,4 +121,8 @@ class extension_granted extends base {
|
|||
throw new \coding_exception('The \'relateduserid\' must be set.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
return array('db' => 'assign', 'restore' => 'assign');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -119,4 +119,15 @@ class feedback_viewed extends base {
|
|||
throw new \coding_exception('The \'assignid\' value must be set in other.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
return array('db' => 'assign_grades', 'restore' => 'grade');
|
||||
}
|
||||
|
||||
public static function get_other_mapping() {
|
||||
$othermapped = array();
|
||||
$othermapped['assignid'] = array('db' => 'assign', 'restore' => 'assign');
|
||||
|
||||
return $othermapped;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -131,4 +131,11 @@ class grading_form_viewed extends base {
|
|||
throw new \coding_exception('The \'assignid\' value must be set in other.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_other_mapping() {
|
||||
$othermapped = array();
|
||||
$othermapped['assignid'] = array('db' => 'assign', 'restore' => 'assign');
|
||||
|
||||
return $othermapped;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -123,4 +123,11 @@ class grading_table_viewed extends base {
|
|||
throw new \coding_exception('The \'assignid\' value must be set in other.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_other_mapping() {
|
||||
$othermapped = array();
|
||||
$othermapped['assignid'] = array('db' => 'assign', 'restore' => 'assign');
|
||||
|
||||
return $othermapped;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -115,4 +115,8 @@ class identities_revealed extends base {
|
|||
|
||||
parent::validate_data();
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
return array('db' => 'assign', 'restore' => 'assign');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -140,4 +140,15 @@ class marker_updated extends base {
|
|||
throw new \coding_exception('The \'markerid\' value must be set in other.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
return array('db' => 'assign', 'restore' => 'assign');
|
||||
}
|
||||
|
||||
public static function get_other_mapping() {
|
||||
$othermapped = array();
|
||||
$othermapped['markerid'] = array('db' => 'user', 'restore' => 'user');
|
||||
|
||||
return $othermapped;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -122,4 +122,11 @@ class reveal_identities_confirmation_page_viewed extends base {
|
|||
throw new \coding_exception('The \'assignid\' value must be set in other.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_other_mapping() {
|
||||
$othermapped = array();
|
||||
$othermapped['assignid'] = array('db' => 'assign', 'restore' => 'assign');
|
||||
|
||||
return $othermapped;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -119,4 +119,8 @@ class statement_accepted extends base {
|
|||
|
||||
parent::validate_data();
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
return array('db' => 'assign_submission', 'restore' => 'submission');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -123,4 +123,11 @@ class submission_confirmation_form_viewed extends base {
|
|||
throw new \coding_exception('The \'assignid\' value must be set in other.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_other_mapping() {
|
||||
$othermapped = array();
|
||||
$othermapped['assignid'] = array('db' => 'assign', 'restore' => 'assign');
|
||||
|
||||
return $othermapped;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -81,4 +81,12 @@ abstract class submission_created extends base {
|
|||
throw new \coding_exception('The \'submissionstatus\' value must be set in other.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_other_mapping() {
|
||||
$othermapped = array();
|
||||
$othermapped['submissionid'] = array('db' => 'assign_submission', 'restore' => 'submission');
|
||||
$othermapped['groupid'] = array('db' => 'groups', 'restore' => 'group');
|
||||
|
||||
return $othermapped;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -117,4 +117,8 @@ class submission_duplicated extends base {
|
|||
|
||||
parent::validate_data();
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
return array('db' => 'assign_submission', 'restore' => 'submission');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -139,4 +139,11 @@ class submission_form_viewed extends base {
|
|||
throw new \coding_exception('The \'assignid\' value must be set in other.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_other_mapping() {
|
||||
$othermapped = array();
|
||||
$othermapped['assignid'] = array('db' => 'assign', 'restore' => 'assign');
|
||||
|
||||
return $othermapped;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -123,4 +123,8 @@ class submission_graded extends base {
|
|||
throw new \coding_exception('The \'relateduserid\' must be set.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
return array('db' => 'assign_grades', 'restore' => 'grade');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -123,4 +123,8 @@ class submission_locked extends base {
|
|||
throw new \coding_exception('The \'relateduserid\' must be set.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
return array('db' => 'assign', 'restore' => 'assign');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -121,4 +121,13 @@ class submission_status_updated extends base {
|
|||
throw new \coding_exception('The \'newstatus\' value must be set in other.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
return array('db' => 'assign_submission', 'restore' => 'submission');
|
||||
}
|
||||
|
||||
public static function get_other_mapping() {
|
||||
// Nothing to map.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -124,4 +124,11 @@ class submission_status_viewed extends base {
|
|||
throw new \coding_exception('The \'assignid\' value must be set in other.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_other_mapping() {
|
||||
$othermapped = array();
|
||||
$othermapped['assignid'] = array('db' => 'assign', 'restore' => 'assign');
|
||||
|
||||
return $othermapped;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -123,4 +123,8 @@ class submission_unlocked extends base {
|
|||
throw new \coding_exception('The \'relateduserid\' must be set.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
return array('db' => 'assign', 'restore' => 'assign');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -81,4 +81,12 @@ abstract class submission_updated extends base {
|
|||
throw new \coding_exception('The \'submissionstatus\' value must be set in other.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_other_mapping() {
|
||||
$othermapped = array();
|
||||
$othermapped['submissionid'] = array('db' => 'assign_submission', 'restore' => 'submission');
|
||||
$othermapped['groupid'] = array('db' => 'groups', 'restore' => 'group');
|
||||
|
||||
return $othermapped;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -119,4 +119,15 @@ class submission_viewed extends base {
|
|||
throw new \coding_exception('The \'assignid\' value must be set in other.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
return array('db' => 'assign_submission', 'restore' => 'submission');
|
||||
}
|
||||
|
||||
public static function get_other_mapping() {
|
||||
$othermapped = array();
|
||||
$othermapped['assignid'] = array('db' => 'assign', 'restore' => 'assign');
|
||||
|
||||
return $othermapped;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -138,4 +138,13 @@ class workflow_state_updated extends base {
|
|||
throw new \coding_exception('The \'newstate\' value must be set in other.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
return array('db' => 'assign', 'restore' => 'assign');
|
||||
}
|
||||
|
||||
public static function get_other_mapping() {
|
||||
// Nothing to map.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -120,4 +120,7 @@ class assessable_uploaded extends \core\event\assessable_uploaded {
|
|||
$this->data['objecttable'] = 'assign_submission';
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
return array('db' => 'assign_submission', 'restore' => 'submission');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -80,4 +80,9 @@ class submission_created extends \mod_assign\event\submission_created {
|
|||
throw new \coding_exception('The \'filesubmissioncount\' value must be set in other.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
// No mapping available for 'assignsubmission_file'.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -80,4 +80,9 @@ class submission_updated extends \mod_assign\event\submission_updated {
|
|||
throw new \coding_exception('The \'filesubmissioncount\' value must be set in other.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
// No mapping available for 'assignsubmission_file'.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -107,4 +107,8 @@ class assessable_uploaded extends \core\event\assessable_uploaded {
|
|||
parent::init();
|
||||
$this->data['objecttable'] = 'assign_submission';
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
return array('db' => 'assign_submission', 'restore' => 'submission');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ class submission_created extends \mod_assign\event\submission_created {
|
|||
*/
|
||||
protected function init() {
|
||||
parent::init();
|
||||
$this->data['objecttable'] = 'assignsubmission_file';
|
||||
$this->data['objecttable'] = 'assignsubmission_onlinetext';
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -80,4 +80,9 @@ class submission_created extends \mod_assign\event\submission_created {
|
|||
throw new \coding_exception('The \'onlinetextwordcount\' value must be set in other.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
// No mapping available for 'assignsubmission_onlinetext'.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ class submission_updated extends \mod_assign\event\submission_updated {
|
|||
*/
|
||||
protected function init() {
|
||||
parent::init();
|
||||
$this->data['objecttable'] = 'assignsubmission_file';
|
||||
$this->data['objecttable'] = 'assignsubmission_onlinetext';
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -80,4 +80,9 @@ class submission_updated extends \mod_assign\event\submission_updated {
|
|||
throw new \coding_exception('The \'onlinetextwordcount\' value must be set in other.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
// No mapping available for 'assignsubmission_onlinetext'.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue