Skip to content

Commit

Permalink
Fix #360 - small improvement to marking page.
Browse files Browse the repository at this point in the history
  • Loading branch information
danmarsden committed Aug 30, 2022
1 parent f618b99 commit 2cf65c9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
12 changes: 4 additions & 8 deletions classes/output/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ protected function render_take_data(take_data $takedata) {
$params = array(
'type' => 'submit',
'class' => 'btn btn-primary',
'value' => get_string('save', 'attendance'));
'value' => get_string('saveandshownext', 'attendance'));
$table .= html_writer::tag('center', html_writer::empty_tag('input', $params));
$table = html_writer::tag('form', $table, array('method' => 'post', 'action' => $takedata->url_path(),
'id' => 'attendancetakeform'));
Expand Down Expand Up @@ -731,14 +731,12 @@ private function statusdropdown() {
protected function render_attendance_take_list(take_data $takedata) {
global $CFG;
$table = new html_table();
$table->width = '0%';
$table->head = array(
'#',
$this->construct_fullname_head($takedata)
);
$table->align = array('left', 'left');
$table->size = array('20px', '');
$table->wrap[1] = 'nowrap';
$table->align = array('left');
$table->size = array('');
$table->wrap[0] = 'nowrap';
// Check if extra useridentity fields need to be added.
$extrasearchfields = array();
if (!empty($CFG->showuseridentity) && has_capability('moodle/site:viewuseridentity', $takedata->att->context)) {
Expand Down Expand Up @@ -784,7 +782,6 @@ protected function render_attendance_take_list(take_data $takedata) {
}

$cell = new html_table_cell(html_writer::div($this->output->render($this->statusdropdown()), 'setallstatuses'));
$cell->colspan = 2;
$row->cells[] = $cell;
foreach ($takedata->statuses as $st) {
$attribs = array(
Expand Down Expand Up @@ -817,7 +814,6 @@ protected function render_attendance_take_list(take_data $takedata) {
foreach ($takedata->users as $user) {
$i++;
$row = new html_table_row();
$row->cells[] = $i;
$fullname = html_writer::link($takedata->url_view(array('studentid' => $user->id)), fullname($user));
$fullname = $this->user_picture($user).$fullname; // Show different picture if it is a temporary user.

Expand Down
1 change: 1 addition & 0 deletions lang/en/attendance.php
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,7 @@
$string['rotateqrcodeinterval'] = 'Rotate QR code/password interval (seconds)';
$string['rotateqrcodeinterval_desc'] = 'Time interval (seconds) to rotate QR code/password by.';
$string['save'] = 'Save attendance';
$string['saveandshownext'] = 'Save and show next page';
$string['scantime'] = 'Scan time';
$string['scantime_help'] = 'This allows a timestamp to be included in the import file - it will attempt to convert the timestamp passed using the PHP strtotime function and then use attendance status settings to decide which status to set for the user';
$string['search:activity'] = 'Attendance - activity information';
Expand Down

0 comments on commit 2cf65c9

Please sign in to comment.