check session still exists
This commit is contained in:
@@ -452,7 +452,7 @@ function booking_variety_sessions_view_summary() {
|
|||||||
array(':eid' => $event->eid));
|
array(':eid' => $event->eid));
|
||||||
$sessions = $sessions_query->fetchAllAssoc('vid');
|
$sessions = $sessions_query->fetchAllAssoc('vid');
|
||||||
|
|
||||||
watchdog('booking_debug', "<pre>Variety Session Report sessions:\n@info</pre>", array('@info' => print_r( $sessions, true)));
|
//watchdog('booking_debug', "<pre>Variety Session Report sessions:\n@info</pre>", array('@info' => print_r( $sessions, true)));
|
||||||
|
|
||||||
foreach ($timeslot_list as $timeslot) {
|
foreach ($timeslot_list as $timeslot) {
|
||||||
$header[] = $timeslot->booking_variety_time_descrip;
|
$header[] = $timeslot->booking_variety_time_descrip;
|
||||||
@@ -476,7 +476,14 @@ function booking_variety_sessions_view_summary() {
|
|||||||
'@nid' => $person->nid, '@tid' => $timeslot->tid, '@vid' => $vid,
|
'@nid' => $person->nid, '@tid' => $timeslot->tid, '@vid' => $vid,
|
||||||
));
|
));
|
||||||
|
|
||||||
|
// in case the person is somehow registered for a session that no longer exists
|
||||||
|
if (isset($sessions[$vid])) {
|
||||||
$text = $sessions[$vid]->booking_variety_descrip;
|
$text = $sessions[$vid]->booking_variety_descrip;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$text = "";
|
||||||
|
}
|
||||||
|
|
||||||
$newline[] = $text;
|
$newline[] = $text;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Reference in New Issue
Block a user