Fix for bug #460, missing column prevented the Judges report from generating successfully

This commit is contained in:
jacob 2010-03-26 15:52:03 +00:00
parent 14ea96dddc
commit 6e4d1018f8

View File

@ -533,7 +533,8 @@ $report_judges_fields = array(
'name' => 'Judge -- Special Award Only Requested',
'header' => 'SA Only',
'width' => 0.8,
'table' => 'users_judge.special_award_only'),
'table' => 'users_judge.special_award_only',
'components' => array('users_judge')),
'year' => array(
'name' => 'Judge -- Year',
@ -812,11 +813,13 @@ function report_judges_update_cats($year)
echo "Not enough judge age category fields, please file a bug report at sfiab.ca and report that you have ".count($report_judges_cats[$year])." age categories, but the system can handle a maximum of 10.";
exit;
}
foreach($report_judges_cats[$year] as $cat_id=>$d) {
$f = "cat_pref_$cat_id";
$report_judges_fields[$f]['header'] = "{$d['category_shortform']} - {$d['category']}";
$report_judges_fields[$f]['name'] = 'Judge -- Preference for Age Category: '.$d['category'];
$report_judges_fields[$f]['editor_disabled'] = false;
if(is_array($report_judges_cats[$year])){
foreach($report_judges_cats[$year] as $cat_id=>$d) {
$f = "cat_pref_$cat_id";
$report_judges_fields[$f]['header'] = "{$d['category_shortform']} - {$d['category']}";
$report_judges_fields[$f]['name'] = 'Judge -- Preference for Age Category: '.$d['category'];
$report_judges_fields[$f]['editor_disabled'] = false;
}
}
}