Pseudo code for study group calculations
This commit is contained in:
@@ -146,6 +146,7 @@ function booking_update_7203() {
|
||||
'sid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
|
||||
'booking_eventid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
|
||||
'booking_studygroup_descrip' => array('type' => 'varchar', 'length' => '500', 'not null' => FALSE),
|
||||
'booking_num_group_sessions' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
|
||||
),
|
||||
'primary key' => array('sid'),
|
||||
);
|
||||
@@ -191,41 +192,55 @@ function booking_update_7204() {
|
||||
->fields(array(
|
||||
'booking_eventid' => 2,
|
||||
'booking_studygroup_descrip' => 'Monday',
|
||||
'booking_num_group_sessions' => 16,
|
||||
))
|
||||
->execute();
|
||||
$result = db_insert('booking_studygroup_list')
|
||||
->fields(array(
|
||||
'booking_eventid' => 2,
|
||||
'booking_studygroup_descrip' => 'Tuesday',
|
||||
'booking_num_group_sessions' => 16,
|
||||
))
|
||||
->execute();
|
||||
$result = db_insert('booking_studygroup_list')
|
||||
->fields(array(
|
||||
'booking_eventid' => 2,
|
||||
'booking_studygroup_descrip' => 'Wednesday',
|
||||
'booking_num_group_sessions' => 16,
|
||||
))
|
||||
->execute();
|
||||
$result = db_insert('booking_studygroup_list')
|
||||
->fields(array(
|
||||
'booking_eventid' => 2,
|
||||
'booking_studygroup_descrip' => 'Thursday',
|
||||
'booking_num_group_sessions' => 16,
|
||||
))
|
||||
->execute();
|
||||
$result = db_insert('booking_studygroup_list')
|
||||
->fields(array(
|
||||
'booking_eventid' => 2,
|
||||
'booking_studygroup_descrip' => 'Friday',
|
||||
'booking_num_group_sessions' => 16,
|
||||
))
|
||||
->execute();
|
||||
$result = db_insert('booking_studygroup_list')
|
||||
->fields(array(
|
||||
'booking_eventid' => 2,
|
||||
'booking_studygroup_descrip' => 'Saturday',
|
||||
'booking_num_group_sessions' => 16,
|
||||
))
|
||||
->execute();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Add extra field to the study group sessions table
|
||||
*/
|
||||
function booking_update_7205() {
|
||||
$spec = array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10');
|
||||
db_add_field( 'booking_studygroup_list', 'booking_num_group_sessions', $spec);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Implementation of hook_install().
|
||||
*/
|
||||
|
Reference in New Issue
Block a user