Fix the way study group sessions were queried
This commit is contained in:
@@ -1399,16 +1399,17 @@ function _booking_studygroup_email_summary($node) {
|
||||
array(':eid' => $event->eid));
|
||||
$studygroups = $studygroups_query->fetchAllAssoc('sid');
|
||||
|
||||
for ($i = 1; $i <= variable_get('booking_studygroup_count','0'); $i++)
|
||||
//for ($i = 1; $i <= variable_get('booking_studygroup_count','0'); $i++)
|
||||
foreach ($studygroups as $studygroup)
|
||||
{
|
||||
//calculate the session references
|
||||
$sessionid = "session" . $i;
|
||||
$sessionid = "session" . $studygroup->sid;
|
||||
$roleid = $sessionid . "_role";
|
||||
|
||||
//check that this study group session has been defined for this attendee
|
||||
if (!empty($node->$sessionid))
|
||||
{
|
||||
$rows[] = t($studygroups[$i]->booking_studygroup_descrip . ": Group " . $node->$sessionid . ", " . _booking_studygroup_role_lookup($node->$roleid));
|
||||
$rows[] = t($studygroup->booking_studygroup_descrip . ": Group " . $node->$sessionid . ", " . _booking_studygroup_role_lookup($node->$roleid));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1435,16 +1436,23 @@ function _booking_leader_helper_email_summary($node) {
|
||||
array(':eid' => $event->eid));
|
||||
$studygroups = $studygroups_query->fetchAllAssoc('sid');
|
||||
|
||||
for ($i = 1; $i <= variable_get('booking_studygroup_count','0'); $i++)
|
||||
//for ($i = 1; $i <= variable_get('booking_studygroup_count','0'); $i++)
|
||||
//for ($i = 1; $i <= count($studygroups); $i++)
|
||||
foreach ($studygroups as $studygroup)
|
||||
{
|
||||
//don't print info about the readings groups
|
||||
//if ($i == variable_get('booking_readinggroup_id','7'))
|
||||
// continue;
|
||||
if ($studygroups[$i]->booking_is_readinggroup == 'Y')
|
||||
continue;
|
||||
|
||||
//if ($studygroups[$i]->booking_is_readinggroup == 'Y')
|
||||
// continue;
|
||||
|
||||
if ($studygroup->booking_is_readinggroup == 'Y')
|
||||
continue;
|
||||
|
||||
//calculate the session references
|
||||
$sessionid = "session" . $i;
|
||||
//$sessionid = "session" . $i;
|
||||
$sessionid = "session" . $studygroup->sid;
|
||||
$roleid = $sessionid . "_role";
|
||||
$otherperson_name = "TBA";
|
||||
$otherperson_email = "";
|
||||
|
Reference in New Issue
Block a user