Show language problems when a judge is assigned to judge projects in a different language

This commit is contained in:
james 2009-04-02 16:35:02 +00:00
parent 4d0f607981
commit 2f6683d014
2 changed files with 18 additions and 7 deletions

View File

@ -46,6 +46,7 @@ function getJudgingTeams()
echo mysql_error();
$teamlangs=array();
while($mr=mysql_fetch_object($mq))
{
$lq=mysql_query("SELECT * FROM judges_languages WHERE judges_id='$mr->judges_id'");
@ -53,6 +54,8 @@ function getJudgingTeams()
if(mysql_num_rows($lq)) {
while($lr=mysql_fetch_object($lq)) {
$judgelangs.="$lr->languages_lang/";
if(!in_array($lr->languages_lang,$teamlangs))
$teamlangs[]=$lr->languages_lang;
}
$judgelangs=substr($judgelangs,0,-1);
}
@ -64,6 +67,7 @@ function getJudgingTeams()
"languages"=>$judgelangs
);
}
$teams[$r->id]['languages']=$teamlangs;
//get the awards for this team
$aq=mysql_query("SELECT award_awards.id,

View File

@ -337,7 +337,7 @@ if( ($action=="edit" || $action=="assign" ) && $edit)
{
echo "<input type=\"hidden\" name=\"action\" value=\"assign\">";
echo "<table class=\"summarytable\">";
echo "<table class=\"tableview\">";
echo "<tr>";
echo "<th>".i18n("Team")."</th>";
echo "<th>".i18n("Timeslots and Projects")."</th>";
@ -357,10 +357,9 @@ if( ($action=="edit" || $action=="assign" ) && $edit)
echo "&nbsp;&nbsp;";
if($member['captain']=="yes")
echo "<i>";
echo $member['firstname']." ".$member['lastname']."<br />";
echo $member['firstname']." ".$member['lastname']." (".$member['languages'].")<br />";
if($member['captain']=="yes")
echo "</i>";
}
}
echo "</td>";
@ -405,7 +404,8 @@ if( ($action=="edit" || $action=="assign" ) && $edit)
$projq=mysql_query("SELECT
projects.projectnumber,
projects.id,
projects.title
projects.title,
projects.language
FROM
projects,
judges_teams_timeslots_projects_link
@ -419,9 +419,16 @@ if( ($action=="edit" || $action=="assign" ) && $edit)
");
echo mysql_Error();
while($proj=mysql_fetch_object($projq))
{
echo "$proj->projectnumber - $proj->title <br />";
while($proj=mysql_fetch_object($projq)) {
if(!in_array($proj->language,$team['languages']))
echo "<span class=\"error\">";
echo "$proj->projectnumber - $proj->title ($proj->language)";
if(!in_array($proj->language,$team['languages']))
echo "<span>\n";
echo "<br />";
}