Browse Source

fixes: log url and report column order

MOODLE_26_STABLE
Joseph Baxter 11 years ago
parent
commit
ba1d8545bf
  1. 2
      locallib.php
  2. 21
      renderer.php
  3. 2
      version.php

2
locallib.php

@ -1467,7 +1467,7 @@ class attendance {
} }
$logurl = att_log_convert_url($url); $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);
} }
} }

21
renderer.php

@ -813,6 +813,12 @@ class mod_attendance_renderer extends plugin_renderer_base {
$table->size[] = '1px'; $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. 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. // 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')); $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'; $table->size[] = '1px';
} }
if ($reportdata->sessionslog) {
$table->head[] = get_string('remarks', 'attendance');
$table->align[] = 'center';
$table->size[] = '200px';
}
foreach ($reportdata->users as $user) { foreach ($reportdata->users as $user) {
$row = new html_table_row(); $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]; $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 ($reportdata->sessionslog) {
if (isset($sess) && isset($reportdata->sessionslog[$user->id][$sess->id]->remarks)) { if (isset($sess) && isset($reportdata->sessionslog[$user->id][$sess->id]->remarks)) {
$row->cells[] = $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[] = ''; $row->cells[] = '';
} }
} }
if ($bulkmessagecapability) { // Create the checkbox for bulk messaging.
$row->cells[] = html_writer::checkbox('user'.$user->id, 'on', false);
}
$table->data[] = $row; $table->data[] = $row;
} }

2
version.php

@ -22,7 +22,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
$plugin->version = 2014022801; $plugin->version = 2014060314;
$plugin->requires = 2013040500; $plugin->requires = 2013040500;
$plugin->release = '2.6.1'; $plugin->release = '2.6.1';
$plugin->maturity = MATURITY_STABLE; $plugin->maturity = MATURITY_STABLE;

Loading…
Cancel
Save