test reading group pre-selection

This commit is contained in:
Nathan Coad
2018-06-26 18:19:19 +10:00
parent 388ff80268
commit c0322bb593

View File

@@ -398,6 +398,14 @@ function _booking_email_get_default_selection_callback($form, $form_state) {
//load nodes
$people = booking_load_query(NULL, TRUE);
// Check for the reading group ID
$readinggroup_query = db_query("SELECT * FROM {booking_studygroup_list} WHERE booking_eventid = :eid AND booking_is_readinggroup = 'Y'",
array(':eid' => $event->eid));
$readinggroups = $readinggroup_query->fetchObject();
watchdog('booking_debug', "<pre>Reading Group ID is :\n@info</pre>", array('@info' => print_r($readinggroups, true)));
//populate $defaults based on type of selection
foreach ($people as $person) {
switch ($selection) {