forked from science-ation/science-ation
Check for minimum teams based on language as well.... this causes things to not "add up" properly but
that is kind of intended..., ie the "total" doesnt equal "english + french"... but its a lot better than it was (it now tells ottawa that we dont have enough french judges, which is correct.)
This commit is contained in:
parent
fcccfd16c0
commit
123cee67d3
@ -140,32 +140,47 @@ function judges_scheduler_check_judges()
|
||||
$totalteams['total'] = 0;
|
||||
echo "<table border=1 width=\"85%\"><tr><th></th>".
|
||||
"<th colspan=\"".(count($config['languages'])+1)."\">".i18n("Projects")."</th>".
|
||||
"<th>".i18n("Required Teams")."</th></tr>";
|
||||
"<th colspan=\"".(count($config['languages'])+1)."\">".i18n("Estimated Required Teams")."</th></tr>";
|
||||
|
||||
echo "<tr>";
|
||||
echo "<th></th><th>".i18n("Total")."</th>";
|
||||
foreach($config['languages'] AS $lkey=>$lname)
|
||||
echo "<th>$lkey</th>";
|
||||
echo "<th></th>";
|
||||
echo "<th>".i18n("Total")."</th>";
|
||||
foreach($config['languages'] AS $lkey=>$lname)
|
||||
echo "<th>$lkey</th>";
|
||||
echo "</tr>\n";
|
||||
|
||||
foreach($jdiv AS $jdiv_id=>$jd) {
|
||||
$c = $jd['num_projects']['total'];
|
||||
foreach($jdiv AS $jdiv_id=>$jd) {
|
||||
$c = $jd['num_projects']['total'];
|
||||
|
||||
//total judge teams calculation
|
||||
$t['total']=ceil($c/$config['max_projects_per_team']*$config['times_judged']);
|
||||
if($t['total'] < $config['times_judged'] && $c>0) $t['total'] = $config['times_judged'];
|
||||
$jdiv[$jdiv_id]['num_jteams']['total'] = $t['total'];
|
||||
$totalteams['total']+=$t['total'];
|
||||
//total judge teams calculation
|
||||
$t['total']=ceil($c/$config['max_projects_per_team']*$config['times_judged']);
|
||||
if($t['total'] < $config['times_judged'] && $c>0) $t['total'] = $config['times_judged'];
|
||||
$jdiv[$jdiv_id]['num_jteams']['total'] = $t['total'];
|
||||
$totalteams['total']+=$t['total'];
|
||||
//language teams calculation
|
||||
foreach($config['languages'] AS $lkey=>$lname) {
|
||||
$c = $jd['num_projects'][$lkey];
|
||||
$t['total_'.$lkey]=ceil($c/$config['max_projects_per_team']*$config['times_judged']);
|
||||
if($t['total_'.$lkey] < $config['times_judged'] && $c>0) $t['total_'.$lkey] = $config['times_judged'];
|
||||
$jdiv[$jdiv_id]['num_jteams']['total_'.$lkey] = $t['total_'.$lkey];
|
||||
$totalteams['total_'.$lkey]+=$t['total_'.$lkey];
|
||||
}
|
||||
|
||||
echo "<tr><td>Judging Division Group $jdiv_id</td>";
|
||||
echo "<td align=\"center\">$c</td>";
|
||||
$langstr="";
|
||||
foreach($config['languages'] AS $lkey=>$lname) {
|
||||
$clang=($jd['num_projects'][$lkey]?$jd['num_projects'][$lkey]:0);
|
||||
echo "<td align=\"center\">$clang</td>";
|
||||
echo "<tr><td>Judging Division Group $jdiv_id</td>";
|
||||
echo "<td align=\"center\">$c</td>";
|
||||
$langstr="";
|
||||
foreach($config['languages'] AS $lkey=>$lname) {
|
||||
$clang=($jd['num_projects'][$lkey]?$jd['num_projects'][$lkey]:0);
|
||||
echo "<td align=\"center\">$clang</td>";
|
||||
}
|
||||
echo "<td align=\"center\">{$t['total']}</td>";
|
||||
foreach($config['languages'] AS $lkey=>$lname) {
|
||||
$clang=($jd['num_projects'][$lkey]?$jd['num_projects'][$lkey]:0);
|
||||
//echo "<td align=\"center\">{$t['total']}</td>";
|
||||
echo "<td align=\"center\">{$t['total_'.$lkey]}</td>";
|
||||
}
|
||||
|
||||
echo "</tr>";
|
||||
}
|
||||
@ -182,7 +197,7 @@ function judges_scheduler_check_judges()
|
||||
|
||||
foreach($config['languages'] AS $lkey=>$lname) {
|
||||
if($minjudges['total'] && $projecttotal)
|
||||
$minjudges[$lkey]=round($projectlanguagetotal[$lkey]/$projecttotal*$minjudges['total']);
|
||||
$minjudges[$lkey]=round($totalteams['total_'.$lkey]*$config['min_judges_per_team']); //$projectlanguagetotal[$lkey]/$projecttotal*$minjudges['total']);
|
||||
else
|
||||
$minjudges[$lkey]=0;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user