Add a workaround to always show the school selector and save its value if there is no school selected yet, even if the type is invite or schoolpassword

This commit is contained in:
james 2006-02-24 18:15:18 +00:00
parent e5d03b07a9
commit 2a5da6597d

View File

@ -121,7 +121,7 @@ if($_POST['action']=="save")
{
//if they use schoolpassword or singlepassword, then we dont need to save teh schools_id because its already set when they inserted the record, and we dont allow them to change their school.
if($config['participant_registration_type']=="schoolpassword" || $config['participant_registration_type']=="invite")
if(( $config['participant_registration_type']=="schoolpassword" || $config['participant_registration_type']=="invite") && !$_POST['schools_id'])
{
$schoolquery="";
}
@ -381,7 +381,7 @@ if($config['participant_student_personal']=="yes")
echo "<tr>\n";
echo " <td>".i18n("School")."</td><td colspan=\"3\">";
if($config['participant_registration_type']=="open" || $config['participant_registration_type']=="singlepassword" )
if( $config['participant_registration_type']=="open" || $config['participant_registration_type']=="singlepassword" || !$studentinfo->schools_id )
{
$schoolq=mysql_query("SELECT id,school FROM schools WHERE year='".$config['FAIRYEAR']."' ORDER by school");
echo "<select name=\"schools_id[$x]\">\n";