Rename at-risk report to absentee report.
authorDan Marsden <dan@danmarsden.com>
Sun, 20 Aug 2017 22:58:54 +0000 (10:58 +1200)
committerDan Marsden <dan@danmarsden.com>
Sun, 20 Aug 2017 22:58:54 +0000 (10:58 +1200)
absentee.php [moved from atrisk.php with 93% similarity]
classes/structure.php
lang/en/attendance.php
lib.php
renderables.php
resetcalendar.php

similarity index 93%
rename from atrisk.php
rename to absentee.php
index 4ac0d67..1af4f23 100644 (file)
@@ -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;
         }
     }
index 3fce0d1..ea379e5 100644 (file)
@@ -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);
     }
 
     /**
index df0d3f7..5529298 100644 (file)
@@ -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';
diff --git a/lib.php b/lib.php
index 9189e50..f5c3cdc 100644 (file)
--- a/lib.php
+++ b/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',
index abeb212..0b546e0 100644 (file)
@@ -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)) {
index 3632078..63ac20c 100644 (file)
@@ -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');