From a0a955c020d848cb832c5c74fceafac24bbea308 Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Tue, 22 Aug 2017 11:07:51 +1200 Subject: [PATCH] Add description to warnings/status set. --- lang/en/attendance.php | 2 ++ preferences.php | 1 + warnings.php | 17 +++++++++-------- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/lang/en/attendance.php b/lang/en/attendance.php index 5529298..d40ace8 100644 --- a/lang/en/attendance.php +++ b/lang/en/attendance.php @@ -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.

Please change the session date or just click the "Add session" button again to confirm?'; $string['randompassword'] = 'Random password'; $string['remark'] = 'Remark for: {$a}'; diff --git a/preferences.php b/preferences.php index 21bda0b..776de7e 100644 --- a/preferences.php +++ b/preferences.php @@ -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); diff --git a/warnings.php b/warnings.php index d283386..a8462c5 100644 --- a/warnings.php +++ b/warnings.php @@ -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'),