Fix up studygroups update functions
This commit is contained in:
@@ -284,10 +284,18 @@ function booking_coming_page() {
|
||||
global $event;
|
||||
$output = "";
|
||||
$table = "";
|
||||
//$header = array('Name', 'Team Colour', 'State');
|
||||
$header = array('Name', 'State');
|
||||
$booking_limit = variable_get('booking_regn_limit','350');
|
||||
$rows = array();
|
||||
|
||||
//work out whether to include the team colour in this page
|
||||
if (variable_get('booking_publish_readinggroups', 0) == 1)
|
||||
{
|
||||
$header = array('Name', 'Team Colour', 'State');
|
||||
}
|
||||
else
|
||||
{
|
||||
$header = array('Name', 'State');
|
||||
}
|
||||
|
||||
if (variable_get('booking_auto_show_on_lists', 1) == 1)
|
||||
{
|
||||
@@ -333,14 +341,29 @@ function booking_coming_page() {
|
||||
|
||||
//watchdog('booking', "Who's coming query: @info", array('@info' => var_export($result, TRUE)));
|
||||
|
||||
foreach ($result as $person) {
|
||||
$rows[] = array(
|
||||
t('!first !last', array('!first' => ucwords($person->booking_firstname),
|
||||
'!last' => ucwords($person->booking_lastname))),
|
||||
//only for when we have readings groups
|
||||
//t('!group',array('!group' => $person->booking_readinggroup)),
|
||||
t('!state', array('!state' => ($person->booking_country === variable_get('booking_default_country')) ? $person->booking_state : $person->booking_country)),
|
||||
);
|
||||
foreach ($result as $person)
|
||||
{
|
||||
$state = $person->booking_country === variable_get('booking_default_country') ? $person->booking_state : $person->booking_country;
|
||||
|
||||
//if we're allowed to publish reading groups, specify them in the array element
|
||||
if (variable_get('booking_publish_readinggroups', 0) == 1)
|
||||
{
|
||||
$rows[] = array(
|
||||
t('!first !last', array('!first' => ucwords($person->booking_firstname),
|
||||
'!last' => ucwords($person->booking_lastname))),
|
||||
t('!group',array('!group' => $person->booking_readinggroup)),
|
||||
t('!state', array('!state' => $state)),
|
||||
);
|
||||
}
|
||||
//don't publish reading group information
|
||||
else
|
||||
{
|
||||
$rows[] = array(
|
||||
t('!first !last', array('!first' => ucwords($person->booking_firstname),
|
||||
'!last' => ucwords($person->booking_lastname))),
|
||||
t('!state', array('!state' => $state)),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
//watchdog('booking', "Who's coming formatted: @info", array('@info' => var_export($rows, TRUE)));
|
||||
|
Reference in New Issue
Block a user