update studygroup calculation so only spouses booked in will get assigned to a group

This commit is contained in:
Nathan Coad
2018-06-26 18:46:18 +10:00
parent d88a73f713
commit ca551094fd

View File

@@ -920,7 +920,7 @@ function _booking_studygroups_update_preallocate($group, $group_mapping, &$sessi
} }
//make sure the leader/helper's partner gets updated now, otherwise they could still end up in different groups //make sure the leader/helper's partner gets updated now, otherwise they could still end up in different groups
if ($spouse_id > 0) { if ($spouse_id > 0 && $working_list[$spouse_id]->booking_status == 1) {
//also mark their spouse as allocated to this group //also mark their spouse as allocated to this group
$calculation_messages[] = t('Spouse with id !id assigned to session !session (currently with !num people).', $calculation_messages[] = t('Spouse with id !id assigned to session !session (currently with !num people).',
array('!id' => $spouse_id, '!session' => $person->booking_session_id, array('!id' => $spouse_id, '!session' => $person->booking_session_id,