Fixed study group matching leader/helper calculations

This commit is contained in:
2016-01-20 10:03:30 +11:00
parent 7bbdf57238
commit 4fcd741e97
2 changed files with 27 additions and 13 deletions

View File

@@ -1502,12 +1502,12 @@ function _booking_leader_helper_email_summary($node) {
" INNER JOIN {booking_person} p on m.booking_node_id = p.nid " .
" WHERE booking_eventid = :eid " .
" AND booking_studygroup_id = :group AND booking_studygroup_role = :role AND booking_session_id = :session",
array(':eid' => $event->eid, ':group' => $i, ':role' => $otherrole_id, ':session' => $node->$sessionid,
array(':eid' => $event->eid, ':group' => $studygroup->sid, ':role' => $otherrole_id, ':session' => $node->$sessionid,
));
$otherperson = $otherperson_query->fetchAll();
watchdog('booking', "<pre>Other person for studygroup !group and role !role result:\n@info</pre>",
array('!group' => $i, '!role' => $otherrole_id, '@info' => print_r( $otherperson, true)));
array('!group' => $studygroup->sid, '!role' => $otherrole_id, '@info' => print_r( $otherperson, true)));
foreach ($otherperson as $other)
{
@@ -1517,7 +1517,7 @@ function _booking_leader_helper_email_summary($node) {
}
$rows[] = t('!role for !descrip (section !id). Your !otherrole is !other. You can contact them on !phone or !email.',
array('!role' => $role, '!id' => $studygroups[$i]->sid, '!descrip' => $studygroups[$i]->booking_studygroup_descrip,
array('!role' => $role, '!id' => $studygroup->sid, '!descrip' => $studygroup->booking_studygroup_descrip,
'!otherrole' => $otherrole, '!other' => $otherperson_name, '!phone' => $otherperson_phone, '!email' => $otherperson_email,
));