array_push role

This commit is contained in:
2016-05-17 21:13:51 +10:00
parent d87df2cc5e
commit 8b6113c3f1

View File

@@ -66,13 +66,15 @@ function booking_studygroups_csv_report($group_id) {
if (! isset($data[$member->booking_session_id])) {
$data[$member->booking_session_id] = array();
}
// @todo
// lookup the actual name and put this instead of just the node id
// lookup the name and role for this entry in the study group session
$text = array($member->booking_firstname, $member->booking_lastname);
//add their role if they're leading/helping etc
if ($member->booking_studygroup_role > 0) {
$text[] = '(' . _booking_studygroup_role_lookup($member->booking_studygroup_role) . ')';
array_push($text, '(' . _booking_studygroup_role_lookup($member->booking_studygroup_role) . ')');
}
//add the spaces and put this element in the right array
$data[$member->booking_session_id][] = implode(' ', $text);
//$data[$member->booking_session_id][] = $member->booking_node_id;
}
watchdog('booking_debug', "<pre>Study Group CSV Report\n@info</pre>", array('@info' => print_r( $data_array, true)));