handle empty variety sessions
This commit is contained in:
@@ -553,6 +553,13 @@ function booking_varietysessions_csv_report($timeslot_id) {
|
||||
array(':eid' => $event->eid));
|
||||
$session_members = $session_members_query->fetchAll();
|
||||
|
||||
// Check if we had no data added, that means there were no people in this study group
|
||||
if (! $session_members) {
|
||||
drupal_set_message("Error: Variety Session timeslot $timeslot_id has no members assigned.", 'error', FALSE);
|
||||
drupal_goto('admin/booking/variety');
|
||||
return "";
|
||||
}
|
||||
|
||||
//watchdog('booking_debug', 'booking_varietysessions_csv_report session members: <pre>@info</pre>', array('@info' => print_r( $session_members, true)));
|
||||
|
||||
//generate the row data
|
||||
|
Reference in New Issue
Block a user