Add a field to show the specific special award that a special award judge has signed up for.

This commit is contained in:
james 2013-03-13 19:45:23 +00:00
parent f4e0048df8
commit 1c33c03d81

View File

@ -223,6 +223,17 @@ function report_judges_load_rounds($year)
// if($r['type'] == 'special') $round_special_awards[] = $r;
}
function report_judges_specialaward($report, $field, $text)
{
global $config, $report_judges_rounds;
$year = $report['year'];
$award_id = $text;
$q=mysql_query("SELECT * FROM award_awards WHERE id='".intval($award_id)."'");
$r=mysql_fetch_object($q);
return $r->name;
}
function report_judges_time_availability($report, $field, $text)
{
global $config, $report_judges_rounds;
@ -609,6 +620,14 @@ $report_judges_fields = array(
'table' => 'users_judge.special_award_only',
'components' => array('users_judge')),
'special_award_only_sa' => array(
'name' => 'Judge -- Special Award Only - Selected Special Award',
'header' => 'Selected Special Award',
'width' => 2.5,
'table' => 'judges_specialaward_sel.award_awards_id',
'exec_function' => 'report_judges_specialaward',
'components' => array('users_judge')),
'year' => array(
'name' => 'Judge -- Year',
'header' => 'Year',
@ -919,6 +938,7 @@ function report_judges_fromwhere($report, $components)
if(in_array('users_judge', $components)) {
$uj_from = 'LEFT JOIN users_judge ON users_judge.users_id=users.id';
$uj_from .= ' LEFT JOIN judges_specialaward_sel ON judges_specialaward_sel.users_id=users.id';
}
$teams_from = '';