forked from science-ation/science-ation
Show language problems when a judge is assigned to judge projects in a different language
This commit is contained in:
parent
4d0f607981
commit
2f6683d014
@ -46,6 +46,7 @@ function getJudgingTeams()
|
|||||||
echo mysql_error();
|
echo mysql_error();
|
||||||
|
|
||||||
|
|
||||||
|
$teamlangs=array();
|
||||||
while($mr=mysql_fetch_object($mq))
|
while($mr=mysql_fetch_object($mq))
|
||||||
{
|
{
|
||||||
$lq=mysql_query("SELECT * FROM judges_languages WHERE judges_id='$mr->judges_id'");
|
$lq=mysql_query("SELECT * FROM judges_languages WHERE judges_id='$mr->judges_id'");
|
||||||
@ -53,6 +54,8 @@ function getJudgingTeams()
|
|||||||
if(mysql_num_rows($lq)) {
|
if(mysql_num_rows($lq)) {
|
||||||
while($lr=mysql_fetch_object($lq)) {
|
while($lr=mysql_fetch_object($lq)) {
|
||||||
$judgelangs.="$lr->languages_lang/";
|
$judgelangs.="$lr->languages_lang/";
|
||||||
|
if(!in_array($lr->languages_lang,$teamlangs))
|
||||||
|
$teamlangs[]=$lr->languages_lang;
|
||||||
}
|
}
|
||||||
$judgelangs=substr($judgelangs,0,-1);
|
$judgelangs=substr($judgelangs,0,-1);
|
||||||
}
|
}
|
||||||
@ -64,6 +67,7 @@ function getJudgingTeams()
|
|||||||
"languages"=>$judgelangs
|
"languages"=>$judgelangs
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
$teams[$r->id]['languages']=$teamlangs;
|
||||||
|
|
||||||
//get the awards for this team
|
//get the awards for this team
|
||||||
$aq=mysql_query("SELECT award_awards.id,
|
$aq=mysql_query("SELECT award_awards.id,
|
||||||
|
@ -337,7 +337,7 @@ if( ($action=="edit" || $action=="assign" ) && $edit)
|
|||||||
{
|
{
|
||||||
echo "<input type=\"hidden\" name=\"action\" value=\"assign\">";
|
echo "<input type=\"hidden\" name=\"action\" value=\"assign\">";
|
||||||
|
|
||||||
echo "<table class=\"summarytable\">";
|
echo "<table class=\"tableview\">";
|
||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
echo "<th>".i18n("Team")."</th>";
|
echo "<th>".i18n("Team")."</th>";
|
||||||
echo "<th>".i18n("Timeslots and Projects")."</th>";
|
echo "<th>".i18n("Timeslots and Projects")."</th>";
|
||||||
@ -357,10 +357,9 @@ if( ($action=="edit" || $action=="assign" ) && $edit)
|
|||||||
echo " ";
|
echo " ";
|
||||||
if($member['captain']=="yes")
|
if($member['captain']=="yes")
|
||||||
echo "<i>";
|
echo "<i>";
|
||||||
echo $member['firstname']." ".$member['lastname']."<br />";
|
echo $member['firstname']." ".$member['lastname']." (".$member['languages'].")<br />";
|
||||||
if($member['captain']=="yes")
|
if($member['captain']=="yes")
|
||||||
echo "</i>";
|
echo "</i>";
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo "</td>";
|
echo "</td>";
|
||||||
@ -405,7 +404,8 @@ if( ($action=="edit" || $action=="assign" ) && $edit)
|
|||||||
$projq=mysql_query("SELECT
|
$projq=mysql_query("SELECT
|
||||||
projects.projectnumber,
|
projects.projectnumber,
|
||||||
projects.id,
|
projects.id,
|
||||||
projects.title
|
projects.title,
|
||||||
|
projects.language
|
||||||
FROM
|
FROM
|
||||||
projects,
|
projects,
|
||||||
judges_teams_timeslots_projects_link
|
judges_teams_timeslots_projects_link
|
||||||
@ -419,9 +419,16 @@ if( ($action=="edit" || $action=="assign" ) && $edit)
|
|||||||
");
|
");
|
||||||
|
|
||||||
echo mysql_Error();
|
echo mysql_Error();
|
||||||
while($proj=mysql_fetch_object($projq))
|
while($proj=mysql_fetch_object($projq)) {
|
||||||
{
|
if(!in_array($proj->language,$team['languages']))
|
||||||
echo "$proj->projectnumber - $proj->title <br />";
|
echo "<span class=\"error\">";
|
||||||
|
|
||||||
|
echo "$proj->projectnumber - $proj->title ($proj->language)";
|
||||||
|
|
||||||
|
if(!in_array($proj->language,$team['languages']))
|
||||||
|
echo "<span>\n";
|
||||||
|
echo "<br />";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user