diff --git a/admin/judges.inc.php b/admin/judges.inc.php index 402d588..ea74b77 100644 --- a/admin/judges.inc.php +++ b/admin/judges.inc.php @@ -80,6 +80,18 @@ function getJudgingTeams() "languages"=>$judgelangs ); } + + //we also need to add all the languages that the team must JUDGE to the teams languages. + $lq=mysql_query("SELECT projects.language + FROM judges_teams_timeslots_projects_link + LEFT JOIN projects ON judges_teams_timeslots_projects_link.projects_id=projects.id + WHERE judges_teams_timeslots_projects_link.year='{$config['FAIRYEAR']}' AND + judges_teams_id='$r->id' "); + echo mysql_error(); + while($lr=mysql_fetch_object($lq)) { + if(!in_array($lr->language,$teamlangs)) + $teamlangs[]=$lr->language; + } $teams[$r->id]['languages']=$teamlangs; //get the awards for this team diff --git a/admin/judges_teams_members.php b/admin/judges_teams_members.php index 626caa8..c3bff62 100644 --- a/admin/judges_teams_members.php +++ b/admin/judges_teams_members.php @@ -297,27 +297,33 @@ function switchjudgeinfo() echo "\n"; echo ""; foreach($team['rounds'] as $ts) { - echo "{$ts['name']}: {$ts['starttime']} - {$ts['endtime']}
"; + echo "{$ts['name']}: ".format_time($ts['starttime'])." - ".format_time($ts['endtime'])."
"; } echo ""; - if(count($team['members'])) - { - foreach($team['members'] AS $member) - { + if(count($team['members'])) { + foreach($team['members'] AS $member) { $j = &$judgelist[$member['id']]; echo ""; + + $langerr=false; + foreach($team['languages'] AS $teamlang) { + if(!in_array($teamlang,$j['languages'])) { + $langerr=true; + break; + } + } + echo ""; echo ""; - if($member['captain']=="yes") - { + if($langerr) echo ""; + if($member['captain']=="yes") { echo ""; echo ""; echo " "; } - else - { + else { echo ""; echo ""; echo " "; @@ -328,7 +334,8 @@ function switchjudgeinfo() if(is_array($j['languages'])) $l = is_array($j['languages']) ? join(' ',$j['languages']) : ''; - echo " ($l)"; + echo " ($l)\n"; + if($langerr) echo "\n"; echo ""; }