forked from science-ation/science-ation
Correction on how the multiselect fields are described
This commit is contained in:
parent
2848ed177d
commit
1972323a65
21
user.inc.php
21
user.inc.php
@ -76,6 +76,9 @@ function user_load($users_id, $accounts_id = false)
|
||||
|
||||
// get a list of all fields relevant to this user
|
||||
$fieldDat = user_get_fields(array_keys($u['roles']));
|
||||
echo '<pre>';
|
||||
print_r($fieldDat);
|
||||
echo '</pre>';
|
||||
// we need to separate the fields that are in the users table from those in separate tables
|
||||
$fields = array_unique(array_merge(array_keys($fieldDat), array('id', 'accounts_id', 'conferences_id')));
|
||||
$userFields = array();
|
||||
@ -552,8 +555,7 @@ function user_get_fields($userRoles = null){
|
||||
$fields['special_awards']['display'] = i18n($fieldInfo['special_awards']['label']);
|
||||
$fields['special_awards']['group'] = i18n($fieldInfo['special_awards']['group']);
|
||||
$fields['special_awards']['type'] = 'multiselect';
|
||||
$fields['special_awards']['options'] = array('yes' => 'Yes', 'no' => 'No');
|
||||
$fields['special_awards']['entries'] = get_special_awards($conference['id']);
|
||||
$fields['special_awards']['options'] = get_special_awards($conference['id']);
|
||||
}
|
||||
|
||||
// get the available_times info if available
|
||||
@ -563,11 +565,10 @@ function user_get_fields($userRoles = null){
|
||||
$fields['available_times']['display'] = i18n($fieldInfo['available_times']['label']);
|
||||
$fields['available_times']['group'] = i18n($fieldInfo['available_times']['group']);
|
||||
$fields['available_times']['type'] = 'multiselect';
|
||||
$fields['available_times']['options'] = array('yes' => 'Yes', 'no' => 'No');
|
||||
$fields['available_times']['entries'] = array();
|
||||
$fields['available_times']['options'] = array();
|
||||
$timeslots = get_judging_timeslots($conference['id']);
|
||||
foreach($timeslots as $slot){
|
||||
$fields['available_times']['entries'][$slot['id']] = $slot;
|
||||
$fields['available_times']['options'][$slot['id']] = $slot;
|
||||
}
|
||||
}
|
||||
|
||||
@ -578,11 +579,10 @@ function user_get_fields($userRoles = null){
|
||||
$fields['available_events']['display'] = i18n($fieldInfo['available_events']['label']);
|
||||
$fields['available_events']['group'] = i18n($fieldInfo['available_events']['group']);
|
||||
$fields['available_events']['type'] = 'multiselect';
|
||||
$fields['available_events']['options'] = array('yes' => 'Yes', 'no' => 'No');
|
||||
$fields['available_events']['entries'] = array();
|
||||
$fields['available_events']['options'] = array();
|
||||
$q=mysql_query("SELECT schedule.id, schedule.date, schedule.hour, schedule.minute, schedule.duration, events.name FROM schedule JOIN events ON schedule.events_id=events.id WHERE schedule.conferences_id='{$conference['id']}'");
|
||||
while($row = mysql_fetch_assoc($q)){
|
||||
$fields['available_events']['entries'][$row['id']] = $row; //$row['name'] . ' ' . $row['date'] . ', ' . $row['hour'] . ':' . $row['minute'] . ':00 (' . $row['duration'] . ' ' . i18n('minutes') . ')';
|
||||
$fields['available_events']['options'][$row['id']] = $row; //$row['name'] . ' ' . $row['date'] . ', ' . $row['hour'] . ':' . $row['minute'] . ':00 (' . $row['duration'] . ' ' . i18n('minutes') . ')';
|
||||
}
|
||||
}
|
||||
|
||||
@ -593,11 +593,10 @@ function user_get_fields($userRoles = null){
|
||||
$fields['volunteer_positions']['display'] = i18n($fieldInfo['volunteer_positions']['label']);
|
||||
$fields['volunteer_positions']['group'] = i18n($fieldInfo['volunteer_positions']['group']);
|
||||
$fields['volunteer_positions']['type'] = 'multiselect';
|
||||
$fields['volunteer_positions']['options'] = array('yes' => 'Yes', 'no' => 'No');
|
||||
$fields['volunteer_positions']['entries'] = array();
|
||||
$fields['volunteer_positions']['options'] = array();
|
||||
$q = mysql_query("SELECT * FROM volunteer_positions WHERE conferences_id = {$conference['id']}");
|
||||
while($row = mysql_fetch_assoc($q)){
|
||||
$fields['volunteer_positions']['entries'][$row['id']] = $row; //$row['name'];
|
||||
$fields['volunteer_positions']['options'][$row['id']] = $row; //$row['name'];
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user