From 876899d17fb130a2cc2b4f0547f744a2aa5697b7 Mon Sep 17 00:00:00 2001 From: justin Date: Sat, 10 Apr 2010 16:03:24 +0000 Subject: [PATCH] fix names list to use new judging team code --- admin/judging_score_edit.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/admin/judging_score_edit.php b/admin/judging_score_edit.php index 33c8ddb8..ce972ec3 100644 --- a/admin/judging_score_edit.php +++ b/admin/judging_score_edit.php @@ -25,6 +25,10 @@ require("../common.inc.php"); require_once("../user.inc.php"); require_once("judges.inc.php"); + function teamMemberToName($member) + { + return $member["firstname"] . " " . $member["lastname"]; + } user_auth_required('committee', 'admin'); send_header("Judging Score Entry - Update", array('Committee Main' => 'committee_main.php', @@ -84,19 +88,16 @@ $q=mysql_query("SELECT * FROM projectdivisions WHERE year='$year' ORDER BY id"); $i = 1; while($r=mysql_fetch_object($q)) { - $s = mysql_query("SELECT CONCAT(judges.firstname, ' ', judges.lastname) as name - FROM judges, - judges_teams_link - WHERE judges_teams_link.judges_id = judges.id - AND judges_teams_link.judges_teams_id = " . $r->judges_teams_id - ); + $team=getJudgingTeam($r->judges_teams_id); + $teamMembers=$team['members']; + $teamNames=array_map("teamMemberToName", $teamMembers); echo "\n"; echo "\n"; echo $r->num; echo "judges_teams_id\"/>\n"; echo "\n"; echo ""; - echo mysql_fetch_object($s)->name; + echo implode(", ", $teamNames); echo "\n"; echo "\n"; if($r->score) {