forked from science-ation/science-ation
Make the students Date of Birth selector choose a year range based on the min/max grade of students. Assume:
minimum 3 years old in grade 0 (kindergarden) maximum 18 years old in grade 12
This commit is contained in:
parent
cf22c24c78
commit
dbaf4d9b4e
@ -276,7 +276,13 @@ else if($newstatus=="complete")
|
|||||||
echo "</td><td>\n";
|
echo "</td><td>\n";
|
||||||
emit_month_selector("month[$x]",$month);
|
emit_month_selector("month[$x]",$month);
|
||||||
echo "</td><td>\n";
|
echo "</td><td>\n";
|
||||||
emit_year_selector("year[$x]",$year,date("Y")-19,date("Y")-10);
|
|
||||||
|
//the year selector should be based on the min/max grades possible
|
||||||
|
//assume min age of 3 for grade=0 (kindergarden)
|
||||||
|
//assume max age of 18 for grade=12
|
||||||
|
$minyearselect=$config['FAIRYEAR'] - 6 - $config['maxgrade'];
|
||||||
|
$maxyearselect=$config['FAIRYEAR'] - 3 - $config['mingrade'];
|
||||||
|
emit_year_selector("year[$x]",$year,$minyearselect,$maxyearselect);
|
||||||
echo "</td><td>".REQUIREDFIELD."</td></tr></table>\n";
|
echo "</td><td>".REQUIREDFIELD."</td></tr></table>\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo " <td>".i18n("Grade")."</td><td>\n";
|
echo " <td>".i18n("Grade")."</td><td>\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user