commence work on manual allocation flag
This commit is contained in:
@@ -343,6 +343,12 @@ function booking_studygroup_leadhelp_edit_form($node, &$form_state, $group_id) {
|
||||
unset($reserveleader);
|
||||
}
|
||||
|
||||
//record whether this was a reading group, so we can update colours if necessary
|
||||
$form['booking_readinggroup'] = array (
|
||||
'#type' => 'hidden',
|
||||
'#value' => $studygroup->booking_is_readinggroup,
|
||||
);
|
||||
|
||||
//close out the form
|
||||
$form['submit'] = array (
|
||||
'#type' => 'submit',
|
||||
@@ -371,7 +377,7 @@ function booking_studygroup_leadhelp_edit_form_submit($form, &$form_state) {
|
||||
'booking_studygroup_helper' => 2,
|
||||
'booking_studygroup_reserveleader' => 3,
|
||||
);
|
||||
|
||||
|
||||
//iterate over the different role types
|
||||
foreach ($role_types as $type => $type_id) {
|
||||
//iterate over the sessions for that role type
|
||||
@@ -454,6 +460,11 @@ function booking_studygroup_leadhelp_edit_form_submit($form, &$form_state) {
|
||||
} //iterate session
|
||||
} //iterate role type
|
||||
|
||||
//do we need to update colours for reading group?
|
||||
if ($form_state['values']['booking_readinggroup']) == 'Y') {
|
||||
booking_studygroups_process_colours();
|
||||
}
|
||||
|
||||
$final_message = "Made $counter updates leader/helper roles for study group id $group_id. Changing one person to another counts as two updates.";
|
||||
drupal_set_message($final_message, 'status', FALSE);
|
||||
watchdog('booking', "<pre>" . $final_message . "\n" . implode("\n", $update_messages) . "</pre>");
|
||||
|
Reference in New Issue
Block a user