Add new include for study group leaders/helpers calculations
This commit is contained in:
@@ -269,7 +269,7 @@ function booking_admin() {
|
|||||||
$form['regn_options']['booking_default_state'] = array (
|
$form['regn_options']['booking_default_state'] = array (
|
||||||
'#type' => 'select',
|
'#type' => 'select',
|
||||||
'#title' => t('Select Default State'),
|
'#title' => t('Select Default State'),
|
||||||
'#description' => t('Select default state for residential address.'),
|
'#description' => t('Select default state for residential address. Select the last value (blank) in most cases, to ensure attendees choose a value for this field'),
|
||||||
'#options' => _booking_state_options(),
|
'#options' => _booking_state_options(),
|
||||||
'#default_value' => variable_get('booking_default_state', 'NSW'),
|
'#default_value' => variable_get('booking_default_state', 'NSW'),
|
||||||
);
|
);
|
||||||
|
@@ -839,7 +839,7 @@ function _booking_add_paypal_fees($amount, $country)
|
|||||||
$percentage = (float) variable_get('booking_paypal_transaction_fee_percentage', '2.6');
|
$percentage = (float) variable_get('booking_paypal_transaction_fee_percentage', '2.6');
|
||||||
} else {
|
} else {
|
||||||
$percentage = (float) variable_get('booking_paypal_transaction_fee_percentage_intl', '3.6');
|
$percentage = (float) variable_get('booking_paypal_transaction_fee_percentage_intl', '3.6');
|
||||||
watchdog('booking', "Calculating paypal fees for a currency conversion transaction which adds $percentage percent.");
|
//watchdog('booking', "Calculating paypal fees for a currency conversion transaction which adds $percentage percent.");
|
||||||
}
|
}
|
||||||
|
|
||||||
//apply the percentage
|
//apply the percentage
|
||||||
|
@@ -62,6 +62,7 @@ module_load_include('inc', 'booking', 'booking.variety');
|
|||||||
module_load_include('inc', 'booking', 'booking.studygroups');
|
module_load_include('inc', 'booking', 'booking.studygroups');
|
||||||
// Load the include for study group definitions
|
// Load the include for study group definitions
|
||||||
module_load_include('inc', 'booking', 'booking.studygroups_admin');
|
module_load_include('inc', 'booking', 'booking.studygroups_admin');
|
||||||
|
module_load_include('inc', 'booking', 'booking.studygroup_leaders');
|
||||||
// Load the include for the travel form
|
// Load the include for the travel form
|
||||||
module_load_include('inc', 'booking', 'booking.travel');
|
module_load_include('inc', 'booking', 'booking.travel');
|
||||||
// Load the include for managing room bookings and definitions
|
// Load the include for managing room bookings and definitions
|
||||||
@@ -457,7 +458,13 @@ function booking_menu() {
|
|||||||
'type' => MENU_NORMAL_ITEM,
|
'type' => MENU_NORMAL_ITEM,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$items['admin/booking/studygroups/calculateleaders'] = array(
|
||||||
|
'title' => 'Calculate Study Group Leaders',
|
||||||
|
'description' => 'Calculate Study Group Leaders and Helpers',
|
||||||
|
'page callback' => 'booking_studygroups_leaders_calculate',
|
||||||
|
'access arguments' => array("edit study groups"),
|
||||||
|
//'type' => MENU_NORMAL_ITEM,
|
||||||
|
);
|
||||||
|
|
||||||
$items['admin/booking/studygroups/%/view'] = array(
|
$items['admin/booking/studygroups/%/view'] = array(
|
||||||
'title' => 'View Study Group',
|
'title' => 'View Study Group',
|
||||||
|
@@ -1172,17 +1172,17 @@ function _booking_validate($node, &$form_state) {
|
|||||||
t('You have entered an invalid medicare number. Please check your medicare card and re-enter the number. If you believe this to be incorrect, please !contact.',
|
t('You have entered an invalid medicare number. Please check your medicare card and re-enter the number. If you believe this to be incorrect, please !contact.',
|
||||||
array('!contact' => l('send us an email', 'mailto:' . variable_get('booking_contact_email') . '?subject=Invalid Medicare Number'))
|
array('!contact' => l('send us an email', 'mailto:' . variable_get('booking_contact_email') . '?subject=Invalid Medicare Number'))
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
elseif ( (variable_get('booking_enforce_medicare_verification', 1) == 0) && (! _valid_medicare_number($form_state['booking_medicare'])) )
|
elseif ( (variable_get('booking_enforce_medicare_verification', 1) == 0) && (! _valid_medicare_number($form_state['booking_medicare'])) )
|
||||||
{
|
{
|
||||||
drupal_set_message(
|
drupal_set_message(
|
||||||
t('You have entered an invalid medicare number. Please ensure you check your medicare card and send us the correct information via !contact.',
|
t('You have entered an invalid medicare number. Please ensure you check your medicare card and send us the correct information via !contact.',
|
||||||
array('!contact' => l('email', 'mailto:' . variable_get('booking_contact_email') . '?subject=Invalid Medicare Number'))
|
array('!contact' => l('email', 'mailto:' . variable_get('booking_contact_email') . '?subject=Invalid Medicare Number'))
|
||||||
),
|
),
|
||||||
'error', FALSE
|
'error', FALSE
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//verify state information with the new few checks
|
//verify state information with the new few checks
|
||||||
|
@@ -642,7 +642,7 @@ function booking_view($node, $view_mode) {
|
|||||||
$rows[] = array(t('Name:'), t('!first !last', array('!first' => $node->booking_firstname, '!last' => $node->booking_lastname)));
|
$rows[] = array(t('Name:'), t('!first !last', array('!first' => $node->booking_firstname, '!last' => $node->booking_lastname)));
|
||||||
$rows[] = array(t('Gender:'), t('!gender', array('!gender' => $node->booking_gender == 'M' ? 'Male' : 'Female')));
|
$rows[] = array(t('Gender:'), t('!gender', array('!gender' => $node->booking_gender == 'M' ? 'Male' : 'Female')));
|
||||||
$rows[] = array(t('Status:'), t('!status', array('!status' => _booking_status_generate($node->booking_status))));
|
$rows[] = array(t('Status:'), t('!status', array('!status' => _booking_status_generate($node->booking_status))));
|
||||||
$rows[] = array(t('Internal comments on this registration:'), $node->booking_comment_field);
|
$rows[] = array(t('Internal comments on this registration:'), t('<i>!comment</i>', array('!comment' => $node->booking_comment_field)));
|
||||||
$rows[] = array(t('Committee Member:'), t('!ans', array('!ans' => ($node->booking_committee_member == 'Y' ? '<b>Yes</b>' : 'No'))));
|
$rows[] = array(t('Committee Member:'), t('!ans', array('!ans' => ($node->booking_committee_member == 'Y' ? '<b>Yes</b>' : 'No'))));
|
||||||
$rows[] = array(t('Welfare Required:'), $node->booking_welfare_required == 'Y' ? 'Yes' : 'No');
|
$rows[] = array(t('Welfare Required:'), $node->booking_welfare_required == 'Y' ? 'Yes' : 'No');
|
||||||
$rows[] = array(t('Barcode:'), t('!id', array('!id' => $node->booking_barcode)));
|
$rows[] = array(t('Barcode:'), t('!id', array('!id' => $node->booking_barcode)));
|
||||||
|
16
booking.studygroup_leaders.inc
Normal file
16
booking.studygroup_leaders.inc
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* Functions for calculating leaders and helpers for discussion groups
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function for selecting who is available to lead or help sessions
|
||||||
|
*/
|
||||||
|
function booking_studygroups_leaders_calculate($node, &$form_state, $group_id) {
|
||||||
|
global $event;
|
||||||
|
|
||||||
|
}
|
Reference in New Issue
Block a user