diff --git a/input.php b/input.php --- a/input.php +++ b/input.php @@ -42,24 +42,25 @@ var sectionsOfClass = Array(); /* * Force a student to choose a school or declare he's a generic - * student before displaying the input form. + * student before displaying the input form. To do this, we need + * another variable in $_SESSION: $_SESSION['school_chosen']. */ $school = $inputPage->get_school(); -if ($_REQUEST['setted'] == 1 || $school['id'] != 'default') - $_SESSION['school_setted'] = TRUE; +if ($_REQUEST['school'] == 1 || $school['id'] != 'default') + $_SESSION['school_chosen'] = TRUE; if ($_REQUEST['selectschool'] == 1 - || $school['id'] == 'default' && !isset($_SESSION['school_setted'])) + || $school['id'] == 'default' && !isset($_SESSION['school_chosen'])) { ?>
Choose the school you attend from the list below. If you cannot find your school, you may proceed using - the generic + the generic settings.
showSchools('input.php?setted=1'); + $inputPage->showSchools('input.php'); $inputPage->foot(); exit; }