test
This commit is contained in:
@@ -42,6 +42,13 @@ function booking_studygroups_csv_report($group_id) {
|
|||||||
WHERE m.booking_studygroup_id = :sid ORDER BY m.booking_session_id, m.booking_studygroup_role DESC, p.booking_lastname",
|
WHERE m.booking_studygroup_id = :sid ORDER BY m.booking_session_id, m.booking_studygroup_role DESC, p.booking_lastname",
|
||||||
array(':sid' => $group_id));
|
array(':sid' => $group_id));
|
||||||
$session_members = $session_members_query->fetchAll();
|
$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
|
//generate the row data
|
||||||
foreach ($session_members as $member) {
|
foreach ($session_members as $member) {
|
||||||
@@ -70,7 +77,8 @@ function booking_studygroups_csv_report($group_id) {
|
|||||||
|
|
||||||
// Check if we had no data added, that means there were no people in this study group
|
// Check if we had no data added, that means there were no people in this study group
|
||||||
if (empty($data)) {
|
if (empty($data)) {
|
||||||
drupal_set_message("Error: Study group $group_id has no people assigned.", 'error', FALSE);
|
drupal_set_message("Error: Study group $group_id has no people assigned.", 'error', FALSE);
|
||||||
|
drupal_goto('admin/booking/studygroups');
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user