From ba1d8545bf7a6c7514b6fcbb4f6261ff3f0654d1 Mon Sep 17 00:00:00 2001 From: Joseph Baxter Date: Tue, 3 Jun 2014 14:59:47 +0100 Subject: [PATCH] fixes: log url and report column order --- locallib.php | 2 +- renderer.php | 21 +++++++++++---------- version.php | 2 +- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/locallib.php b/locallib.php index a681e92..1d829e5 100644 --- a/locallib.php +++ b/locallib.php @@ -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); } } diff --git a/renderer.php b/renderer.php index 02561f9..ee3fbf7 100644 --- a/renderer.php +++ b/renderer.php @@ -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; } diff --git a/version.php b/version.php index ae31eea..28aaec1 100644 --- a/version.php +++ b/version.php @@ -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;