From bca687a50e86c85e0e64e998a0ff2910bd79fc69 Mon Sep 17 00:00:00 2001 From: james Date: Thu, 3 Mar 2011 16:24:09 +0000 Subject: [PATCH] tweak studnet status, rename functions to make more sense particpants 'role' is now complete if their own personal info is complete registration status is now separate and dictates whether the registrations overall status is complete or not --- participant.inc.php | 6 +++--- register_participants.inc.php | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/participant.inc.php b/participant.inc.php index 3ff0bc0..f9e8cca 100644 --- a/participant.inc.php +++ b/participant.inc.php @@ -73,7 +73,7 @@ function studentIndividualStatus($userid) { return 'complete'; } -function studentStatus($reg_id="") { +function studentsStatus($reg_id="") { global $config, $conference; if($reg_id) $rid=$reg_id; @@ -337,7 +337,7 @@ function participant_status_completion_details($u,$regId=null){ 'mentor' => 'incomplete', 'project' => 'incomplete', 'emergencycontact' => 'incomplete', - 'student' => 'incomplete' + 'students' => 'incomplete' ); } return array( @@ -348,7 +348,7 @@ function participant_status_completion_details($u,$regId=null){ 'mentor' => mentorStatus($regId), 'project' => projectStatus($regId), 'emergencycontact' => emergencycontactStatus($regId), - 'student' => studentStatus($regId) + 'students' => studentsStatus($regId) ); } diff --git a/register_participants.inc.php b/register_participants.inc.php index 431fe93..062dacb 100644 --- a/register_participants.inc.php +++ b/register_participants.inc.php @@ -466,7 +466,8 @@ function getRegistration($id) { //get the students $s=mysql_query("SELECT users.id,users.firstname,users.lastname, accounts.id AS accounts_id, accounts.username FROM users JOIN accounts ON users.accounts_id=accounts.id WHERE users.registrations_id='$id' AND users.conferences_id='{$conference['id']}'"); while($r=mysql_fetch_assoc($s)) { - $r['complete']=studentIndividualStatus($r['id']); + //asdf + $r['status']=studentIndividualStatus($r['id']); $reg['students'][]=$r; }