forked from science-ation/science-ation
Only show projects that are eligible for an award that the team is judging for
This commit is contained in:
parent
e91dbdf4c9
commit
c7e1ec708c
@ -238,15 +238,28 @@ if( ($action=="edit" || $action=="assign" ) && $edit)
|
||||
echo mysql_error();
|
||||
|
||||
$eligibleprojects=getProjectsEligibleForAwards($award_ids);
|
||||
echo nl2br(print_r($eligibleprojects,true));
|
||||
|
||||
$numprojects=mysql_num_rows($pq);
|
||||
//the keys are the project numbers, so lets get an array of those too so we can use in_array below
|
||||
$eligibleprojectsnumbers=array_keys($eligibleprojects);
|
||||
// echo nl2br(print_r($eligibleprojects,true));
|
||||
|
||||
$numprojects=0;
|
||||
echo "<select name=\"project_id\">";
|
||||
echo "<option value=\"\">Choose Project to Assign to Timeslot</option>\n";
|
||||
while($pr=mysql_fetch_object($pq))
|
||||
{
|
||||
echo "<option value=\"$pr->id\">$pr->projectnumber - $pr->title</option>\n";
|
||||
if($_SESSION['viewstate']['judges_projects_list_eligible']=='true')
|
||||
{
|
||||
if(in_array($pr->projectnumber,$eligibleprojectsnumbers))
|
||||
{
|
||||
echo "<option value=\"$pr->id\">$pr->projectnumber - $pr->title</option>\n";
|
||||
$numprojects++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<option value=\"$pr->id\">$pr->projectnumber - $pr->title</option>\n";
|
||||
$numprojects++;
|
||||
}
|
||||
}
|
||||
echo "</select>";
|
||||
echo "</td><td>";
|
||||
|
Loading…
x
Reference in New Issue
Block a user