study group update calculations

This commit is contained in:
2014-06-14 12:18:58 +10:00
parent 7751058348
commit c9ead35f16
8 changed files with 445 additions and 56 deletions

View File

@@ -135,6 +135,38 @@ function _booking_room_bedtype_lookup($input = NULL)
return $bed;
}
/**
* Helper function to look up reading group colour based on group id
* @param $input integer containing group id
* @return string for corresponding reading group colour
*/
function _booking_readinggroup_colour_lookup($input = NULL)
{
$group = array();
$group[] = '';
$group[] = t('Silver/Grey');
$group[] = t('Stripes');
$group[] = t('Spots');
$group[] = t('Beige');
$group[] = t('Maroon');
$group[] = t('Pink');
$group[] = t('Black');
$group[] = t('Yellow');
$group[] = t('Purple');
$group[] = t('White');
$group[] = t('Red');
$group[] = t('Orange');
$group[] = t('Checks');
$group[] = t('Green');
$group[] = t('Blue');
$group[] = t('Brown');
if ($input != NULL)
return $group[$input];
else
return $group;
}
/**
* Helper function to reliably (without using any external APIs) provide a list of options for the country field used in the registration form
*/