test
This commit is contained in:
@@ -43,6 +43,13 @@ function booking_studygroups_csv_report($group_id) {
|
||||
array(':sid' => $group_id));
|
||||
$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: Study group $group_id has no members assigned.", 'error', FALSE);
|
||||
drupal_goto('admin/booking/studygroups');
|
||||
return "";
|
||||
}
|
||||
|
||||
//generate the row data
|
||||
foreach ($session_members as $member) {
|
||||
if (! isset($data[$member->booking_session_id])) {
|
||||
@@ -71,6 +78,7 @@ function booking_studygroups_csv_report($group_id) {
|
||||
// Check if we had no data added, that means there were no people in this study group
|
||||
if (empty($data)) {
|
||||
drupal_set_message("Error: Study group $group_id has no people assigned.", 'error', FALSE);
|
||||
drupal_goto('admin/booking/studygroups');
|
||||
return "";
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user