From 17d15584d0ec89eb2af593b99ef37eb2702eecb6 Mon Sep 17 00:00:00 2001 From: james Date: Thu, 3 Mar 2011 16:15:48 +0000 Subject: [PATCH] Only check single user complete status for their 'role' to be complete The overall registration status is now done completely separate --- participant.inc.php | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/participant.inc.php b/participant.inc.php index e0caa21..3ff0bc0 100644 --- a/participant.inc.php +++ b/participant.inc.php @@ -168,6 +168,10 @@ function projectStatus($reg_id="") function mentorStatus($reg_id="") { global $config, $conference; + + if($config['participant_mentor']=="no") + return "notapplicable"; + $required_fields=array("firstname","lastname","phone","email","organization","description"); if($reg_id) $rid=$reg_id; @@ -261,7 +265,7 @@ can be dropped after all). It's not getting used this year anyway, so meh. The next line here should then be removed, and the code modified accordingly. ************************************************************************/ -return 'complete'; // delete me +return 'notapplicable'; // delete me global $config, $conference; @@ -349,15 +353,22 @@ 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']) { + $u['roles']['participant']['complete'] = $complete; + return $complete; +} + +/* +function participantregistration_status_update(&$u) { $status = participant_status_completion_details($u); $overall = 'complete'; - $u['roles']['participant']['completesections'] = array(); foreach($status as $key => $val){ - $u['roles']['participant']['completesections'][$key] = ($val == 'complete') ? 'yes':'no'; if($val != 'complete'){ $overall = 'incomplete'; } } - $u['roles']['participant']['complete'] = ($overall == 'complete') ? 'yes':'no'; return $overall; } +*/