From b4a021411d0c752fa48b14a5a1eae01ebfd08654 Mon Sep 17 00:00:00 2001 From: dave Date: Thu, 19 Aug 2010 22:56:35 +0000 Subject: [PATCH] judge main questions --- judge_other.php | 226 +++++++++++++++++++++--------------------- questions.inc.php | 17 ++-- user_edit.inc.php | 17 +++- user_edit.php | 7 +- user_organization.php | 8 +- 5 files changed, 141 insertions(+), 134 deletions(-) diff --git a/judge_other.php b/judge_other.php index 89bb33c..34e8e53 100644 --- a/judge_other.php +++ b/judge_other.php @@ -22,26 +22,22 @@ */ ?> "; - echo "other_update_status('$newstatus');\n"; - echo "\n"; +?> + +"; - display_messages(); - echo "

".i18n('Other Information')."

"; - echo "
"; - } else { - //send the header - send_header('Other Information', - array('Judge Registration' => 'judge_main.php') - ); - } +$fields = array('languages[]', 'years_school','years_regional','years_national','willing_chair','highest_psd'); +$required = array('languages[]'); -$newstatus=judge_status_other($u); ?> - -\n"; -?> -
- - - - - + + + +} +*/ ?> diff --git a/questions.inc.php b/questions.inc.php index cb91328..603bec0 100644 --- a/questions.inc.php +++ b/questions.inc.php @@ -100,17 +100,18 @@ function questions_print_answer_editor($section, &$u, $array_name) $qs = questions_load_questions($section, $u['year']); $keys = array_keys($qs); foreach($keys as $qid) { - print("\n"); - print(" \n"); - print(" \n"); + print(" \n"); + print(" '; } diff --git a/user_edit.php b/user_edit.php index 7fbad50..dd03d01 100644 --- a/user_edit.php +++ b/user_edit.php @@ -25,6 +25,7 @@ require_once('common.inc.php'); require_once('user.inc.php'); require_once('user_edit.inc.php'); +require_once('judge.inc.php'); $edit_id = isset($_GET['users_id']) ? intval($_GET['users_id']) : $_SESSION['users_id']; if($edit_id != $_SESSION['users_id']) @@ -56,11 +57,11 @@ $tabs = array( 'fairinfo' => array( 'file' => 'user_organization.php', 'status_func' => 'user_organization_status', ), - 'judgeother' => array( - 'label' => 'Judge Other', + 'judge' => array( + 'label' => 'Judge', 'types' => array('judge'), 'file' => 'judge_other.php', - 'disabled' => true, + 'status_func' => 'judge_status_other', ), 'judgeexpertise' => array( 'label' => 'Expertise', diff --git a/user_organization.php b/user_organization.php index 60cc809..6662be1 100644 --- a/user_organization.php +++ b/user_organization.php @@ -70,7 +70,7 @@ case 'save': //reload the user record because we dont know if we saved or didnt save above, we just want //to know what the user looks like _now_ - $u = user_load($u['id']); +// $u = user_load($u['id']); $newstatus=user_organization_status($u); ?>
: -lang,$u['languages'])) ? 'checked="checked"' : ''; - echo "lang\" /> $r->langname
"; -} -?> + + + + + - - - - - + + + - + + + - - - - - - - - - - - - - - - -



+

:
- "; - echo ""; - echo i18n("Check this box if you are supposed to judge a specific special award, and please select that award on the Special Award Preferences page."); - ?> -
-



- - type="checkbox" name="willing_chair" value="yes" /> -

- -
- -

- -" /> +
+ + +

:
+ + $ch = ($u['special_award_only'] == 'yes') ? 'checked="checked"' : ''; + echo ""; + echo ""; + echo i18n("Check this box if you are supposed to judge a specific special award, and please select that award on the Special Award Preferences page."); + +
+
".i18n($qs[$qid]['question']).""); $iname = "{$array_name}[{$qid}]"; + print("
"); switch($qs[$qid]['type']) { case 'yesno': - if($ans[$qid]=="yes") $ch="checked=\"checked\""; else $ch=""; - print("".i18n("Yes")); - print("    "); - if($ans[$qid]=="no") $ch="checked=\"checked\""; else $ch=""; - print("".i18n("No")); + echo ""; break; case 'int': print("'; switch($type) { case 'textbox': - echo ""; + if($data1 != NULL) $size = "size=\"$data1\""; + echo ""; break; case 'province': @@ -74,6 +75,18 @@ function user_edit_item(&$u, $label, $fname, $type='textbox') } echo ""; break; + + case 'languages': + echo ""; + $x = 0; + foreach($config['languages'] AS $l=>$ln) { + $ch = (in_array($l,$u['languages'])) ? 'checked="checked"' : ''; + if($x) echo '
'; + echo "$ln"; + $x=1; + } + echo "
"; + break; } echo '