forked from science-ation/science-ation
Sched. judges on >1 SA team if they request
This commit is contained in:
parent
2e2b6910dc
commit
601bc4be68
@ -878,6 +878,16 @@ function judges_sa_cost_function($annealer, $bucket_id, $ids)
|
||||
$j =& $judges[$ids[$x]];
|
||||
$apref = 0;
|
||||
|
||||
/* Make sure this judge isn't on the team more than
|
||||
* once. For S-A only judges, we duplicate the judge IDs
|
||||
* so the judge can be scheduled on multiple teams */
|
||||
if($j['special_award_only'] == 'yes') {
|
||||
for($i=0; $i<count($ids); $i++) {
|
||||
if($i == $x) continue;
|
||||
if($ids[$i] == $ids[$x]) $cost += 1000;
|
||||
}
|
||||
}
|
||||
|
||||
/* See if the sa_jteam award id (what the team is judging)
|
||||
* is in the judges selection list */
|
||||
/* Run through all awards this team is judging */
|
||||
@ -916,8 +926,15 @@ if($config['scheduler_enable_sa_scheduling'] == 'yes') {
|
||||
foreach($judges as &$j) {
|
||||
foreach($round_special_awards as &$r) {
|
||||
if(judge_available_for_round($j, $r) == true) {
|
||||
$r['available_judge_ids'][] = $j['id'];
|
||||
$total_judges++; /* It's ok to count the same judge twice */
|
||||
if($j['special_award_only'] == 'yes') {
|
||||
for($i=0;$i<count($j['special_awards']);$i++) {
|
||||
$r['available_judge_ids'][] = $j['id'];
|
||||
$total_judges++; /* It's ok to count the same judge twice */
|
||||
}
|
||||
} else {
|
||||
$r['available_judge_ids'][] = $j['id'];
|
||||
$total_judges++; /* It's ok to count the same judge twice */
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user