Copyright (C) 2011 Dennis Spanogle This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ?> SFIAB Evaluations Calculate scores Note: For now, this just calculates scores for every project in table 'judges_teams_timeslots_projects_link'
"; echo " and lists just the project number for each and then lists the details for the last project in the list.

"; echo " and storese the results into table eval_projects and 'judges_teams_timeslots_projects_link' score field

"; // do all projects $q = mysql_query("SELECT DISTINCT projects_id from judges_teams_timeslots_projects_link"); while($r=mysql_fetch_object($q)) { $ret_array = calc_scores($r->projects_id); if($ret_array == 'error') { echo " error"; } else{ echo " ".$ret_array[project_num]; // put scores in 'judges_teams_timeslots_projects_link' for ($i=0;$i < $ret_array[num_teams]; $i++){ $team_id = $ret_array[team_scores][$i][team_id]; $score = $ret_array[team_scores][$i][team_score]; if (is_null($score)) {$score = "NULL";} $up = mysql_query("UPDATE judges_teams_timeslots_projects_link SET score = ".$score. " WHERE judges_teams_id = '".$team_id."' AND projects_id = '".$r->projects_id."' "); } } } echo "

"; // this just prints out the values in the last project if ($ret_array =="error"){ echo $ret_array; } else { for ($i=0;$i < $ret_array[num_teams]; $i++){ echo "team_id=".$ret_array[team_scores][$i][team_id]." team_num= ".$ret_array[team_scores][$i][team_num] ."project_num = ". $ret_array[team_scores][$i][proj_num] ." score =".$ret_array[team_scores][$i][team_score]. " status = ".$ret_array[team_scores][$i][team_status] ."
"; } echo "Project number ".$ret_array[project_num].": score= ".$ret_array[eval_score]." status = ".$ret_array[eval_score_status]."
"; } exit; ?>