Reorder status array for Michael

Remove registrations_id from field list
Adjust remove dateofbirth in favour of birthdate
This commit is contained in:
james 2011-03-03 19:24:49 +00:00
parent 699e12523f
commit bd4eb9a9cc
3 changed files with 15 additions and 13 deletions

View File

@ -23,6 +23,7 @@
?>
<?
require_once('register_participants.inc.php');
require_once('user.inc.php');
function registrationFormsReceived($reg_id="")
{
if($reg_id) $rid=$reg_id;
@ -49,10 +50,8 @@ function registrationDeadlinePassed()
function studentIndividualStatus($userid) {
global $config, $conference;
if($config['participant_student_personal']=="yes")
$required_fields=array("firstname","lastname","address","city","postalcode","phonehome","grade","dateofbirth","schools_id","sex");
else
$required_fields=array("firstname","lastname","grade","schools_id");
$required_fields=user_fields_required('participant');
$required_fields[]="grade";
if($config['participant_student_tshirt']=="yes")
$required_fields[]="tshirt";
@ -61,13 +60,19 @@ function studentIndividualStatus($userid) {
$r=mysql_fetch_object($q);
foreach ($required_fields AS $req) {
if($req=="dateofbirth") {
if($req=="birthdate") {
if($r->$req=="0000-00-00" || !$r->$req)
return "incomplete";
}
else {
if(!$r->$req)
if(!$r->$req) {
$fp=fopen("data/logs/incomplete.log","a+");
$str="user id $userid incomplete on required field: $req, user[$req]='{$r->$req}'\n";
// echo $str;
fputs($fp,$str);
fclose($fp);
return "incomplete";
}
}
}
return 'complete';
@ -331,24 +336,24 @@ function participant_status_completion_details($u,$regId=null){
if(!$regId){
return array(
'namecheck' => 'incomplete',
'students' => 'incomplete',
'tour' => 'incomplete',
'spaward' => 'incomplete',
'safety' => 'incomplete',
'mentor' => 'incomplete',
'project' => 'incomplete',
'emergencycontact' => 'incomplete',
'students' => 'incomplete'
);
}
return array(
'namecheck' => namecheckStatus($regId),
'students' => studentsStatus($regId),
'tour' => tourStatus($regId),
'spaward' => spawardStatus($regId),
'safety' => safetyStatus($regId),
'mentor' => mentorStatus($regId),
'project' => projectStatus($regId),
'emergencycontact' => emergencycontactStatus($regId),
'students' => studentsStatus($regId)
);
}

View File

@ -54,6 +54,7 @@ include "common.inc.php";
window.location.href='api/dates/'+o.value;
return false;
}
</script>
<style type="text/css">
div.subset {margin: 2em}

View File

@ -320,10 +320,7 @@ function user_get_role_fields($role){
}
break;
case 'participant':
$fields = array('grade', 'schools_id', 'medicalalert', 'registrations_id');
if($config['participant_student_personal'] == "yes"){
$fields[] = 'dateofbirth';
}
$fields = array('grade', 'schools_id', 'medicalalert');//, 'registrations_id');
if($config['participant_student_tshirt'] == "yes"){
$fields[] = 'tshirt';
}
@ -385,7 +382,6 @@ function user_get_field_info($noConference = false){
'foodreq' => array('label' => 'Special Food Requirements', 'group' => 'Personal Information'),
'tshirt' => array('label' => 'T-shirt Size', 'group' => 'Personal Information'),
'medicalalert' => array('label' => 'Medical Alert Info', 'group' => 'Personal Information'),
'dateofbirth' => array('label' => 'Date of Birth', 'group' => 'Personal Information'),
'emergencycontacts' => array('label' => 'Emergency Contacts', 'group' => 'Personal Information')
);
if($noConference){