From 9ebe7306896e3ff5d25ce2cd216f6209cccaee78 Mon Sep 17 00:00:00 2001 From: Barry Oosthuizen Date: Wed, 23 Sep 2015 09:52:13 +0100 Subject: [PATCH] Fix issue #159 - Delete no selected sessions --- sessions.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sessions.php b/sessions.php index 2b93633..f65aedd 100644 --- a/sessions.php +++ b/sessions.php @@ -126,8 +126,10 @@ switch ($att->pageparams->action) { } redirect($att->url_manage(), get_string('sessiondeleted', 'attendance')); } - $sessid = required_param_array('sessid', PARAM_SEQUENCE); - + $sessid = optional_param_array('sessid', '', PARAM_SEQUENCE); + if (empty($sessid)) { + print_error('nosessionsselected', 'attendance', $att->url_manage()); + } $sessionsinfo = $att->get_sessions_info($sessid); $message = get_string('deletecheckfull', '', get_string('session', 'attendance'));