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)
|
if ($i > $group->booking_num_group_sessions)
|
||||||
$i = 1;
|
$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
|
//check we have attendees left
|
||||||
if (! $it->valid() )
|
if (! $it->valid() )
|
||||||
{
|
{
|
||||||
drupal_set_message("Ran out of attendees to process.");
|
drupal_set_message("Ran out of attendees to process.");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
//check this session has room in it
|
//check this session has room in it
|
||||||
$break_condition = false;
|
$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())));
|
drupal_set_message(t("Session ID !id is full, moving to next session for user id !nid", array('!id' => $i, '!nid' => $it->key())));
|
||||||
$i++;
|
$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
|
//get the current attendee element
|
||||||
$current = $it->current();
|
$current = $it->current();
|
||||||
|
|
||||||
@@ -527,10 +511,7 @@ function booking_studygroups_calculate() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//move to the next session
|
//move to the next session
|
||||||
$i++;
|
$i++;
|
||||||
|
|
||||||
//} //finished looping through session list
|
|
||||||
|
|
||||||
} //finished looping through attendees for this study group
|
} //finished looping through attendees for this study group
|
||||||
|
|
||||||
|
|
||||||
@@ -612,8 +593,6 @@ function booking_studygroups_view_form($node, &$form_state, $group_id) {
|
|||||||
drupal_goto('admin/config/booking');
|
drupal_goto('admin/config/booking');
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
watchdog('booking', 'Study groups id: @info', array ('@info' => var_export($group_id, TRUE)));
|
|
||||||
|
|
||||||
$header = array(
|
$header = array(
|
||||||
'booking_session_id' => array('data' => t('Study Group Session'), 'field' => 'm.booking_session_id', 'sort' => 'asc'),
|
'booking_session_id' => array('data' => t('Study Group Session'), 'field' => 'm.booking_session_id', 'sort' => 'asc'),
|
||||||
|
Reference in New Issue
Block a user