MDL-36941 core: alter events to use new table structure
This commit is contained in:
@@ -46,7 +46,7 @@ class message_viewed extends base {
|
||||
* Init method.
|
||||
*/
|
||||
protected function init() {
|
||||
$this->data['objecttable'] = 'message_read';
|
||||
$this->data['objecttable'] = 'message_user_actions';
|
||||
$this->data['crud'] = 'c';
|
||||
$this->data['edulevel'] = self::LEVEL_OTHER;
|
||||
}
|
||||
@@ -97,15 +97,13 @@ class message_viewed extends base {
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
// Messages are not backed up, so no need to map them.
|
||||
return array('db' => 'message_read', 'restore' => base::NOT_MAPPED);
|
||||
return array('db' => 'message_user_actions', 'restore' => base::NOT_MAPPED);
|
||||
}
|
||||
|
||||
public static function get_other_mapping() {
|
||||
// Messages are not backed up, so no need to map them on restore.
|
||||
$othermapped = array();
|
||||
// The messages table could vary for older events - so cannot be mapped.
|
||||
$othermapped['messageid'] = array('db' => base::NOT_MAPPED, 'restore' => base::NOT_MAPPED);
|
||||
$othermapped['messageid'] = array('db' => 'messages', 'restore' => base::NOT_MAPPED);
|
||||
return $othermapped;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user