forked from science-ation/science-ation
Remove Gender/Sex as per YSC guidelines
This commit is contained in:
parent
a28b56f526
commit
4838ca7e3e
@ -53,7 +53,6 @@ function get_winners($awardid, $fairs_id)
|
||||
$student_fields = array('firstname' => 'firstname',
|
||||
'lastname' => 'lastname',
|
||||
'email' => 'email',
|
||||
'gender' => 'sex',
|
||||
'grade' => 'grade',
|
||||
'language' => 'lang',
|
||||
'birthdate' => 'dateofbirth',
|
||||
|
@ -83,7 +83,6 @@ function get_cwsf_award_winners()
|
||||
'firstname' => $s->firstname,
|
||||
'lastname' => $s->lastname,
|
||||
'email' => $s->email,
|
||||
'gender' => $s->sex,
|
||||
'grade' => $s->grade,
|
||||
'language' => $s->lang,
|
||||
'birthdate' => $s->dateofbirth,
|
||||
|
@ -349,13 +349,6 @@ $report_students_fields = array(
|
||||
'table_sort' => 'students.grade',
|
||||
'table' => "CONCAT('Grade ', students.grade)"
|
||||
),
|
||||
'gender' => array(
|
||||
'name' => 'Student -- Gender',
|
||||
'header' => 'Gender',
|
||||
'width' => 0.5,
|
||||
'table' => 'students.sex',
|
||||
'value_map' => array('male' => 'Male', 'female' => 'Female')
|
||||
),
|
||||
'birthdate' => array(
|
||||
'name' => 'Student -- Birthdate',
|
||||
'header' => 'Birthdate',
|
||||
|
@ -55,7 +55,7 @@ function studentStatus($reg_id = '')
|
||||
{
|
||||
global $config, $pdo;
|
||||
if ($config['participant_student_personal'] == 'yes')
|
||||
$required_fields = array('firstname', 'lastname', 'address', 'city', 'postalcode', 'phone', 'email', 'grade', 'dateofbirth', 'schools_id', 'sex');
|
||||
$required_fields = array('firstname', 'lastname', 'address', 'city', 'postalcode', 'phone', 'email', 'grade', 'dateofbirth', 'schools_id');
|
||||
else
|
||||
$required_fields = array('firstname', 'lastname', 'email', 'grade', 'schools_id');
|
||||
|
||||
|
@ -104,12 +104,11 @@ if (get_value_from_array($_POST, 'action') == 'save') {
|
||||
}
|
||||
// INSERT new record
|
||||
$dob = $_POST['year'][$x] . '-' . $_POST['month'][$x] . '-' . $_POST['day'][$x];
|
||||
$stmt = $pdo->prepare('INSERT INTO students (registrations_id,firstname,lastname,pronunciation,sex,email,address,city,county,province,postalcode,phone,dateofbirth,grade,schools_id,tshirt,medicalalert,foodreq,teachername,teacheremail,year) VALUES ('
|
||||
$stmt = $pdo->prepare('INSERT INTO students (registrations_id,firstname,lastname,pronunciation,email,address,city,county,province,postalcode,phone,dateofbirth,grade,schools_id,tshirt,medicalalert,foodreq,teachername,teacheremail,year) VALUES ('
|
||||
. "'" . $_SESSION['registration_id'] . "', "
|
||||
. "'" . stripslashes($_POST['firstname'][$x]) . "', "
|
||||
. "'" . stripslashes($_POST['lastname'][$x]) . "', "
|
||||
. "'" . stripslashes($_POST['pronunciation'][$x]) . "', "
|
||||
. "'" . stripslashes($_POST['sex'][$x]) . "', "
|
||||
. "'" . stripslashes($_POST['email'][$x]) . "', "
|
||||
. "'" . stripslashes($_POST['address'][$x]) . "', "
|
||||
. "'" . stripslashes($_POST['city'][$x]) . "', "
|
||||
@ -144,7 +143,6 @@ if (get_value_from_array($_POST, 'action') == 'save') {
|
||||
. "firstname='" . stripslashes($_POST['firstname'][$x]) . "', "
|
||||
. "lastname='" . stripslashes($_POST['lastname'][$x]) . "', "
|
||||
. "pronunciation='" . stripslashes($_POST['pronunciation'][$x]) . "', "
|
||||
. "sex='" . stripslashes($_POST['sex'][$x]) . "', "
|
||||
. "email='" . stripslashes($_POST['email'][$x]) . "', "
|
||||
. "address='" . stripslashes($_POST['address'][$x]) . "', "
|
||||
. "city='" . stripslashes($_POST['city'][$x]) . "', "
|
||||
@ -289,29 +287,12 @@ for ($x = 1; $x <= $numtoshow; $x++) {
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
if ($config['participant_student_personal'] == 'yes') {
|
||||
echo "<tr>\n";
|
||||
echo ' <td>' . i18n('Gender') . '</td><td>';
|
||||
echo "<select name=\"sex[$x]\">";
|
||||
echo '<option value="">' . i18n('Select') . "</option>\n";
|
||||
if ($studentinfo->sex == 'male')
|
||||
$sel = 'selected="selected"';
|
||||
else
|
||||
$sel = '';
|
||||
echo "<option $sel value=\"male\">" . i18n('Male') . "</option>\n";
|
||||
if ($studentinfo->sex == 'female')
|
||||
$sel = 'selected="selected"';
|
||||
else
|
||||
$sel = '';
|
||||
echo "<option $sel value=\"female\">" . i18n('Female') . "</option>\n";
|
||||
echo '</select>' . REQUIREDFIELD;
|
||||
}
|
||||
echo "</td>\n";
|
||||
echo " <td></td><td></td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo ' <td>' . i18n('Email Address') . "</td><td><input type=\"text\" name=\"email[$x]\" value=\"" . get_value_property_or_default($studentinfo, 'email') . '" />' . REQUIREDFIELD . "</td>\n";
|
||||
echo ' <td>' . i18n('Email Address') . "</td><td><input type=\"email\" name=\"email[$x]\" value=\"" . get_value_property_or_default($studentinfo, 'email') . '" />' . REQUIREDFIELD . "</td>\n";
|
||||
|
||||
if ($config['participant_student_personal'] == 'yes') {
|
||||
echo ' <td>' . i18n('City') . "</td><td><input type=\"text\" name=\"city[$x]\" value=\"" . get_value_property_or_default($studentinfo, 'city') . '" />' . REQUIREDFIELD . "</td>\n";
|
||||
@ -338,7 +319,7 @@ for ($x = 1; $x <= $numtoshow; $x++) {
|
||||
echo ' <td>' . i18n($config['postalzip']) . '</td>';
|
||||
echo "<td><input type=\"text\" name=\"postalcode[$x]\" value=\"" . get_value_property_or_default($studentinfo, 'postalcode') . '" />' . REQUIREDFIELD . "</td>\n";
|
||||
echo ' <td>' . i18n('Phone') . '</td>';
|
||||
echo " <td><input type=\"text\" name=\"phone[$x]\" value=\"" . get_value_property_or_default($studentinfo, 'phone') . '" />' . REQUIREDFIELD . "</td>\n";
|
||||
echo " <td><input type=\"tel\" name=\"phone[$x]\" value=\"" . get_value_property_or_default($studentinfo, 'phone') . '" />' . REQUIREDFIELD . "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
@ -475,7 +456,7 @@ for ($x = 1; $x <= $numtoshow; $x++) {
|
||||
|
||||
echo "<tr>\n";
|
||||
echo ' <td>' . i18n('Teacher Name') . "</td><td><input type=\"text\" name=\"teachername[$x]\" value=\"" . get_value_property_or_default($studentinfo, 'teachername') . "\" /></td>\n";
|
||||
echo ' <td>' . i18n('TeacherEmail') . "</td><td><input type=\"text\" name=\"teacheremail[$x]\" value=\"" . get_value_property_or_default($studentinfo, 'teacheremail') . "\" /></td>\n";
|
||||
echo ' <td>' . i18n('Teacher Email') . "</td><td><input type=\"email\" name=\"teacheremail[$x]\" value=\"" . get_value_property_or_default($studentinfo, 'teacheremail') . "\" /></td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
if ($config['participant_regfee_items_enable'] == 'yes') {
|
||||
|
@ -237,7 +237,6 @@ function award_upload_assign(&$fair, &$award, &$prize, &$project, $year, &$respo
|
||||
$student_fields = array('firstname' => 'firstname',
|
||||
'lastname' => 'lastname',
|
||||
'email' => 'email',
|
||||
'gender' => 'sex',
|
||||
'grade' => 'grade',
|
||||
'language' => 'lang',
|
||||
'birthdate' => 'dateofbirth',
|
||||
|
@ -479,7 +479,7 @@ function user_save(&$u)
|
||||
$fields = array('salutation', 'firstname', 'lastname', 'username',
|
||||
'email',
|
||||
'phonehome', 'phonework', 'phonecell', 'fax', 'organization',
|
||||
'address', 'address2', 'city', 'province', 'postalcode', 'sex',
|
||||
'address', 'address2', 'city', 'province', 'postalcode',
|
||||
'firstaid', 'cpr', 'types', 'lang');
|
||||
|
||||
$set = '';
|
||||
@ -691,7 +691,7 @@ function user_purge($u, $type = false)
|
||||
function user_dupe_row($table, $key, $val, $newval)
|
||||
{
|
||||
global $config, $pdo;
|
||||
$nullfields = array('id', 'sex', 'deleteddatetime'); /* Fields that can be null */
|
||||
$nullfields = array('id', 'deleteddatetime'); /* Fields that can be null */
|
||||
$q = $pdo->prepare("SELECT * FROM $table WHERE $key='$val'");
|
||||
$q->execute();
|
||||
if ($q->rowCount() != 1) {
|
||||
@ -965,7 +965,6 @@ $user_personal_fields_map = array(
|
||||
'salutation' => array('salutation'),
|
||||
'name' => array('firstname', 'lastname'),
|
||||
'email' => array('email'),
|
||||
'sex' => array('sex'),
|
||||
'phonehome' => array('phonehome'),
|
||||
'phonework' => array('phonework'),
|
||||
'phonecell' => array('phonecell'),
|
||||
|
@ -46,7 +46,6 @@ $user_personal_fields = array(
|
||||
'lang' => array('name' => 'Preferred Language'),
|
||||
'province' => array('name' => $config['provincestate']),
|
||||
'organization' => array('name' => 'Organization'),
|
||||
'sex' => array('name' => 'Gender'),
|
||||
'firstaid' => array('name' => 'First Aid Training',
|
||||
'type' => 'yesno'),
|
||||
'cpr' => array('name' => 'CPR Training',
|
||||
@ -301,28 +300,6 @@ item($u, 'phonework');
|
||||
echo '</tr>';
|
||||
echo "<tr>\n";
|
||||
item($u, 'fax');
|
||||
if (in_array('sex', $fields)) {
|
||||
echo '<td>' . i18n('Gender') . ': </td>';
|
||||
echo '<td>';
|
||||
echo '<select name="sex">';
|
||||
echo '<option value="">' . i18n('Choose') . "</option>\n";
|
||||
if ($u['sex'] == 'male')
|
||||
$sel = 'selected="selected"';
|
||||
else
|
||||
$sel = '';
|
||||
echo "<option value=\"male\" $sel>" . i18n('Male') . "</option>\n";
|
||||
if ($u['sex'] == 'female')
|
||||
$sel = 'selected="selected"';
|
||||
else
|
||||
$sel = '';
|
||||
echo "<option value=\"female\" $sel>" . i18n('Female') . "</option>\n";
|
||||
echo '</select>';
|
||||
if (in_array('sex', $required))
|
||||
echo REQUIREDFIELD;
|
||||
echo '</td>';
|
||||
} else {
|
||||
echo '<td></td><td></td>';
|
||||
}
|
||||
echo '</tr>';
|
||||
|
||||
echo "<tr>\n";
|
||||
|
Loading…
x
Reference in New Issue
Block a user