More study group tweaks
This commit is contained in:
@@ -441,28 +441,22 @@ function booking_studygroups_calculate() {
|
||||
}
|
||||
}
|
||||
|
||||
//cycle the session counter if we already reached the end
|
||||
if ($i > $group->booking_num_group_sessions)
|
||||
$i = 1;
|
||||
|
||||
//TODO
|
||||
//Change this from a for loop
|
||||
//to a check to see if a counter is greater than the number of sessions
|
||||
//if it is then set it back to 1
|
||||
|
||||
//iterate over the session list
|
||||
//for ($i = 1; $i <= $group->booking_num_group_sessions; $i++)
|
||||
//for ($i = 1; $i <= 16; $i++)
|
||||
//{
|
||||
/*
|
||||
//check we have attendees left
|
||||
if (! $it->valid() )
|
||||
{
|
||||
drupal_set_message("Ran out of attendees to process.");
|
||||
break;
|
||||
}
|
||||
*/
|
||||
|
||||
//check this session has room in it
|
||||
$break_condition = false;
|
||||
while ($session_count[$i] > $max_people)
|
||||
while ($session_count[$i] >= $max_people)
|
||||
{
|
||||
drupal_set_message(t("Session ID !id is full, moving to next session for user id !nid", array('!id' => $i, '!nid' => $it->key())));
|
||||
$i++;
|
||||
@@ -480,16 +474,6 @@ function booking_studygroups_calculate() {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
if ($session_count[$i] > $max_people)
|
||||
{
|
||||
drupal_set_message(t("Session ID !id is full, moving to next session for user id !nid", array('!id' => $i, '!nid' => $it->key())));
|
||||
//$i++;
|
||||
continue;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
//get the current attendee element
|
||||
$current = $it->current();
|
||||
|
||||
@@ -528,9 +512,6 @@ function booking_studygroups_calculate() {
|
||||
|
||||
//move to the next session
|
||||
$i++;
|
||||
|
||||
//} //finished looping through session list
|
||||
|
||||
} //finished looping through attendees for this study group
|
||||
|
||||
|
||||
@@ -613,8 +594,6 @@ function booking_studygroups_view_form($node, &$form_state, $group_id) {
|
||||
return "";
|
||||
}
|
||||
|
||||
watchdog('booking', 'Study groups id: @info', array ('@info' => var_export($group_id, TRUE)));
|
||||
|
||||
$header = array(
|
||||
'booking_session_id' => array('data' => t('Study Group Session'), 'field' => 'm.booking_session_id', 'sort' => 'asc'),
|
||||
'booking_name' => array('data' => t('Name'), 'field' => 'p.booking_lastname', 'sort' => 'asc'),
|
||||
|
Reference in New Issue
Block a user