Browse Source

Rename at-risk report to absentee report.

MOODLE_33_STABLE
Dan Marsden 7 years ago
parent
commit
c84c5d8959
  1. 12
      absentee.php
  2. 4
      classes/structure.php
  3. 4
      lang/en/attendance.php
  4. 4
      lib.php
  5. 8
      renderables.php
  6. 2
      resetcalendar.php

12
atrisk.php → absentee.php

@ -55,13 +55,13 @@ if (!empty($category)) {
// Check permissions.
require_capability('mod/attendance:viewreports', $context);
$exportfilename = 'attendanceatrisk.csv';
$exportfilename = 'attendance-absentee.csv';
$PAGE->set_url('/mod/attendance/atrisk.php', array('category' => $category, 'id' => $attendancecm));
$PAGE->set_url('/mod/attendance/absentee.php', array('category' => $category, 'id' => $attendancecm));
$PAGE->set_heading($SITE->fullname);
$table = new flexible_table('attendanceatrisk');
$table = new flexible_table('attendanceabsentee');
$table->define_baseurl($PAGE->url);
if (!$table->is_downloading($download, $exportfilename)) {
@ -69,16 +69,16 @@ if (!$table->is_downloading($download, $exportfilename)) {
$pageparams = new mod_attendance_sessions_page_params();
$att = new mod_attendance_structure($att, $cm, $course, $context, $pageparams);
$output = $PAGE->get_renderer('mod_attendance');
$tabs = new attendance_tabs($att, attendance_tabs::TAB_ATRISK);
$tabs = new attendance_tabs($att, attendance_tabs::TAB_ABSENTEE);
echo $output->header();
echo $output->heading(get_string('attendanceforthecourse', 'attendance').' :: ' .format_string($course->fullname));
echo $output->render($tabs);
} else {
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('atriskreport', 'mod_attendance'));
echo $OUTPUT->heading(get_string('absenteereport', 'mod_attendance'));
if (empty($category)) {
// Only show tabs if displaying via the admin page.
$tabmenu = attendance_print_settings_tabs('atrisk');
$tabmenu = attendance_print_settings_tabs('absentee');
echo $tabmenu;
}
}

4
classes/structure.php

@ -373,9 +373,9 @@ class mod_attendance_structure {
* @param array $params
* @return moodle_url of report.php for attendance instance
*/
public function url_atrisk($params=array()) {
public function url_absentee($params=array()) {
$params = array_merge(array('id' => $this->cm->id), $params);
return new moodle_url('/mod/attendance/atrisk.php', $params);
return new moodle_url('/mod/attendance/absentee.php', $params);
}
/**

4
lang/en/attendance.php

@ -31,6 +31,7 @@ $string['Lfull'] = 'Late';
$string['Pacronym'] = 'P';
$string['Pfull'] = 'Present';
$string['acronym'] = 'Acronym';
$string['absenteereport'] = 'Absentee report';
$string['add'] = 'Add';
$string['addmultiplesessions'] = 'Multiple sessions';
$string['addwarning'] = 'Add warning';
@ -40,7 +41,6 @@ $string['all'] = 'All';
$string['allcourses'] = 'All courses';
$string['allpast'] = 'All past';
$string['allsessions'] = 'All sessions';
$string['atriskreport'] = 'At-risk report';
$string['attendance:addinstance'] = 'Add a new attendance activity';
$string['attendance:canbelisted'] = 'Appears in the roster';
$string['attendance:changeattendances'] = 'Changing Attendances';
@ -52,7 +52,7 @@ $string['attendance:takeattendances'] = 'Taking Attendances';
$string['attendance:view'] = 'Viewing Attendances';
$string['attendance:viewreports'] = 'Viewing Reports';
$string['attendance:viewsummaryreports'] = 'View course summary reports';
$string['attendance:warningemails'] = 'Can be subscribed to emails with at-risk users';
$string['attendance:warningemails'] = 'Can be subscribed to emails with absentee users';
$string['attendance_already_submitted'] = 'You may not self register attendance that has already been set.';
$string['attendancedata'] = 'Attendance data';
$string['attendanceforthecourse'] = 'Attendance for the course';

4
lib.php

@ -483,8 +483,8 @@ function attendance_print_settings_tabs($selected = 'settings') {
get_string('coursesummary', 'attendance'), get_string('coursesummary', 'attendance'), false);
if (get_config('attendance', 'enablewarnings')) {
$tabs[] = new tabobject('atrisk', $CFG->wwwroot . '/mod/attendance/atrisk.php',
get_string('atriskreport', 'attendance'), get_string('atriskreport', 'attendance'), false);
$tabs[] = new tabobject('absentee', $CFG->wwwroot . '/mod/attendance/absentee.php',
get_string('absenteereport', 'attendance'), get_string('absenteereport', 'attendance'), false);
}
$tabs[] = new tabobject('resetcalendar', $CFG->wwwroot.'/mod/attendance/resetcalendar.php',

8
renderables.php

@ -53,8 +53,8 @@ class attendance_tabs implements renderable {
const TAB_UPDATE = 7;
/** Warnings tab */
const TAB_WARNINGS = 8;
/** At-risk tab */
const TAB_ATRISK = 9;
/** Absentee tab */
const TAB_ABSENTEE = 9;
/** @var int current tab */
public $currenttab;
@ -102,8 +102,8 @@ class attendance_tabs implements renderable {
if (has_capability('mod/attendance:viewreports', $context) &&
get_config('attendance', 'enablewarnings')) {
$toprow[] = new tabobject(self::TAB_ATRISK, $this->att->url_atrisk()->out(),
get_string('atriskreport', 'attendance'));
$toprow[] = new tabobject(self::TAB_ABSENTEE, $this->att->url_absentee()->out(),
get_string('absenteereport', 'attendance'));
}
if (has_capability('mod/attendance:export', $context)) {

2
resetcalendar.php

@ -35,7 +35,7 @@ $context = context_system::instance();
// Check permissions.
require_capability('mod/attendance:viewreports', $context);
$exportfilename = 'attendanceatrisk.csv';
$exportfilename = 'attendance-absentee.csv';
$PAGE->set_url('/mod/attendance/resetcalendar.php');

Loading…
Cancel
Save