forked from science-ation/science-ation
need to do same fix in score entry, moved name extractor to common file
This commit is contained in:
parent
876899d17f
commit
384efa3363
@ -239,6 +239,11 @@ function getJudgingEligibilityCode() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function teamMemberToName($member)
|
||||||
|
{
|
||||||
|
return $member["firstname"] . " " . $member["lastname"];
|
||||||
|
}
|
||||||
|
|
||||||
function judges_load_all()
|
function judges_load_all()
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
|
@ -25,10 +25,6 @@
|
|||||||
require("../common.inc.php");
|
require("../common.inc.php");
|
||||||
require_once("../user.inc.php");
|
require_once("../user.inc.php");
|
||||||
require_once("judges.inc.php");
|
require_once("judges.inc.php");
|
||||||
function teamMemberToName($member)
|
|
||||||
{
|
|
||||||
return $member["firstname"] . " " . $member["lastname"];
|
|
||||||
}
|
|
||||||
user_auth_required('committee', 'admin');
|
user_auth_required('committee', 'admin');
|
||||||
send_header("Judging Score Entry - Update",
|
send_header("Judging Score Entry - Update",
|
||||||
array('Committee Main' => 'committee_main.php',
|
array('Committee Main' => 'committee_main.php',
|
||||||
@ -89,8 +85,7 @@ $q=mysql_query("SELECT * FROM projectdivisions WHERE year='$year' ORDER BY id");
|
|||||||
$i = 1;
|
$i = 1;
|
||||||
while($r=mysql_fetch_object($q)) {
|
while($r=mysql_fetch_object($q)) {
|
||||||
$team=getJudgingTeam($r->judges_teams_id);
|
$team=getJudgingTeam($r->judges_teams_id);
|
||||||
$teamMembers=$team['members'];
|
$teamNames=array_map("teamMemberToName", $team['members']);
|
||||||
$teamNames=array_map("teamMemberToName", $teamMembers);
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td style=\"vertical-align: middle\">\n";
|
echo "<td style=\"vertical-align: middle\">\n";
|
||||||
echo $r->num;
|
echo $r->num;
|
||||||
|
@ -108,14 +108,9 @@ $ORDERBY="projects.projectcategories_id, projects.projectdivisions_id, projects.
|
|||||||
);
|
);
|
||||||
echo mysql_error();
|
echo mysql_error();
|
||||||
while($s=mysql_fetch_object($p)) {
|
while($s=mysql_fetch_object($p)) {
|
||||||
$t = mysql_query("SELECT CONCAT(judges.firstname, ' ', judges.lastname) as name
|
$team=getJudgingTeam($s->judges_teams_id);
|
||||||
FROM judges,
|
$teamNames=array_map("teamMemberToName", $team['members']);
|
||||||
judges_teams_link
|
echo "\t " . implode(", ", $teamNames) . " \t $s->score";
|
||||||
WHERE judges_teams_link.judges_id = judges.id
|
|
||||||
AND judges_teams_link.judges_teams_id = " . $s->judges_teams_id
|
|
||||||
);
|
|
||||||
|
|
||||||
echo "\t " . mysql_fetch_object($t)->name . " \t $s->score";
|
|
||||||
}
|
}
|
||||||
echo "\n";
|
echo "\n";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user