Added beginning code for room allocation, changing studygroup role field

This commit is contained in:
Nathan Coad
2014-05-26 22:03:32 +10:00
parent c07605ab73
commit 7e464bca59
8 changed files with 463 additions and 52 deletions

View File

@@ -65,6 +65,48 @@ function _get_tshirt_options() {
return $options_array;
}
/**
* Helper function to look up description of studygroup role
* @param $input integer containing role id
* @return string for corresponding room location
*/
function _booking_studygroup_role_lookup($input = NULL)
{
$role = array();
$role[] = t('None');
$role[] = t('Leader');
$role[] = t('Helper');
$role[] = t('Reserve Leader');
if ($input != NULL)
return $role[$input];
else
return $role;
}
/**
* Helper function to look up description of room location based on id
* @param $input integer containing room id
* @return string for corresponding room location
*/
function _booking_room_location_lookup($input = NULL)
{
$location = array();
$location[] = '';
$location[] = t('Elpis Israel House');
$location[] = t('Elpis Israel Ground Floor');
$location[] = t('Golan');
$location[] = t('Ramoth');
$location[] = t('Jerusalem');
$location[] = t('Bezer');
$location[] = t('Schechem');
$location[] = t('Kedesh');
if ($input != NULL)
return $location[$input];
else
return $location;
}
/**
* Helper function to reliably (without using any external APIs) provide a list of options for the country field used in the registration form