forked from science-ation/science-ation
Reorder status array for Michael
Remove registrations_id from field list Adjust remove dateofbirth in favour of birthdate
This commit is contained in:
parent
699e12523f
commit
bd4eb9a9cc
@ -23,6 +23,7 @@
|
|||||||
?>
|
?>
|
||||||
<?
|
<?
|
||||||
require_once('register_participants.inc.php');
|
require_once('register_participants.inc.php');
|
||||||
|
require_once('user.inc.php');
|
||||||
function registrationFormsReceived($reg_id="")
|
function registrationFormsReceived($reg_id="")
|
||||||
{
|
{
|
||||||
if($reg_id) $rid=$reg_id;
|
if($reg_id) $rid=$reg_id;
|
||||||
@ -49,10 +50,8 @@ function registrationDeadlinePassed()
|
|||||||
|
|
||||||
function studentIndividualStatus($userid) {
|
function studentIndividualStatus($userid) {
|
||||||
global $config, $conference;
|
global $config, $conference;
|
||||||
if($config['participant_student_personal']=="yes")
|
$required_fields=user_fields_required('participant');
|
||||||
$required_fields=array("firstname","lastname","address","city","postalcode","phonehome","grade","dateofbirth","schools_id","sex");
|
$required_fields[]="grade";
|
||||||
else
|
|
||||||
$required_fields=array("firstname","lastname","grade","schools_id");
|
|
||||||
|
|
||||||
if($config['participant_student_tshirt']=="yes")
|
if($config['participant_student_tshirt']=="yes")
|
||||||
$required_fields[]="tshirt";
|
$required_fields[]="tshirt";
|
||||||
@ -61,13 +60,19 @@ function studentIndividualStatus($userid) {
|
|||||||
$r=mysql_fetch_object($q);
|
$r=mysql_fetch_object($q);
|
||||||
|
|
||||||
foreach ($required_fields AS $req) {
|
foreach ($required_fields AS $req) {
|
||||||
if($req=="dateofbirth") {
|
if($req=="birthdate") {
|
||||||
if($r->$req=="0000-00-00" || !$r->$req)
|
if($r->$req=="0000-00-00" || !$r->$req)
|
||||||
return "incomplete";
|
return "incomplete";
|
||||||
}
|
}
|
||||||
else {
|
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 "incomplete";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 'complete';
|
return 'complete';
|
||||||
@ -331,24 +336,24 @@ function participant_status_completion_details($u,$regId=null){
|
|||||||
if(!$regId){
|
if(!$regId){
|
||||||
return array(
|
return array(
|
||||||
'namecheck' => 'incomplete',
|
'namecheck' => 'incomplete',
|
||||||
|
'students' => 'incomplete',
|
||||||
'tour' => 'incomplete',
|
'tour' => 'incomplete',
|
||||||
'spaward' => 'incomplete',
|
'spaward' => 'incomplete',
|
||||||
'safety' => 'incomplete',
|
'safety' => 'incomplete',
|
||||||
'mentor' => 'incomplete',
|
'mentor' => 'incomplete',
|
||||||
'project' => 'incomplete',
|
'project' => 'incomplete',
|
||||||
'emergencycontact' => 'incomplete',
|
'emergencycontact' => 'incomplete',
|
||||||
'students' => 'incomplete'
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return array(
|
return array(
|
||||||
'namecheck' => namecheckStatus($regId),
|
'namecheck' => namecheckStatus($regId),
|
||||||
|
'students' => studentsStatus($regId),
|
||||||
'tour' => tourStatus($regId),
|
'tour' => tourStatus($regId),
|
||||||
'spaward' => spawardStatus($regId),
|
'spaward' => spawardStatus($regId),
|
||||||
'safety' => safetyStatus($regId),
|
'safety' => safetyStatus($regId),
|
||||||
'mentor' => mentorStatus($regId),
|
'mentor' => mentorStatus($regId),
|
||||||
'project' => projectStatus($regId),
|
'project' => projectStatus($regId),
|
||||||
'emergencycontact' => emergencycontactStatus($regId),
|
'emergencycontact' => emergencycontactStatus($regId),
|
||||||
'students' => studentsStatus($regId)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,6 +54,7 @@ include "common.inc.php";
|
|||||||
window.location.href='api/dates/'+o.value;
|
window.location.href='api/dates/'+o.value;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
div.subset {margin: 2em}
|
div.subset {margin: 2em}
|
||||||
|
@ -320,10 +320,7 @@ function user_get_role_fields($role){
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'participant':
|
case 'participant':
|
||||||
$fields = array('grade', 'schools_id', 'medicalalert', 'registrations_id');
|
$fields = array('grade', 'schools_id', 'medicalalert');//, 'registrations_id');
|
||||||
if($config['participant_student_personal'] == "yes"){
|
|
||||||
$fields[] = 'dateofbirth';
|
|
||||||
}
|
|
||||||
if($config['participant_student_tshirt'] == "yes"){
|
if($config['participant_student_tshirt'] == "yes"){
|
||||||
$fields[] = 'tshirt';
|
$fields[] = 'tshirt';
|
||||||
}
|
}
|
||||||
@ -385,7 +382,6 @@ function user_get_field_info($noConference = false){
|
|||||||
'foodreq' => array('label' => 'Special Food Requirements', 'group' => 'Personal Information'),
|
'foodreq' => array('label' => 'Special Food Requirements', 'group' => 'Personal Information'),
|
||||||
'tshirt' => array('label' => 'T-shirt Size', 'group' => 'Personal Information'),
|
'tshirt' => array('label' => 'T-shirt Size', 'group' => 'Personal Information'),
|
||||||
'medicalalert' => array('label' => 'Medical Alert Info', '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')
|
'emergencycontacts' => array('label' => 'Emergency Contacts', 'group' => 'Personal Information')
|
||||||
);
|
);
|
||||||
if($noConference){
|
if($noConference){
|
||||||
|
Loading…
Reference in New Issue
Block a user