From 537ed2a0e82676fe752368b4d25c74323d8515ca Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Tue, 29 Jan 2019 15:41:38 +1300 Subject: [PATCH] Fix #332 tidy up delete message in attendance plugin. --- defaultstatus.php | 2 +- lang/en/attendance.php | 1 + preferences.php | 2 +- sessions.php | 4 ++-- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/defaultstatus.php b/defaultstatus.php index ec86ec0..425c9fc 100644 --- a/defaultstatus.php +++ b/defaultstatus.php @@ -76,7 +76,7 @@ switch ($action) { break; } - $message = get_string('deletecheckfull', '', get_string('variable', 'attendance')); + $message = get_string('deletecheckfull', 'attendance', get_string('variable', 'attendance')); $message .= str_repeat(html_writer::empty_tag('br'), 2); $message .= $status->acronym.': '. ($status->description ? $status->description : get_string('nodescription', 'attendance')); diff --git a/lang/en/attendance.php b/lang/en/attendance.php index d66899e..e831a53 100644 --- a/lang/en/attendance.php +++ b/lang/en/attendance.php @@ -132,6 +132,7 @@ $string['defaultview_desc'] = 'This is the default view shown to teachers on fir $string['delete'] = 'Delete'; $string['deletewarningconfirm'] = 'Are you sure you want to delete this warning?'; $string['deletedgroup'] = 'The group associated with this session has been deleted'; +$string['deletecheckfull'] = 'Are you absolutely sure you want to completely delete the {$a}, including all user data?'; $string['deletehiddensessions'] = 'Delete all hidden sessions'; $string['deletelogs'] = 'Delete attendance data'; $string['deleteselected'] = 'Delete selected'; diff --git a/preferences.php b/preferences.php index 3e6305e..9297f71 100644 --- a/preferences.php +++ b/preferences.php @@ -104,7 +104,7 @@ switch ($att->pageparams->action) { redirect($att->url_preferences(), get_string('statusdeleted', 'attendance')); } - $message = get_string('deletecheckfull', '', get_string('variable', 'attendance')); + $message = get_string('deletecheckfull', 'attendance', get_string('variable', 'attendance')); $message .= str_repeat(html_writer::empty_tag('br'), 2); $message .= $status->acronym.': '. ($status->description ? $status->description : get_string('nodescription', 'attendance')); diff --git a/sessions.php b/sessions.php index 18ebfb0..67a3925 100644 --- a/sessions.php +++ b/sessions.php @@ -121,7 +121,7 @@ switch ($att->pageparams->action) { $sessinfo = $att->get_session_info($sessionid); - $message = get_string('deletecheckfull', '', get_string('session', 'attendance')); + $message = get_string('deletecheckfull', 'attendance', get_string('session', 'attendance')); $message .= str_repeat(html_writer::empty_tag('br'), 2); $message .= userdate($sessinfo->sessdate, get_string('strftimedmyhm', 'attendance')); $message .= html_writer::empty_tag('br'); @@ -136,7 +136,7 @@ switch ($att->pageparams->action) { exit; case mod_attendance_sessions_page_params::ACTION_DELETE_SELECTED: $confirm = optional_param('confirm', null, PARAM_INT); - $message = get_string('deletecheckfull', '', get_string('session', 'attendance')); + $message = get_string('deletecheckfull', 'attendance', get_string('sessions', 'attendance')); if (isset($confirm) && confirm_sesskey()) { $sessionsids = required_param('sessionsids', PARAM_ALPHANUMEXT);