From 99d885a39bd5f06ad3fe9e7e9528320e9e8c7f3d Mon Sep 17 00:00:00 2001 From: Barry Oosthuizen Date: Fri, 13 Feb 2015 10:38:48 +0000 Subject: [PATCH] Fix #74 - crud and objecttable params in /classes/event/ need fixing --- classes/event/attendance_taken.php | 4 ++-- classes/event/attendance_taken_by_student.php | 6 +++--- classes/event/session_added.php | 4 ++-- classes/event/session_deleted.php | 4 ++-- classes/event/session_duration_updated.php | 4 ++-- classes/event/session_updated.php | 4 ++-- classes/event/status_added.php | 4 ++-- classes/event/status_updated.php | 4 ++-- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/classes/event/attendance_taken.php b/classes/event/attendance_taken.php index 1715d0e..afbb322 100644 --- a/classes/event/attendance_taken.php +++ b/classes/event/attendance_taken.php @@ -44,9 +44,9 @@ class attendance_taken extends \core\event\base { * Init method. */ protected function init() { - $this->data['crud'] = 'r'; + $this->data['crud'] = 'u'; $this->data['edulevel'] = self::LEVEL_TEACHING; - $this->data['objecttable'] = 'attendance'; + $this->data['objecttable'] = 'attendance_log'; } /** diff --git a/classes/event/attendance_taken_by_student.php b/classes/event/attendance_taken_by_student.php index cabfecf..f5344b3 100644 --- a/classes/event/attendance_taken_by_student.php +++ b/classes/event/attendance_taken_by_student.php @@ -44,9 +44,9 @@ class attendance_taken_by_student extends \core\event\base { * Init method. */ protected function init() { - $this->data['crud'] = 'r'; - $this->data['edulevel'] = self::LEVEL_TEACHING; - $this->data['objecttable'] = 'attendance'; + $this->data['crud'] = 'u'; + $this->data['edulevel'] = self::LEVEL_PARTICIPATING; + $this->data['objecttable'] = 'attendance_log'; } /** diff --git a/classes/event/session_added.php b/classes/event/session_added.php index 8fd7d87..01b0e1a 100644 --- a/classes/event/session_added.php +++ b/classes/event/session_added.php @@ -44,9 +44,9 @@ class session_added extends \core\event\base { * Init method. */ protected function init() { - $this->data['crud'] = 'r'; + $this->data['crud'] = 'c'; $this->data['edulevel'] = self::LEVEL_TEACHING; - $this->data['objecttable'] = 'attendance'; + $this->data['objecttable'] = 'attendance_sessions'; } /** diff --git a/classes/event/session_deleted.php b/classes/event/session_deleted.php index 8839b0f..818170f 100644 --- a/classes/event/session_deleted.php +++ b/classes/event/session_deleted.php @@ -44,9 +44,9 @@ class session_deleted extends \core\event\base { * Init method. */ protected function init() { - $this->data['crud'] = 'r'; + $this->data['crud'] = 'd'; $this->data['edulevel'] = self::LEVEL_TEACHING; - $this->data['objecttable'] = 'attendance'; + $this->data['objecttable'] = 'attendance_sessions'; } /** diff --git a/classes/event/session_duration_updated.php b/classes/event/session_duration_updated.php index 2ff8e48..c4dede7 100644 --- a/classes/event/session_duration_updated.php +++ b/classes/event/session_duration_updated.php @@ -44,9 +44,9 @@ class session_duration_updated extends \core\event\base { * Init method. */ protected function init() { - $this->data['crud'] = 'r'; + $this->data['crud'] = 'u'; $this->data['edulevel'] = self::LEVEL_TEACHING; - $this->data['objecttable'] = 'attendance'; + $this->data['objecttable'] = 'attendance_sessions'; } /** diff --git a/classes/event/session_updated.php b/classes/event/session_updated.php index c954762..c9d5598 100644 --- a/classes/event/session_updated.php +++ b/classes/event/session_updated.php @@ -44,9 +44,9 @@ class session_updated extends \core\event\base { * Init method. */ protected function init() { - $this->data['crud'] = 'r'; + $this->data['crud'] = 'u'; $this->data['edulevel'] = self::LEVEL_TEACHING; - $this->data['objecttable'] = 'attendance'; + $this->data['objecttable'] = 'attendance_sessions'; } /** diff --git a/classes/event/status_added.php b/classes/event/status_added.php index fdb5fc3..4cee03f 100644 --- a/classes/event/status_added.php +++ b/classes/event/status_added.php @@ -44,9 +44,9 @@ class status_added extends \core\event\base { * Init method. */ protected function init() { - $this->data['crud'] = 'r'; + $this->data['crud'] = 'c'; $this->data['edulevel'] = self::LEVEL_TEACHING; - $this->data['objecttable'] = 'attendance'; + $this->data['objecttable'] = 'attendance_statuses'; } /** diff --git a/classes/event/status_updated.php b/classes/event/status_updated.php index c622d3b..22f4ab1 100644 --- a/classes/event/status_updated.php +++ b/classes/event/status_updated.php @@ -44,9 +44,9 @@ class status_updated extends \core\event\base { * Init method. */ protected function init() { - $this->data['crud'] = 'r'; + $this->data['crud'] = 'u'; $this->data['edulevel'] = self::LEVEL_TEACHING; - $this->data['objecttable'] = 'attendance'; + $this->data['objecttable'] = 'attendance_statuses'; } /**