diff --git a/booking.studygroups_report.inc b/booking.studygroups_report.inc index 6cc31ba..3c7df52 100644 --- a/booking.studygroups_report.inc +++ b/booking.studygroups_report.inc @@ -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', "
Study Group CSV Report\n@info
", array('@info' => print_r( $data_array, true)));