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
This commit is contained in:
james 2011-03-03 16:24:09 +00:00
parent 17d15584d0
commit bca687a50e
2 changed files with 5 additions and 4 deletions

View File

@ -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)
);
}

View File

@ -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;
}