Browse Source

Fix #332 tidy up delete message in attendance plugin.

MOODLE_33_STABLE
Dan Marsden 6 years ago
parent
commit
537ed2a0e8
  1. 2
      defaultstatus.php
  2. 1
      lang/en/attendance.php
  3. 2
      preferences.php
  4. 4
      sessions.php

2
defaultstatus.php

@ -76,7 +76,7 @@ switch ($action) {
break; 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 .= str_repeat(html_writer::empty_tag('br'), 2);
$message .= $status->acronym.': '. $message .= $status->acronym.': '.
($status->description ? $status->description : get_string('nodescription', 'attendance')); ($status->description ? $status->description : get_string('nodescription', 'attendance'));

1
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['delete'] = 'Delete';
$string['deletewarningconfirm'] = 'Are you sure you want to delete this warning?'; $string['deletewarningconfirm'] = 'Are you sure you want to delete this warning?';
$string['deletedgroup'] = 'The group associated with this session has been deleted'; $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['deletehiddensessions'] = 'Delete all hidden sessions';
$string['deletelogs'] = 'Delete attendance data'; $string['deletelogs'] = 'Delete attendance data';
$string['deleteselected'] = 'Delete selected'; $string['deleteselected'] = 'Delete selected';

2
preferences.php

@ -104,7 +104,7 @@ switch ($att->pageparams->action) {
redirect($att->url_preferences(), get_string('statusdeleted', 'attendance')); 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 .= str_repeat(html_writer::empty_tag('br'), 2);
$message .= $status->acronym.': '. $message .= $status->acronym.': '.
($status->description ? $status->description : get_string('nodescription', 'attendance')); ($status->description ? $status->description : get_string('nodescription', 'attendance'));

4
sessions.php

@ -121,7 +121,7 @@ switch ($att->pageparams->action) {
$sessinfo = $att->get_session_info($sessionid); $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 .= str_repeat(html_writer::empty_tag('br'), 2);
$message .= userdate($sessinfo->sessdate, get_string('strftimedmyhm', 'attendance')); $message .= userdate($sessinfo->sessdate, get_string('strftimedmyhm', 'attendance'));
$message .= html_writer::empty_tag('br'); $message .= html_writer::empty_tag('br');
@ -136,7 +136,7 @@ switch ($att->pageparams->action) {
exit; exit;
case mod_attendance_sessions_page_params::ACTION_DELETE_SELECTED: case mod_attendance_sessions_page_params::ACTION_DELETE_SELECTED:
$confirm = optional_param('confirm', null, PARAM_INT); $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()) { if (isset($confirm) && confirm_sesskey()) {
$sessionsids = required_param('sessionsids', PARAM_ALPHANUMEXT); $sessionsids = required_param('sessionsids', PARAM_ALPHANUMEXT);

Loading…
Cancel
Save