fixes: log url and report column order
authorJoseph Baxter <joseph.baxter@nottingham.ac.uk>
Tue, 3 Jun 2014 13:59:47 +0000 (14:59 +0100)
committerJoseph Baxter <joseph.baxter@nottingham.ac.uk>
Tue, 3 Jun 2014 13:59:47 +0000 (14:59 +0100)
locallib.php
renderer.php
version.php

index a681e92..1d829e5 100644 (file)
@@ -1467,7 +1467,7 @@ class attendance {
         }
 
         $logurl = att_log_convert_url($url);
-        add_to_log($this->course->id, 'attforblock', $action, $logurl, $info, $this->cm->id);
+        add_to_log($this->course->id, 'attendance', $action, $logurl, $info, $this->cm->id);
     }
 }
 
index 02561f9..ee3fbf7 100644 (file)
@@ -813,6 +813,12 @@ class mod_attendance_renderer extends plugin_renderer_base {
             $table->size[] = '1px';
         }
 
+        if ($reportdata->sessionslog) {
+            $table->head[] = get_string('remarks', 'attendance');
+            $table->align[] = 'center';
+            $table->size[] = '200px';
+         }
+
         if ($bulkmessagecapability) { // Display the table header for bulk messaging.
             // The checkbox must have an id of cb_selector so that the JavaScript will pick it up.
             $table->head[] = html_writer::checkbox('cb_selector', 0, false, '', array('id' => 'cb_selector'));
@@ -820,12 +826,6 @@ class mod_attendance_renderer extends plugin_renderer_base {
             $table->size[] = '1px';
         }
 
-        if ($reportdata->sessionslog) {
-            $table->head[] = get_string('remarks', 'attendance');
-            $table->align[] = 'center';
-            $table->size[] = '200px';
-         }
-         
         foreach ($reportdata->users as $user) {
             $row = new html_table_row();
 
@@ -847,10 +847,6 @@ class mod_attendance_renderer extends plugin_renderer_base {
                 $row->cells[] = $reportdata->grades[$user->id].' / '.$reportdata->maxgrades[$user->id];
             }
 
-            if ($bulkmessagecapability) { // Create the checkbox for bulk messaging.
-                $row->cells[] = html_writer::checkbox('user'.$user->id, 'on', false);
-            }
-
             if ($reportdata->sessionslog) {
                 if (isset($sess) && isset($reportdata->sessionslog[$user->id][$sess->id]->remarks)) {
                     $row->cells[] = $reportdata->sessionslog[$user->id][$sess->id]->remarks;
@@ -858,6 +854,11 @@ class mod_attendance_renderer extends plugin_renderer_base {
                     $row->cells[] = '';
                 }
             }
+
+            if ($bulkmessagecapability) { // Create the checkbox for bulk messaging.
+                $row->cells[] = html_writer::checkbox('user'.$user->id, 'on', false);
+            }
+            
             $table->data[] = $row;
         }
 
index ae31eea..28aaec1 100644 (file)
@@ -22,7 +22,7 @@
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-$plugin->version  = 2014022801;
+$plugin->version  = 2014060314;
 $plugin->requires = 2013040500;
 $plugin->release = '2.6.1';
 $plugin->maturity  = MATURITY_STABLE;