Fix the total check, and rename a variable to not be stupidly named

This commit is contained in:
james 2009-03-27 20:35:33 +00:00
parent 32222526a8
commit 65e4d29c58

View File

@ -160,8 +160,8 @@ function judges_scheduler_check_judges()
echo i18n("Minimum number of judges required: %1",array($minjudges['total']))."<br />";
foreach($config['languages'] AS $lkey=>$lname) {
$judgelanguagetotal[$lkey]=round($projectlanguagetotal[$lkey]/$projecttotal*$minjudges['total']);
echo "&nbsp;&nbsp; ".i18n("Minimum number of %1 judges required: %2",array($lname,$judgelanguagetotal[$lkey]))."<br />";
$minjudges[$lkey]=round($projectlanguagetotal[$lkey]/$projecttotal*$minjudges['total']);
echo "&nbsp;&nbsp; ".i18n("Minimum number of %1 judges required: %2",array($lname,$minjudges[$lkey]))."<br />";
}
echo i18n("Maximum number of judges needed: %1",array($maxjudges['total']));
@ -174,8 +174,7 @@ function judges_scheduler_check_judges()
echo "Current number of registered judges: $currentjudges";
echo "</b>";
echo "<br />";
echo "<br />";
if($currentjudges<$minjudges) {
if($currentjudges<$minjudges['total']) {
echo error(i18n("You do not have sufficient number of total judges based on your parameters"));
$ok=false;
}
@ -187,10 +186,9 @@ function judges_scheduler_check_judges()
echo mysql_error();
$jr=mysql_fetch_object($jq);
$currentjudges=$jr->num;
echo "<b>".i18n("Current number of registered judges that can judge in %1: %2",array($lname,$currentjudges))."</b>";
echo "&nbsp;&nbsp;<b>".i18n("Current number of registered judges that can judge in %1: %2",array($lname,$currentjudges))."</b>";
echo "<br />";
echo "<br />";
if($currentjudges<$judgelanguagetotal[$lkey]) {
if($currentjudges<$minjudges[$lkey]) {
echo error(i18n("You do not have sufficient number of %1 judges based on your parameters",array($lname)));
$ok=false;
}