forked from science-ation/science-ation
Fix the total check, and rename a variable to not be stupidly named
This commit is contained in:
parent
32222526a8
commit
65e4d29c58
@ -160,8 +160,8 @@ function judges_scheduler_check_judges()
|
|||||||
echo i18n("Minimum number of judges required: %1",array($minjudges['total']))."<br />";
|
echo i18n("Minimum number of judges required: %1",array($minjudges['total']))."<br />";
|
||||||
|
|
||||||
foreach($config['languages'] AS $lkey=>$lname) {
|
foreach($config['languages'] AS $lkey=>$lname) {
|
||||||
$judgelanguagetotal[$lkey]=round($projectlanguagetotal[$lkey]/$projecttotal*$minjudges['total']);
|
$minjudges[$lkey]=round($projectlanguagetotal[$lkey]/$projecttotal*$minjudges['total']);
|
||||||
echo " ".i18n("Minimum number of %1 judges required: %2",array($lname,$judgelanguagetotal[$lkey]))."<br />";
|
echo " ".i18n("Minimum number of %1 judges required: %2",array($lname,$minjudges[$lkey]))."<br />";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo i18n("Maximum number of judges needed: %1",array($maxjudges['total']));
|
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 "Current number of registered judges: $currentjudges";
|
||||||
echo "</b>";
|
echo "</b>";
|
||||||
echo "<br />";
|
echo "<br />";
|
||||||
echo "<br />";
|
if($currentjudges<$minjudges['total']) {
|
||||||
if($currentjudges<$minjudges) {
|
|
||||||
echo error(i18n("You do not have sufficient number of total judges based on your parameters"));
|
echo error(i18n("You do not have sufficient number of total judges based on your parameters"));
|
||||||
$ok=false;
|
$ok=false;
|
||||||
}
|
}
|
||||||
@ -187,10 +186,9 @@ function judges_scheduler_check_judges()
|
|||||||
echo mysql_error();
|
echo mysql_error();
|
||||||
$jr=mysql_fetch_object($jq);
|
$jr=mysql_fetch_object($jq);
|
||||||
$currentjudges=$jr->num;
|
$currentjudges=$jr->num;
|
||||||
echo "<b>".i18n("Current number of registered judges that can judge in %1: %2",array($lname,$currentjudges))."</b>";
|
echo " <b>".i18n("Current number of registered judges that can judge in %1: %2",array($lname,$currentjudges))."</b>";
|
||||||
echo "<br />";
|
echo "<br />";
|
||||||
echo "<br />";
|
if($currentjudges<$minjudges[$lkey]) {
|
||||||
if($currentjudges<$judgelanguagetotal[$lkey]) {
|
|
||||||
echo error(i18n("You do not have sufficient number of %1 judges based on your parameters",array($lname)));
|
echo error(i18n("You do not have sufficient number of %1 judges based on your parameters",array($lname)));
|
||||||
$ok=false;
|
$ok=false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user