From 9b1e3fa964fd13fec1f63a04455944030adafb98 Mon Sep 17 00:00:00 2001 From: james Date: Thu, 3 Mar 2011 16:34:22 +0000 Subject: [PATCH] Add judge completesections Fix typo in participant page --- judge.inc.php | 12 +++++++++++- participant.inc.php | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/judge.inc.php b/judge.inc.php index 2ebfd52..9eca19c 100644 --- a/judge.inc.php +++ b/judge.inc.php @@ -112,6 +112,16 @@ function judge_status_special_awards(&$u) return 'incomplete'; } +function judge_status_completion_details(&$u) { + $ret=array(); + $ret['personal']=user_personal_info_status($u); + $ret['expertise']=judge_status_expertise($u); + $ret['other']=judge_status_other($u); + $ret['availability']=judge_status_availability($u); + $ret['specialawards']=judge_status_special_awards($u); + return $ret; +} + function judge_status_update(&$u) { if( user_personal_info_status($u) == 'complete' @@ -122,7 +132,7 @@ function judge_status_update(&$u) $u['roles']['judge']['complete'] = 'yes'; else $u['roles']['judge']['complete'] = 'no'; - + $u['roles']['judge']['completesections']=judge_status_completion_details($u); return ($u['roles']['judge']['complete'] == 'yes') ? 'complete' : 'incomplete'; } diff --git a/participant.inc.php b/participant.inc.php index f9e8cca..2b765b1 100644 --- a/participant.inc.php +++ b/participant.inc.php @@ -355,7 +355,7 @@ function participant_status_completion_details($u,$regId=null){ function participant_status_update(&$u){ //for the 'role' participant to be complete, all we need is that ONE CURRENT students personal details to be complete //this doesnt mean that their registration is complete though. - $complete=studentIndividualStatus($u['id']) { + $complete=studentIndividualStatus($u['id']); $u['roles']['participant']['complete'] = $complete; return $complete; }