From 0f73afab7f3e3b4aa86c1dab51987e7eeeb1cae6 Mon Sep 17 00:00:00 2001 From: jere99 Date: Sun, 25 Nov 2018 14:43:23 -0500 Subject: [PATCH] small logical fix for vacation travel form --- local/mxschool/vacation_travel/vacation_form.php | 4 ++-- local/mxschool/version.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/local/mxschool/vacation_travel/vacation_form.php b/local/mxschool/vacation_travel/vacation_form.php index eeea2493..319f79b3 100644 --- a/local/mxschool/vacation_travel/vacation_form.php +++ b/local/mxschool/vacation_travel/vacation_form.php @@ -133,7 +133,7 @@ public function validation($data, $files) { $errors['dep_details'] = get_string('vacation_travel_form_error_nodriver', 'local_mxschool'); } else if ($data['dep_type'] === 'Non-MX Bus') { $errors['dep_details'] = get_string('vacation_travel_form_error_nodetails', 'local_mxschool'); - } else if ($data['dep_site'] === '0') { + } else if ($data['dep_mxtransportation'] && $data['dep_site'] === '0') { $errors['dep_details'] = get_string('vacation_travel_form_error_noother', 'local_mxschool'); } } @@ -175,7 +175,7 @@ public function validation($data, $files) { $errors['ret_details'] = get_string('vacation_travel_form_error_nodriver', 'local_mxschool'); } else if ($data['ret_type'] === 'Non-MX Bus') { $errors['ret_details'] = get_string('vacation_travel_form_error_nodetails', 'local_mxschool'); - } else if ($data['ret_site'] === '0') { + } else if ($data['ret_mxtransportation'] && $data['ret_site'] === '0') { $errors['ret_details'] = get_string('vacation_travel_form_error_noother', 'local_mxschool'); } } diff --git a/local/mxschool/version.php b/local/mxschool/version.php index 9ae439f7..989a7642 100644 --- a/local/mxschool/version.php +++ b/local/mxschool/version.php @@ -27,7 +27,7 @@ defined('MOODLE_INTERNAL') || die(); $plugin->component = 'local_mxschool'; -$plugin->version = 2018110600; +$plugin->version = 2018112500; $plugin->release = 'v3.0'; $plugin->requires = 2017111300; // Moodle 3.4+. $plugin->maturity = MATURITY_RC; // Release Candidiate for v3.0