From eb795267d74b978156114546d3a867bf20fb4342 Mon Sep 17 00:00:00 2001 From: justin Date: Sat, 4 Apr 2009 17:09:00 +0000 Subject: [PATCH] Add original score information to the csv view --- admin/judging_score_entry.php | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/admin/judging_score_entry.php b/admin/judging_score_entry.php index d5c86c6..3382672 100644 --- a/admin/judging_score_entry.php +++ b/admin/judging_score_entry.php @@ -90,12 +90,35 @@ $ORDERBY="projects.projectcategories_id, projects.projectdivisions_id, projects. echo "".i18n("Normalized Score").""; echo "".i18n("Action").""; echo ""; + } else { + echo "Project #\tTitle\tCategory\tDivision\tScore\tNormalized Scores\tJudge Name\tJudges Score\n"; } while($r=mysql_fetch_object($q)) { if($_GET['csv'] == 'yes') { - echo "$r->projectnumber \t $r->title \t" . $cats[$r->projectcategories_id] . "\t" . $divs[$r->projectdivisions_id] . " \t $r->score \t $r->norm_score \n"; + echo "$r->projectnumber \t $r->title \t" . $cats[$r->projectcategories_id] . "\t" . $divs[$r->projectdivisions_id] . " \t $r->score \t $r->norm_score "; + $p=mysql_query("SELECT judges_teams_timeslots_projects_link.judges_teams_id, + score, + judges_teams.num + FROM judges_teams_timeslots_projects_link, + judges_teams + WHERE judges_teams_timeslots_projects_link.judges_teams_id = judges_teams.id + AND projects_id = ".mysql_real_escape_string($r->projectid)." ORDER BY judges_teams_id" + ); + echo mysql_error(); + while($s=mysql_fetch_object($p)) { + $t = 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 = " . $s->judges_teams_id + ); + + echo "\t " . mysql_fetch_object($t)->name . " \t $s->score"; + } + echo "\n"; + } else { echo ""; echo "$r->projectnumber\n";