Fix #74 - crud and objecttable params in /classes/event/ need fixing
authorBarry Oosthuizen <barry.oosthuizen@nottingham.ac.uk>
Fri, 13 Feb 2015 10:38:48 +0000 (10:38 +0000)
committerBarry Oosthuizen <barry.oosthuizen@nottingham.ac.uk>
Tue, 26 May 2015 16:21:48 +0000 (17:21 +0100)
classes/event/attendance_taken.php
classes/event/attendance_taken_by_student.php
classes/event/session_added.php
classes/event/session_deleted.php
classes/event/session_duration_updated.php
classes/event/session_updated.php
classes/event/status_added.php
classes/event/status_updated.php

index 1715d0e..afbb322 100644 (file)
@@ -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';
     }
 
     /**
index cabfecf..f5344b3 100644 (file)
@@ -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';
     }
 
     /**
index 8fd7d87..01b0e1a 100644 (file)
@@ -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';
     }
 
     /**
index 8839b0f..818170f 100644 (file)
@@ -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';
     }
 
     /**
index 2ff8e48..c4dede7 100644 (file)
@@ -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';
     }
 
     /**
index c954762..c9d5598 100644 (file)
@@ -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';
     }
 
     /**
index fdb5fc3..4cee03f 100644 (file)
@@ -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';
     }
 
     /**
index c622d3b..22f4ab1 100644 (file)
@@ -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';
     }
 
     /**