Make age output optional

This commit is contained in:
2016-07-03 23:45:09 +10:00
parent a6dc9a61d2
commit f2c6858634

View File

@@ -49,8 +49,13 @@ function booking_studygroups_csv_report($group_id) {
if (! isset($data[$member->booking_session_id])) {
$data[$member->booking_session_id] = array();
}
// lookup the name and role for this entry in the study group session
// lookup the name and role for this entry in the study group session and optionally include age
if (variable_get('booking_studygroup_csv_ages', 0) == 1) {
$text = array($member->booking_firstname, $member->booking_lastname, '[' . _booking_get_age_years($member->booking_dob) .']');
}
else {
$text = array($member->booking_firstname, $member->booking_lastname);
}
//add their role if they're leading/helping etc
if ($member->booking_studygroup_role > 0) {
array_push($text, '(' . _booking_studygroup_role_lookup($member->booking_studygroup_role) . ')');