diff --git a/export.php b/export.php index fabb0d5..df6eaa3 100644 --- a/export.php +++ b/export.php @@ -79,7 +79,9 @@ if ($formdata = $mform->get_data()) { $reportdata = new attendance_report_data($att); if ($reportdata->users) { - $filename = clean_filename($course->shortname.'_Attendances_'.userdate(time(), '%Y%m%d-%H%M')); + $filename = clean_filename($course->shortname.'_'. + get_string('modulenameplural', 'attendance'). + '_'.userdate(time(), '%Y%m%d-%H%M')); $group = $formdata->group ? $reportdata->groups[$formdata->group] : 0; $data = new stdClass; diff --git a/lang/en/attendance.php b/lang/en/attendance.php index 0435a76..5558deb 100644 --- a/lang/en/attendance.php +++ b/lang/en/attendance.php @@ -339,6 +339,7 @@ $string['oversessionstaken_help'] = 'Shows statistics for sessions where attenda
  • Points: points awarded based on the taken sessions.
  • Percentage: percentage of points awarded over the maxium possible points of the taken sessions.
  • '; +$string['pageof'] = 'Page {$a->page} of {$a->numpages}'; $string['participant'] = 'Participant'; $string['password'] = 'Password'; $string['enterpassword'] = 'Enter password'; diff --git a/locallib.php b/locallib.php index 8475cb6..d48afc7 100644 --- a/locallib.php +++ b/locallib.php @@ -518,7 +518,7 @@ function attendance_exporttotableed($data, $filename, $format) { // Sending HTTP headers. $workbook->send($filename); // Creating the first worksheet. - $myxls = $workbook->add_worksheet('Attendances'); + $myxls = $workbook->add_worksheet(get_string('modulenameplural', 'attendance')); // Format types. $formatbc = $workbook->add_format(); $formatbc->set_bold(1); diff --git a/renderer.php b/renderer.php index 5e1f581..5263c64 100644 --- a/renderer.php +++ b/renderer.php @@ -130,7 +130,11 @@ class mod_attendance_renderer extends plugin_renderer_base { 'page' => $fcontrols->pageparams->page - 1)), $this->output->larrow()); } - $pagingcontrols .= html_writer::tag('span', "Page {$fcontrols->pageparams->page} of $numberofpages", + $a = new stdClass(); + $a->page = $fcontrols->pageparams->page; + $a->numpages = $numberofpages; + $text = get_string('pageof', 'attendance', $a); + $pagingcontrols .= html_writer::tag('span', $text, array('class' => 'attbtn')); if ($fcontrols->pageparams->page < $numberofpages) { $pagingcontrols .= html_writer::link($fcontrols->url(array('curdate' => $fcontrols->curdate, @@ -535,7 +539,11 @@ class mod_attendance_renderer extends plugin_renderer_base { $controls .= html_writer::link($takedata->url(array('page' => $takedata->pageparams->page - 1)), $this->output->larrow()); } - $controls .= html_writer::tag('span', "Page {$takedata->pageparams->page} of $numberofpages", + $a = new stdClass(); + $a->page = $takedata->pageparams->page; + $a->numpages = $numberofpages; + $text = get_string('pageof', 'attendance', $a); + $controls .= html_writer::tag('span', $text, array('class' => 'attbtn')); if ($takedata->pageparams->page < $numberofpages) { $controls .= html_writer::link($takedata->url(array('page' => $takedata->pageparams->page + 1,