forked from science-ation/science-ation
- Sort schools by city for the students. When your schools list is 2000+
schools, with 8 "MacKenzie King Elementary School"s it makes the correct school much easier to find.
This commit is contained in:
parent
2aeaf7bea9
commit
4c71598eab
@ -400,13 +400,13 @@ if($config['participant_student_personal']=="yes")
|
||||
echo " <td>".i18n("School")."</td><td colspan=\"3\">";
|
||||
if( $config['participant_registration_type']=="open" || $config['participant_registration_type']=="singlepassword" || $config['participant_registration_type']=="openorinvite" || ($studentinfo && !$studentinfo->schools_id) )
|
||||
{
|
||||
$schoolq=mysql_query("SELECT id,school FROM schools WHERE year='".$config['FAIRYEAR']."' ORDER by school");
|
||||
$schoolq=mysql_query("SELECT id,school,city FROM schools WHERE year='".$config['FAIRYEAR']."' ORDER by city,school");
|
||||
echo "<select name=\"schools_id[$x]\">\n";
|
||||
echo "<option value=\"\">".i18n("Choose School")."</option>\n";
|
||||
while($r=mysql_fetch_object($schoolq))
|
||||
{
|
||||
if($studentinfo->schools_id==$r->id) $sel="selected=\"selected\""; else $sel="";
|
||||
echo "<option $sel value=\"$r->id\">".htmlspecialchars($r->school)."</option>\n";
|
||||
echo "<option $sel value=\"$r->id\">".htmlspecialchars($r->city).' - '.htmlspecialchars($r->school)."</option>\n";
|
||||
|
||||
}
|
||||
echo "</select>".REQUIREDFIELD;
|
||||
|
Loading…
Reference in New Issue
Block a user