diff --git a/admin/judges.inc.php b/admin/judges.inc.php index ea74b77..e3f893d 100644 --- a/admin/judges.inc.php +++ b/admin/judges.inc.php @@ -77,9 +77,11 @@ function getJudgingTeams() "firstname"=>$mr->firstname, "lastname"=>$mr->lastname, "captain"=>$mr->captain, - "languages"=>$judgelangs + "languages"=>$judgelangs, + "languages_array"=>$u['languages'] ); } + $teams[$r->id]['languages_members']=$teamlangs; //we also need to add all the languages that the team must JUDGE to the teams languages. $lq=mysql_query("SELECT projects.language @@ -88,10 +90,14 @@ function getJudgingTeams() WHERE judges_teams_timeslots_projects_link.year='{$config['FAIRYEAR']}' AND judges_teams_id='$r->id' "); echo mysql_error(); + $projectlangs=array(); while($lr=mysql_fetch_object($lq)) { + if(!in_array($lr->language,$projectlangs)) + $projectlangs[]=$lr->language; if(!in_array($lr->language,$teamlangs)) $teamlangs[]=$lr->language; } + $teams[$r->id]['languages_projects']=$projectlangs; $teams[$r->id]['languages']=$teamlangs; //get the awards for this team diff --git a/admin/judges_teams_projects.php b/admin/judges_teams_projects.php index ec5763c..7b4f9c8 100644 --- a/admin/judges_teams_projects.php +++ b/admin/judges_teams_projects.php @@ -247,26 +247,22 @@ if( ($action=="edit" || $action=="assign" ) && $edit) $numprojects=0; echo ""; echo "
Timeslot | "; - echo "Project | "; + echo "".i18n("Timeslot")." | "; + echo "".i18n("Project")." | "; echo "
---|---|---|---|
";
echo " "; } - echo "id]\" type=\"button\" onclick=\"assign('$r->id')\" value=\"Assign\">"; + echo "id]\" type=\"button\" onclick=\"assign('$r->id')\" value=\"".i18n("Assign")."\">"; echo " |
";
echo "".$team['name']." (#".$team['num'].") "; @@ -353,11 +342,20 @@ if( ($action=="edit" || $action=="assign" ) && $edit) if(count($team['members'])) { foreach($team['members'] AS $member) { echo " "; + $err=false; + foreach($team['languages_projects'] AS $projectlang) { + if(!in_array($projectlang, $member['languages_array'])) { + $err=true; + break; + } + } + if($err) echo ""; if($member['captain']=="yes") echo ""; echo $member['firstname']." ".$member['lastname']." (".$member['languages'].") "; if($member['captain']=="yes") echo ""; + if($err) echo ""; } } echo " | ";
@@ -381,18 +379,16 @@ if( ($action=="edit" || $action=="assign" ) && $edit)
");
$numslots=mysql_num_rows($q);
- echo "Edit team project assignments";
+ echo "".i18n("Edit team project assignments")."";
- echo "
";
echo " "; - } - - echo " |