forked from science-ation/science-ation
southern kentucky has 35 divisions. So support up to 50.
This commit is contained in:
parent
faa3742bda
commit
fb6da3764f
@ -348,86 +348,17 @@ $report_judges_fields = array(
|
|||||||
'exec_function' => 'report_judges_divs_at_exp', /* Yes, the same function as divs_at_exp_5 */
|
'exec_function' => 'report_judges_divs_at_exp', /* Yes, the same function as divs_at_exp_5 */
|
||||||
'components' => array('users_judge')),
|
'components' => array('users_judge')),
|
||||||
|
|
||||||
'div_exp_1' => array(
|
/* Fill these in below, they're all the same */
|
||||||
'name' => 'Judge -- Expertise for Division ID 1',
|
'div_exp_1' => array(), 'div_exp_2' => array(), 'div_exp_3' => array(), 'div_exp_4' => array(), 'div_exp_5' => array(),
|
||||||
'header' => 'div1',
|
'div_exp_6' => array(), 'div_exp_7' => array(), 'div_exp_8' => array(), 'div_exp_9' => array(), 'div_exp_10' => array(),
|
||||||
'width' => 0.5,
|
'div_exp_11' => array(), 'div_exp_12' => array(), 'div_exp_13' => array(), 'div_exp_14' => array(), 'div_exp_15' => array(),
|
||||||
'table' => 'users_judge.div_prefs',
|
'div_exp_16' => array(), 'div_exp_17' => array(), 'div_exp_18' => array(), 'div_exp_19' => array(), 'div_exp_20' => array(),
|
||||||
'editor_disabled' => true, /* Only disables in the report editor, a report can still use it */
|
'div_exp_21' => array(), 'div_exp_22' => array(), 'div_exp_23' => array(), 'div_exp_24' => array(), 'div_exp_25' => array(),
|
||||||
'exec_function' => 'report_judges_div_exp',
|
'div_exp_26' => array(), 'div_exp_27' => array(), 'div_exp_28' => array(), 'div_exp_29' => array(), 'div_exp_30' => array(),
|
||||||
'components' => array('users_judge')),
|
'div_exp_31' => array(), 'div_exp_32' => array(), 'div_exp_33' => array(), 'div_exp_34' => array(), 'div_exp_35' => array(),
|
||||||
'div_exp_2' => array(
|
'div_exp_36' => array(), 'div_exp_37' => array(), 'div_exp_38' => array(), 'div_exp_39' => array(), 'div_exp_40' => array(),
|
||||||
'name' => 'Judge -- Expertise for Division ID 2',
|
'div_exp_41' => array(), 'div_exp_42' => array(), 'div_exp_43' => array(), 'div_exp_44' => array(), 'div_exp_45' => array(),
|
||||||
'header' => 'div2',
|
'div_exp_46' => array(), 'div_exp_47' => array(), 'div_exp_48' => array(), 'div_exp_49' => array(), 'div_exp_50' => array(),
|
||||||
'width' => 0.5,
|
|
||||||
'table' => 'users_judge.div_prefs',
|
|
||||||
'editor_disabled' => true,
|
|
||||||
'exec_function' => 'report_judges_div_exp',
|
|
||||||
'components' => array('users_judge')),
|
|
||||||
'div_exp_3' => array(
|
|
||||||
'name' => 'Judge -- Expertise for Division ID 3',
|
|
||||||
'header' => 'div3',
|
|
||||||
'width' => 0.5,
|
|
||||||
'table' => 'users_judge.div_prefs',
|
|
||||||
'editor_disabled' => true,
|
|
||||||
'exec_function' => 'report_judges_div_exp',
|
|
||||||
'components' => array('users_judge')),
|
|
||||||
'div_exp_4' => array(
|
|
||||||
'name' => 'Judge -- Expertise for Division ID 4',
|
|
||||||
'header' => 'div4',
|
|
||||||
'width' => 0.5,
|
|
||||||
'table' => 'users_judge.div_prefs',
|
|
||||||
'editor_disabled' => true,
|
|
||||||
'exec_function' => 'report_judges_div_exp',
|
|
||||||
'components' => array('users_judge')),
|
|
||||||
'div_exp_5' => array(
|
|
||||||
'name' => 'Judge -- Expertise for Division ID 5',
|
|
||||||
'header' => 'div5',
|
|
||||||
'width' => 0.5,
|
|
||||||
'table' => 'users_judge.div_prefs',
|
|
||||||
'editor_disabled' => true,
|
|
||||||
'exec_function' => 'report_judges_div_exp',
|
|
||||||
'components' => array('users_judge')),
|
|
||||||
'div_exp_6' => array(
|
|
||||||
'name' => 'Judge -- Expertise for Division ID 6',
|
|
||||||
'header' => 'div6',
|
|
||||||
'width' => 0.5,
|
|
||||||
'table' => 'users_judge.div_prefs',
|
|
||||||
'editor_disabled' => true,
|
|
||||||
'exec_function' => 'report_judges_div_exp',
|
|
||||||
'components' => array('users_judge')),
|
|
||||||
'div_exp_7' => array(
|
|
||||||
'name' => 'Judge -- Expertise for Division ID 7',
|
|
||||||
'header' => 'div7',
|
|
||||||
'width' => 0.5,
|
|
||||||
'table' => 'users_judge.div_prefs',
|
|
||||||
'editor_disabled' => true,
|
|
||||||
'exec_function' => 'report_judges_div_exp',
|
|
||||||
'components' => array('users_judge')),
|
|
||||||
'div_exp_8' => array(
|
|
||||||
'name' => 'Judge -- Expertise for Division ID 8',
|
|
||||||
'header' => 'div8',
|
|
||||||
'width' => 0.5,
|
|
||||||
'table' => 'users_judge.div_prefs',
|
|
||||||
'editor_disabled' => true,
|
|
||||||
'exec_function' => 'report_judges_div_exp',
|
|
||||||
'components' => array('users_judge')),
|
|
||||||
'div_exp_9' => array(
|
|
||||||
'name' => 'Judge -- Expertise for Division ID 9',
|
|
||||||
'header' => 'div9',
|
|
||||||
'width' => 0.5,
|
|
||||||
'table' => 'users_judge.div_prefs',
|
|
||||||
'editor_disabled' => true,
|
|
||||||
'exec_function' => 'report_judges_div_exp',
|
|
||||||
'components' => array('users_judge')),
|
|
||||||
'div_exp_10' => array(
|
|
||||||
'name' => 'Judge -- Expertise for Division ID 10',
|
|
||||||
'header' => 'div10',
|
|
||||||
'width' => 0.5,
|
|
||||||
'table' => 'users_judge.div_prefs',
|
|
||||||
'editor_disabled' => true,
|
|
||||||
'exec_function' => 'report_judges_div_exp',
|
|
||||||
'components' => array('users_judge')),
|
|
||||||
|
|
||||||
/* Category preferences */
|
/* Category preferences */
|
||||||
|
|
||||||
@ -747,6 +678,19 @@ $report_judges_fields = array(
|
|||||||
'table' => "CONCAT(' ')"),
|
'table' => "CONCAT(' ')"),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/* Fill in big expansions */
|
||||||
|
/* div_exp */
|
||||||
|
for($x=1;$x<=50;$x++) {
|
||||||
|
$f = "div_exp_$x";
|
||||||
|
$report_judges_fields["div_exp_$x"] = array(
|
||||||
|
'name' => "Judge -- Expertise for Division ID $x",
|
||||||
|
'header' => "div$x",
|
||||||
|
'width' => 0.5,
|
||||||
|
'table' => 'users_judge.div_prefs',
|
||||||
|
'editor_disabled' => true, /* Only disables in the report editor, a report can still use it */
|
||||||
|
'exec_function' => 'report_judges_div_exp',
|
||||||
|
'components' => array('users_judge'));
|
||||||
|
}
|
||||||
|
|
||||||
/* Overwrite the question_1 .. question_10 fields with the
|
/* Overwrite the question_1 .. question_10 fields with the
|
||||||
* question name and header from the list of questions */
|
* question name and header from the list of questions */
|
||||||
@ -772,8 +716,8 @@ function report_judges_update_divs($year)
|
|||||||
|
|
||||||
report_judges_load_divs($year);
|
report_judges_load_divs($year);
|
||||||
|
|
||||||
if(count($report_judges_divs[$year]) > 10) {
|
if(count($report_judges_divs[$year]) > 50) {
|
||||||
echo "Not enough judge division fields, please file a bug report at sfiab.ca and report that you have ".count($qs)." divisions, but the system can handle a maximum of 10.";
|
echo "Not enough judge division fields, please file a bug report at sfiab.ca and report that you have ".count($report_judges_divs[$year])." divisions, but the system can handle a maximum of 50.";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
foreach($report_judges_divs[$year] as $div_id=>$d) {
|
foreach($report_judges_divs[$year] as $div_id=>$d) {
|
||||||
@ -790,7 +734,7 @@ function report_judges_update_cats($year)
|
|||||||
report_judges_load_cats($year);
|
report_judges_load_cats($year);
|
||||||
|
|
||||||
if(count($report_judges_cats[$year]) > 10) {
|
if(count($report_judges_cats[$year]) > 10) {
|
||||||
echo "Not enough judge age category fields, please file a bug report at sfiab.ca and report that you have ".count($qs)." age categories, but the system can handle a maximum of 10.";
|
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;
|
exit;
|
||||||
}
|
}
|
||||||
foreach($report_judges_cats[$year] as $cat_id=>$d) {
|
foreach($report_judges_cats[$year] as $cat_id=>$d) {
|
||||||
|
Loading…
Reference in New Issue
Block a user