Add description to warnings/status set.
authorDan Marsden <dan@danmarsden.com>
Mon, 21 Aug 2017 23:07:51 +0000 (11:07 +1200)
committerDan Marsden <dan@danmarsden.com>
Mon, 21 Aug 2017 23:07:51 +0000 (11:07 +1200)
lang/en/attendance.php
preferences.php
warnings.php

index 5529298..d40ace8 100644 (file)
@@ -263,6 +263,7 @@ $string['nosessionexists'] = 'No Session exists for this course';
 $string['nosessionsselected'] = 'No sessions selected';
 $string['warningdeleted'] = 'Warning deleted';
 $string['warningdesc'] = 'These warnings will be automatically added to any new attendance activities. If more than one warning is triggered at exactly the same time, only the warning with the lower warning threshold will be sent.';
+$string['warningdesc_course'] = 'Warnings thresholds set here affect the absentee report and allow students and third parties to be notified.  If more than one warning is triggered at exactly the same time, only the warning with the lower warning threshold will be sent.';
 $string['warnings'] = 'Warnings set';
 $string['warningupdated'] = 'Updated warnings';
 $string['notifytask'] = 'Send warnings to users';
@@ -299,6 +300,7 @@ $string['pluginname'] = 'Attendance';
 $string['points'] = 'Points';
 $string['pointsallsessions'] = 'Points over all sessions';
 $string['pointssessionscompleted'] = 'Points over taken sessions';
+$string['preferences_desc'] = 'Changes to status sets will affect existing attendance sessions and may affect grading.';
 $string['priorto'] = 'The session date is prior to the course start date ({$a}) so that the new sessions scheduled before this date will be hidden (not accessible). You can change the course start date at any time (see course settings) in order to have access to earlier sessions.<br><br>Please change the session date or just click the "Add session" button again to confirm?';
 $string['randompassword'] = 'Random password';
 $string['remark'] = 'Remark for: {$a}';
index 21bda0b..776de7e 100644 (file)
@@ -159,6 +159,7 @@ $setselector = new attendance_set_selector($att, $maxstatusset);
 echo $output->header();
 echo $output->heading(get_string('attendanceforthecourse', 'attendance').' :: '. format_string($course->fullname));
 echo $output->render($tabs);
+echo $OUTPUT->box(get_string('preferences_desc', 'attendance'), 'generalbox attendancedesc', 'notice');
 echo $output->render($setselector);
 echo $output->render($prefdata);
 
index d283386..a8462c5 100644 (file)
@@ -166,16 +166,17 @@ if ($action == 'update' && !empty($notid)) {
     $mform->display();
 } else {
     if (empty($id)) {
-        echo $OUTPUT->box(get_string('warningdesc', 'mod_attendance'), 'generalbox', 'notice');
-
-        $existingnotifications = $DB->get_records('attendance_warning',
-            array('idnumber' => 0),
-            'warningpercent');
+        $warningdesc = get_string('warningdesc', 'mod_attendance');
+        $idnumber = 0;
     } else {
-        $existingnotifications = $DB->get_records('attendance_warning',
-            array('idnumber' => $att->id),
-            'warningpercent');
+        $warningdesc = get_string('warningdesc_course', 'mod_attendance');
+        $idnumber = $att->id;
     }
+    echo $OUTPUT->box($warningdesc, 'generalbox attendancedesc', 'notice');
+    $existingnotifications = $DB->get_records('attendance_warning',
+        array('idnumber' => $idnumber),
+        'warningpercent');
+
     if (!empty($existingnotifications)) {
         $table = new html_table();
         $table->head = array(get_string('warningthreshold', 'mod_attendance'),