forked from GibbonEdu/core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CHANGEDB.php
executable file
·800 lines (785 loc) · 200 KB
/
CHANGEDB.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
<?php
/*
Gibbon, Flexible & Open School System
Copyright (C) 2010, Ross Parker
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
//USE ;end TO SEPERATE SQL STATEMENTS. DON'T USE ;end IN ANY OTHER PLACES!
$sql = array();
$count = 0;
//v9.2.00 and earlier removed to reduce file size
//v10.0.00
++$count;
$sql[$count][0] = '10.0.00';
$sql[$count][1] = "
ALTER TABLE `gibbonMarkbookColumn` ADD `uploadedResponse` ENUM('Y','N') NOT NULL DEFAULT 'Y' AFTER `comment`;end
ALTER TABLE `gibbonMarkbookColumn` CHANGE `gibbonScaleIDAttainment` `gibbonScaleIDAttainment` INT(5) UNSIGNED ZEROFILL NULL DEFAULT NULL, CHANGE `gibbonScaleIDEffort` `gibbonScaleIDEffort` INT(5) UNSIGNED ZEROFILL NULL DEFAULT NULL;end
ALTER TABLE `gibbonMarkbookEntry` CHANGE `attainmentDescriptor` `attainmentDescriptor` VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, CHANGE `attainmentConcern` `attainmentConcern` ENUM('N','Y','P') CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '''P'' denotes that student has exceed their personal target', CHANGE `effortDescriptor` `effortDescriptor` VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, CHANGE `effortConcern` `effortConcern` ENUM('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, CHANGE `comment` `comment` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;end
ALTER TABLE `gibbonMarkbookEntry` CHANGE `attainmentValue` `attainmentValue` VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, CHANGE `effortValue` `effortValue` VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='System Admin'), 'Third Party Settings', 0, '', 'Allows administrators to configure and make use of third party services.', 'thirdPartySettings.php', 'thirdPartySettings.php', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='System Admin' AND gibbonAction.name='Third Party Settings'));end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'Messenger', 'enableHomeScreenWidget', 'Enable Home Screen Widget', 'Adds a Message Wall widget to the home page, hihglighting current messages.', 'N');end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='User Admin'), 'Public Registration Settings', 0, 'Admissions', 'Gives access to enable and configure public registration.', 'publicRegistrationSettings.php', 'publicRegistrationSettings.php', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='User Admin' AND gibbonAction.name='Public Registration Settings'));end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'User Admin', 'enablePublicRegistration', 'Enable Public Registration', 'Allows members of the public to register to use the system.', 'N');end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'User Admin', 'publicRegistrationMinimumAge', 'Public Registration Minimum Age', 'The minimum age, in years, permitted to register.', '13');end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'User Admin', 'publicRegistrationDefaultStatus', 'Public Registration Default Status', 'Should new users be \'Full\' or \'Pending Approval\'?', 'Pending Approval');end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'User Admin', 'publicRegistrationDefaultRole', 'Public Registration Default Role', 'System role to be assigned to registering members of the public.', '003');end
ALTER TABLE `gibbonPerson` CHANGE `status` `status` ENUM('Full','Expected','Left','Pending Approval') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'Full';end
ALTER TABLE `gibbonPerson` CHANGE `gender` `gender` ENUM('M','F','Other','Unspecified') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'Unspecified';end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'User Admin', 'publicRegistrationIntro', 'Public Registration Introductory Text', 'HTML text that will appear above the public registration form.', '');end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'User Admin', 'publicRegistrationPrivacyStatement', 'Public Registration Privacy Statement', 'HTML text that will appear above the Submit button, explaining privacy policy.', 'By registering for this site you are giving permission for your personal data to be used and shared within this organisation and its websites. We will not share your personal data outside our organisation.');end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'User Admin', 'publicRegistrationAgreement', 'Public Registration Agreement', 'Agreement that user must confirm before joining. Blank for no agreement.', 'In joining this site, and checking the box below, I agree to act lawfully, ethically and with respect for others. I agree to use this site for learning purposes only, and understand that access may be withdrawn at any time, at the discretion of the site\'s administrators.');end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'User Admin', 'publicRegistrationPostscript', 'Public Registration Postscript', 'HTML text that will appear underneath the public registration form.', '');end
UPDATE gibbonMarkbookColumn set gibbonPlannerEntryID=NULL WHERE gibbonPlannerEntryID=0 ;end
ALTER TABLE `gibbonFinanceExpense` CHANGE `gibbonSchoolYearID` `gibbonFinanceBudgetCycleID` INT(6) UNSIGNED ZEROFILL NOT NULL;end
UPDATE gibbonAction SET category='Settings' WHERE (name='Language Settings' OR name='System Settings' OR name='Third Party Settings') AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='System Admin');end
UPDATE gibbonAction SET category='Extend & Update' WHERE (name='Manage Modules' OR name='Manage Themes' OR name='Update') AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='System Admin');end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='System Admin'), 'Sound Alarm', 0, 'Alarm', 'Allows user to issue a system-wide audio alert to all staff.', 'alarm.php', 'alarm.php', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='System Admin' AND gibbonAction.name='Sound Alarm'));end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'System', 'alarm', 'Alarm', 'Sound a system wide alarm to all staff.', 'None');end
ALTER TABLE `gibbonHook` CHANGE `type` `type` ENUM('Public Home Page','Student Profile','Unit','Parental Dashboard') CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;end
INSERT INTO `gibboni18n` (`code`, `name`, `active`, `systemDefault`, `maintainerName`, `maintainerWebsite`, `dateFormat`, `dateFormatRegEx`, `dateFormatPHP`,`rtl`) VALUES ('sw_KE', 'Swahili', 'N', 'N', 'James Peru', '', 'dd/mm/yyyy', '/^(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\\\d\\\d$/i', 'd/m/Y', 'N');end
INSERT INTO `gibboni18n` (`code`, `name`, `active`, `systemDefault`, `maintainerName`, `maintainerWebsite`, `dateFormat`, `dateFormatRegEx`, `dateFormatPHP`,`rtl`) VALUES ('pt_PT', 'Português', 'N', 'N', 'Wilson Canda', '', 'dd/mm/yyyy', '/^(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\\\d\\\d$/i', 'd/m/Y', 'N');end
CREATE TABLE `gibbonLog` (`gibbonLogID` int(16) unsigned zerofill NOT NULL AUTO_INCREMENT,`gibbonModuleID` int(4) unsigned zerofill NOT NULL, `gibbonPersonID` int(10) unsigned zerofill NOT NULL, `gibbonSchoolYearID` int(3) unsigned zerofill NOT NULL, `timestamp` timestamp DEFAULT CURRENT_TIMESTAMP,`title` varchar(50) NOT NULL, `serialisedArray` text NULL, PRIMARY KEY (`gibbonLogID`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'Behaviour', 'enableDescriptors', 'Enable Descriptors', 'Setting to No reduces complexity of behaviour tracking.', 'Y');end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'Behaviour', 'enableLevels', 'Enable Levels', 'Setting to No reduces complexity of behaviour tracking.', 'Y');end
ALTER TABLE `gibbonBehaviour` CHANGE `descriptor` `descriptor` VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, CHANGE `level` `level` VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;end
UPDATE gibboni18n SET active='Y' WHERE code='pt_PT';end
ALTER TABLE `gibbonFinanceBudgetCycleAllocation` ENGINE = MYISAM ;end
UPDATE gibboni18n SET active='Y' WHERE code='ar_SA';end
UPDATE gibboni18n SET active='N' WHERE code='pt_PT';end
";
//v11.0.00
++$count;
$sql[$count][0] = '11.0.00';
$sql[$count][1] = "
UPDATE gibbonAction SET name='Import Users' WHERE name='Sync Users' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='User Admin');end
UPDATE gibbonAction SET name='Import Families' WHERE name='Sync Families' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='User Admin');end
UPDATE gibbonAction SET name='Import Student Enrolment' WHERE name='Sync Student Enrolment' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='User Admin');end
UPDATE gibbonModule SET name='Formal Assessment' WHERE name='External Assessment';end
UPDATE gibbonAction SET category='External Assessment' WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Formal Assessment');end
UPDATE gibbonAction SET name='Formal Assessment Settings', URLList='formalAssessmentSettings.php', entryURL='formalAssessmentSettings.php' WHERE name='External Assessment Settings' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='School Admin');end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'Formal Assessment', 'internalAssessmentTypes', 'Internal Assessment Types', 'Comma-separated list of types to make available in Internal Assessments.', 'Expected Grade,Predicted Grade,Target Grade');end
CREATE TABLE `internalAssessmentColumn` ( `internalAssessmentColumnID` int(10) unsigned zerofill NOT NULL AUTO_INCREMENT, `gibbonCourseClassID` int(8) unsigned zerofill NOT NULL, `groupingID` int(8) unsigned zerofill DEFAULT NULL COMMENT 'A value used to group multiple columns.', `name` varchar(20) NOT NULL, `description` text NOT NULL, `type` varchar(50) NOT NULL, `attachment` varchar(255) NOT NULL, `attainment` enum('Y','N') NOT NULL DEFAULT 'Y', `gibbonScaleIDAttainment` int(5) unsigned zerofill DEFAULT NULL, `comment` enum('Y','N') NOT NULL DEFAULT 'Y', `uploadedResponse` enum('N','Y') NOT NULL DEFAULT 'N', `complete` enum('N','Y') NOT NULL, `completeDate` date DEFAULT NULL, `viewableStudents` enum('N','Y') NOT NULL, `viewableParents` enum('N','Y') NOT NULL, `gibbonPersonIDCreator` int(10) unsigned zerofill NOT NULL, `gibbonPersonIDLastEdit` int(10) unsigned zerofill NOT NULL, PRIMARY KEY (`internalAssessmentColumnID`)) ENGINE=MyISAM DEFAULT CHARSET=utf8;end
CREATE TABLE `internalAssessmentEntry` ( `internalAssessmentEntryID` int(12) unsigned zerofill NOT NULL AUTO_INCREMENT, `internalAssessmentColumnID` int(10) unsigned zerofill NOT NULL, `gibbonPersonIDStudent` int(10) unsigned zerofill NOT NULL, `attainmentValue` varchar(10) DEFAULT NULL, `attainmentDescriptor` varchar(100) DEFAULT NULL, `comment` text, `response` text NULL DEFAULT NULL, `gibbonPersonIDLastEdit` int(10) unsigned zerofill NOT NULL, PRIMARY KEY (`internalAssessmentEntryID`)) ENGINE=MyISAM DEFAULT CHARSET=utf8;end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Formal Assessment'), 'Manage Internal Assessments', 0, 'Internal Assessment', 'Allows privileged users to create and manage Internal Assessment columns.', 'internalAssessment_manage.php, internalAssessment_manage_add.php, internalAssessment_manage_edit.php, internalAssessment_manage_delete.php', 'internalAssessment_manage.php', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Formal Assessment' AND gibbonAction.name='Manage Internal Assessments'));end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Formal Assessment'), 'Write Internal Assessments_myClasses', 0, 'Internal Assessment', 'Allows teachers to enter Internal Assessment assessment data to columns in their classes.', 'internalAssessment_write.php, internalAssessment_write_data.php', 'internalAssessment_write.php', 'N', 'Y', 'N', 'N', 'N', 'Y', 'N', 'N', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '2', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Formal Assessment' AND gibbonAction.name='Write Internal Assessments_myClasses'));end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Formal Assessment'), 'Write Internal Assessments_all', 1, 'Internal Assessment', 'Allows privileged users to enter Internal Assessment assessment data to columns in all classes.', 'internalAssessment_write.php, internalAssessment_write_data.php', 'internalAssessment_write.php', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Formal Assessment' AND gibbonAction.name='Write Internal Assessments_all'));end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Formal Assessment'), 'View Internal Assessments_mine', 0, 'Internal Assessment', 'Allows students to view their own Internal Assessment results.', 'internalAssessment_view.php', 'internalAssessment_view.php', 'N', 'N', 'Y', 'N', 'N', 'N', 'Y', 'N', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '3', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Formal Assessment' AND gibbonAction.name='View Internal Assessments_mine'));end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Formal Assessment'), 'View Internal Assessments_myChildrens', 1, 'Internal Assessment', 'Allows parents to view their childrens\' Internal Assessment results.', 'internalAssessment_view.php', 'internalAssessment_view.php', 'N', 'N', 'N', 'Y', 'N', 'N', 'N', 'Y', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '4', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Formal Assessment' AND gibbonAction.name='View Internal Assessments_myChildrens'));end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Formal Assessment'), 'View Internal Assessments_all', 2, 'Internal Assessment', 'Allows staff to see Internal Assessment results for all children.', 'internalAssessment_view.php', 'internalAssessment_view.php', 'Y', 'Y', 'N', 'N', 'N', 'Y', 'N', 'N', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Formal Assessment' AND gibbonAction.name='View Internal Assessments_all'));end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '2', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Formal Assessment' AND gibbonAction.name='View Internal Assessments_all'));end
RENAME TABLE internalAssessmentColumn TO gibbonInternalAssessmentColumn;end
RENAME TABLE internalAssessmentEntry TO gibbonInternalAssessmentEntry;end
ALTER TABLE `gibbonInternalAssessmentColumn` CHANGE `internalAssessmentColumnID` `gibbonInternalAssessmentColumnID` INT(10) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT;end
ALTER TABLE `gibbonInternalAssessmentEntry` CHANGE `internalAssessmentEntryID` `gibbonInternalAssessmentEntryID` INT(12) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT, CHANGE `internalAssessmentColumnID` `gibbonInternalAssessmentColumnID` INT(10) UNSIGNED ZEROFILL NOT NULL;end
ALTER TABLE `gibbonInternalAssessmentColumn` ADD `effort` ENUM('Y','N') NOT NULL DEFAULT 'Y' AFTER `gibbonScaleIDAttainment`, ADD `gibbonScaleIDEffort` INT(5) UNSIGNED ZEROFILL NULL DEFAULT NULL AFTER `effort`;end
ALTER TABLE `gibbonInternalAssessmentEntry` ADD `effortValue` VARCHAR(10) NULL DEFAULT NULL AFTER `attainmentDescriptor`, ADD `effortDescriptor` VARCHAR(100) NULL DEFAULT NULL AFTER `effortValue`;end
CREATE TABLE `gibbonAlarm` ( `gibbonAlarmID` int(5) unsigned zerofill NOT NULL, `type` enum('General','Lockdown') DEFAULT NULL, `status` enum('Current','Past') NOT NULL DEFAULT 'Past', `gibbonPersonID` int(10) unsigned zerofill NOT NULL, `timestampStart` timestamp NULL DEFAULT NULL, `timestampEnd` timestamp NULL DEFAULT NULL) ENGINE=MyISAM DEFAULT CHARSET=utf8;end
ALTER TABLE `gibbonAlarm` ADD PRIMARY KEY (`gibbonAlarmID`);end
ALTER TABLE `gibbonAlarm` MODIFY `gibbonAlarmID` int(5) unsigned zerofill NOT NULL AUTO_INCREMENT;end
CREATE TABLE `gibbonAlarmConfirm` ( `gibbonAlarmConfirmID` int(8) unsigned zerofill NOT NULL, `gibbonAlarmID` int(5) unsigned zerofill NOT NULL, `gibbonPersonID` int(10) unsigned zerofill NOT NULL, `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP) ENGINE=InnoDB DEFAULT CHARSET=utf8;end
ALTER TABLE `gibbonAlarmConfirm` ADD PRIMARY KEY (`gibbonAlarmConfirmID`), ADD UNIQUE KEY `gibbonAlarmID` (`gibbonAlarmID`,`gibbonPersonID`);end
ALTER TABLE `gibbonAlarmConfirm` MODIFY `gibbonAlarmConfirmID` int(8) unsigned zerofill NOT NULL AUTO_INCREMENT;end
ALTER TABLE `gibbonNotification` ADD `status` ENUM('New','Archived') NOT NULL DEFAULT 'New' AFTER `gibbonPersonID`;end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'System Admin', 'customAlarmSound', 'Custom Alarm Sound', 'A custom alarm sound file.', '');end
ALTER TABLE `gibbonAlarm` CHANGE `type` `type` ENUM('General','Lockdown','Custom') CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'School Admin', 'spaceTypes', 'Space Types', 'A comma-separated list of types for spaces.', 'Classroom,Hall,Laboratory,Library,Office,Outdoor,Performance,Staffroom,Storage,Study,Undercover,Other');end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='School Admin'), 'Manage Space Settings', 0, 'Other', 'Allows privileged users to manage settings for spaces.', 'spaceSettings.php', 'spaceSettings.php', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='School Admin' AND gibbonAction.name='Manage Space Settings'));end
ALTER TABLE `gibbonSpace` CHANGE `type` `type` VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;end
ALTER TABLE `gibbonPerson` DROP `image_75`;end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'Finance', 'allowExpenseAdd', 'Allow Expense Add', 'Allows privileged users to add expenses without going through request process.', 'Y');end
UPDATE gibbonAction SET precedence=1, name='View Behaviour Records_all' WHERE name='View Behaviour Records' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Behaviour');end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Behaviour'), 'View Behaviour Records_myChildren', 0, '', 'View behaviour records for students within a family.', 'behaviour_view.php,behaviour_view_details.php', 'behaviour_view.php', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'Y', 'N') ;end
ALTER TABLE `gibbonHouse` ADD `logo` VARCHAR(255) NOT NULL AFTER `nameShort`;end
ALTER TABLE `gibbonLog` ADD `ip` VARCHAR(15) NOT NULL AFTER `serialisedArray`;end
ALTER TABLE `gibbonLog` CHANGE `gibbonModuleID` `gibbonModuleID` INT(4) UNSIGNED ZEROFILL NULL DEFAULT NULL;end
ALTER TABLE `gibbonLog` CHANGE `gibbonPersonID` `gibbonPersonID` INT(10) UNSIGNED ZEROFILL NULL DEFAULT NULL;end
INSERT INTO `gibboni18n` (`code`, `name`, `active`, `systemDefault`, `maintainerName`, `maintainerWebsite`, `dateFormat`, `dateFormatRegEx`, `dateFormatPHP`,`rtl`) VALUES ('ro_RO', 'Română', 'N', 'N', 'Iulian Ghetau', '', 'dd.mm.yyyy', '/^(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\\\d\\\d$/i', 'd.m.Y', 'N');end
CREATE TABLE `gibbonLike` ( `gibbonLikeID` int(16) unsigned zerofill NOT NULL, `gibbonSchoolYearID` int(3) unsigned zerofill NOT NULL, `gibbonModuleID` int(4) unsigned zerofill NOT NULL, `contextKeyName` varchar(255) NOT NULL, `contextKeyValue` int(20) NOT NULL, `gibbonPersonIDRecipient` int(10) unsigned zerofill NOT NULL, `gibbonPersonIDGiver` int(10) unsigned zerofill NOT NULL, `title` varchar(50) NOT NULL, `comment` text NOT NULL, `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP) ENGINE=MyISAM DEFAULT CHARSET=utf8;end
ALTER TABLE `gibbonLike` ADD PRIMARY KEY (`gibbonLikeID`), ADD KEY `gibbonModuleID` (`gibbonModuleID`), ADD KEY `gibbonPersonIDRecipient` (`gibbonPersonIDRecipient`), ADD KEY `gibbonPersonIDGiver` (`gibbonPersonIDGiver`);end
ALTER TABLE `gibbonLike` MODIFY `gibbonLikeID` int(16) unsigned zerofill NOT NULL AUTO_INCREMENT;end
UPDATE gibbonAction SET name='Staff Likes' WHERE name='Staff Gold Stars' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Planner');end
DROP TABLE gibbonPlannerEntryLike;end
DROP TABLE gibbonCrowdAssessLike;end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Timetable'), 'View Master Timetable', 0, 'View Timetables', 'Allows a user to see all days, periods, teachers and rooms in a timetable.', 'tt_master.php', 'tt_master.php', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Timetable' AND gibbonAction.name='View Master Timetable'));end
ALTER TABLE `gibbonCourse` ADD `orderBy` INT(3) NOT NULL AFTER `gibbonYearGroupIDList`;end
INSERT INTO `gibbonModule` (`gibbonModuleID`, `name`, `description`, `entryURL`, `type`, `active`, `category`, `version`, `author`, `url`) VALUES (NULL, 'Tracking', 'Provides visual graphing of student progress, as recorded in the Markbook and Internal Assessment.', 'graphing.php', 'Core', 'Y', 'Assess', '', 'Ross Parker', 'https://rossparker.org');end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `entrySidebar`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Tracking'), 'Graphing_all', 2, '', 'Allows a user to see progress tracking graphs for all students in school.', 'graphing.php', 'graphing.php', 'N', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Tracking' AND gibbonAction.name='Graphing_all'));end
DELETE FROM gibbonSetting WHERE scope='System' AND name='organisationAdministratorName';end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'System', 'organisationAdministrator', 'System Administrator', 'The staff member who receives notifications for system events.', 1);end
DELETE FROM gibbonSetting WHERE scope='System' AND name='organisationAdministratorEmail';end
DELETE FROM gibbonSetting WHERE scope='System' AND name='organisationDBAName';end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'System', 'organisationDBA', 'Database Administrator', 'The staff member who receives notifications for data events.', 1);end
DELETE FROM gibbonSetting WHERE scope='System' AND name='organisationDBAEmail';end
DELETE FROM gibbonSetting WHERE scope='System' AND name='organisationAdmissionsName';end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'System', 'organisationAdmissions', 'Admissions Administrator', 'The staff member who receives notifications for admissions events.', 1);end
DELETE FROM gibbonSetting WHERE scope='System' AND name='organisationAdmissionsEmail';end
ALTER TABLE `gibbonFinanceExpense` ADD `countAgainstBudget` ENUM('Y','N') NOT NULL DEFAULT 'Y' AFTER `cost`;end
UPDATE gibbonAction SET name='Unit Planner_all', precedence=1 WHERE name='Manage Units_all' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Planner');end
UPDATE gibbonAction SET name='Unit Planner_learningAreas' WHERE name='Manage Units_learningAreas' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Planner');end
ALTER TABLE `gibbonLog` CHANGE `ip` `ip` VARCHAR(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Timetable Admin'), 'Course Enrolment Rollover', 0, 'Courses & Classes', 'Allows privileged users to move enrolments from the current year to the next year.', 'course_rollover.php', 'course_rollover.php', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Timetable Admin' AND gibbonAction.name='Course Enrolment Rollover'));end
ALTER TABLE `gibbonFinanceExpenseLog` CHANGE `action` `action` ENUM('Request','Approval - Partial - Budget','Approval - Partial - School','Approval - Final','Approval - Exempt','Rejection','Cancellation','Order','Payment','Reimbursement Request','Reimbursement Completion','Comment') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;end
CREATE TABLE `gibbonPersonField` ( `gibbonPersonFieldID` int(3) unsigned zerofill NOT NULL, `name` varchar(50) NOT NULL, `active` enum('Y','N') NOT NULL DEFAULT 'Y', `description` varchar(255) NOT NULL, `type` enum('varchar','text','date','url','select','checkboxes') NOT NULL, `options` text NOT NULL COMMENT 'Field length for varchar, rows for text, comma-separate list for select/checkbox.', `required` enum('N','Y') NOT NULL DEFAULT 'N', `activePersonStudent` tinyint(1) NOT NULL DEFAULT '0', `activePersonStaff` tinyint(1) NOT NULL DEFAULT '0', `activePersonParent` tinyint(1) NOT NULL DEFAULT '0', `activePersonOther` tinyint(1) NOT NULL DEFAULT '0', `activeApplicationForm` tinyint(1) NOT NULL DEFAULT '0', `activeDataUpdater` tinyint(1) NOT NULL DEFAULT '0') ENGINE=MyISAM DEFAULT CHARSET=utf8;end
ALTER TABLE `gibbonPersonField` ADD PRIMARY KEY (`gibbonPersonFieldID`);end
ALTER TABLE `gibbonPersonField` MODIFY `gibbonPersonFieldID` int(3) unsigned zerofill NOT NULL AUTO_INCREMENT;end
ALTER TABLE `gibbonPerson` ADD `fields` TEXT NOT NULL COMMENT 'Serialised array of custom field values' AFTER `receiveNoticiationEmails`;end
ALTER TABLE `gibbonPersonUpdate` ADD `fields` TEXT NOT NULL COMMENT 'Serialised array of custom field values' AFTER `privacy`;end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='User Admin'), 'Manage User Custom Fields', 0, 'User Management', 'Allows a user to create, edit and delete custom fields for users.', 'userFields.php, userFields_add.php, userFields_edit.php, userFields_delete.php', 'userFields.php', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='User Admin' AND gibbonAction.name='Manage User Custom Fields'));end
ALTER TABLE `gibbonApplicationForm` ADD `fields` TEXT NOT NULL COMMENT 'Serialised array of custom field values' AFTER `privacy`, ADD `parent1fields` TEXT NOT NULL COMMENT 'Serialised array of custom field values' AFTER `fields`, ADD `parent2fields` TEXT NOT NULL COMMENT 'Serialised array of custom field values' AFTER `parent1fields`;end
INSERT INTO `gibboni18n` (`code`, `name`, `active`, `systemDefault`, `maintainerName`, `maintainerWebsite`, `dateFormat`, `dateFormatRegEx`, `dateFormatPHP`,`rtl`) VALUES ('ja_JP', '日本語', 'N', 'N', 'Yoshie Cresp', '', 'yyyy-mm-dd', '/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/', 'Y-m-d', 'N');end
ALTER TABLE `gibbonPayment` ADD `type` ENUM('Online','Bank Transfer','Cash','Cheque','Other') NOT NULL DEFAULT 'Online' AFTER `foreignTableID`;end
ALTER TABLE `gibbonPayment` CHANGE `status` `onlineTransactionStatus` ENUM('Success','Failure') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'Success';end
ALTER TABLE `gibbonPayment` ADD `status` ENUM('Complete','Partial','Final','Failure') NOT NULL DEFAULT 'Complete' COMMENT 'Complete means paid in one go, partial is part of a set of payments, and final is last in a set of payments.' AFTER `type`;end
ALTER TABLE `gibbonPayment` CHANGE `gateway` `gateway` ENUM('Paypal') CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, CHANGE `onlineTransactionStatus` `onlineTransactionStatus` ENUM('Success','Failure') CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;end
ALTER TABLE `gibbonFinanceInvoice` CHANGE `status` `status` ENUM('Pending','Issued','Paid','Paid - Partial','Cancelled','Refunded') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'Pending';end
ALTER TABLE `gibbonPayment` ADD `gibbonPersonID` INT(10) unsigned zerofill NOT NULL COMMENT 'Person recording the transaction' AFTER `foreignTableID`;end
ALTER TABLE `gibbonPayment` ADD `amount` DECIMAL(13,2) NOT NULL AFTER `status`;end
ALTER TABLE `gibbonFinanceInvoice` CHANGE `paidAmount` `paidAmount` DECIMAL(13,2) NULL DEFAULT NULL COMMENT 'The current running total amount paid to this invoice';end
ALTER TABLE `gibbonPayment` CHANGE `gibbonPersonID` `gibbonPersonID` INT(10) UNSIGNED ZEROFILL NULL DEFAULT NULL COMMENT 'Person recording the transaction';end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'Finance', 'hideItemisation', 'Hide Itemisation', 'Hide fee and payment details in receipts?', 'N');end
ALTER TABLE `gibbonPersonMedicalCondition` CHANGE `gibbonAlertLevelID` `gibbonAlertLevelID` INT( 3 ) UNSIGNED ZEROFILL NULL DEFAULT NULL ;end
UPDATE gibbonPersonMedicalCondition SET gibbonAlertLevelID=NULL WHERE gibbonAlertLevelID=0 ;end
ALTER TABLE `gibbonPersonMedicalConditionUpdate` CHANGE `gibbonAlertLevelID` `gibbonAlertLevelID` INT( 3 ) UNSIGNED ZEROFILL NULL DEFAULT NULL ;end
UPDATE gibbonPersonMedicalConditionUpdate SET gibbonAlertLevelID=NULL WHERE gibbonAlertLevelID=0 ;end
ALTER TABLE `gibbonApplicationForm` CHANGE `companyName` `companyName` VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, CHANGE `companyContact` `companyContact` VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, CHANGE `companyAddress` `companyAddress` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, CHANGE `companyEmail` `companyEmail` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, CHANGE `companyPhone` `companyPhone` VARCHAR(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Timetable'), 'Manage Student Enrolment', 0, 'Edit Timetables', 'Allows a departmental Coordinator or Assistant Coordinator to manage student enrolment within their department.', 'studentEnrolment_manage.php, studentEnrolment_manage_edit.php, studentEnrolment_manage_edit_edit.php, studentEnrolment_manage_edit_delete.php', 'studentEnrolment_manage.php', 'N', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'N') ;end
ALTER TABLE `gibbonRole` CHANGE `nonCurrentYearLogin` `futureYearsLogin` ENUM('Y','N') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'Y';end
ALTER TABLE `gibbonRole` ADD `pastYearsLogin` ENUM('Y','N') NOT NULL DEFAULT 'Y';end
UPDATE gibbonRole SET pastYearsLogin='N' WHERE futureYearsLogin='N';end
CREATE TABLE `gibbonLanguage` ( `gibbonLanguageID` int(4) unsigned zerofill NOT NULL, `name` varchar(30) NOT NULL) ENGINE=InnoDB AUTO_INCREMENT=74 DEFAULT CHARSET=utf8;end
INSERT INTO `gibbonLanguage` (`gibbonLanguageID`, `name`) VALUES (0001, 'Afrikaans'), (0002, 'Albanian'), (0003, 'Arabic'), (0004, 'Armenian'), (0005, 'Basque'), (0006, 'Bengali'), (0007, 'Bulgarian'), (0008, 'Catalan'), (0009, 'Cambodian'), (0010, 'Chinese (Mandarin)'), (0011, 'Chinese (Cantonese)'), (0012, 'Croation'), (0013, 'Czech'), (0014, 'Danish'), (0015, 'Dutch'), (0016, 'English'), (0017, 'Estonian'), (0018, 'Fijian'), (0019, 'Finnish'), (0020, 'French'), (0021, 'Georgian'), (0022, 'German'), (0023, 'Greek'), (0024, 'Gujarati'), (0025, 'Hebrew'), (0026, 'Hindi'), (0027, 'Hungarian'), (0028, 'Icelandic'), (0029, 'Indonesian'), (0030, 'Irish'), (0031, 'Italian'), (0032, 'Japanese'), (0033, 'Javanese'), (0034, 'Korean'), (0035, 'Latin'), (0036, 'Latvian'), (0037, 'Lithuanian'), (0038, 'Macedonian'), (0039, 'Malay'), (0040, 'Malayalam'), (0041, 'Maltese'), (0042, 'Maori'), (0043, 'Marathi'), (0044, 'Mongolian'), (0045, 'Nepali'), (0046, 'Norwegian'), (0047, 'Persian'), (0048, 'Polish'), (0049, 'Portuguese'), (0050, 'Punjabi'), (0051, 'Quechua'), (0052, 'Romanian'), (0053, 'Russian'), (0054, 'Samoan'), (0055, 'Serbian'), (0056, 'Slovak'), (0057, 'Slovenian'), (0058, 'Spanish'), (0059, 'Swahili'), (0060, 'Swedish '), (0061, 'Tamil'), (0062, 'Tatar'), (0063, 'Telugu'), (0064, 'Thai'), (0065, 'Tibetan'), (0066, 'Tongan'), (0067, 'Turkish'), (0068, 'Ukranian'), (0069, 'Urdu'), (0070, 'Uzbek'), (0071, 'Vietnamese'), (0072, 'Welsh'), (0073, 'Xhosa');end
ALTER TABLE `gibbonLanguage` ADD PRIMARY KEY (`gibbonLanguageID`);end
ALTER TABLE `gibbonLanguage` MODIFY `gibbonLanguageID` int(4) unsigned zerofill NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=74;end
ALTER TABLE `gibbonApplicationForm` CHANGE `languageHome` `languageHomePrimary` VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;end
ALTER TABLE `gibbonApplicationForm` ADD `languageHomeSecondary` VARCHAR(30) NOT NULL AFTER `languageHomePrimary`;end
ALTER TABLE `gibbonFamily` CHANGE `languageHome` `languageHomePrimary` VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;end
ALTER TABLE `gibbonFamily` ADD `languageHomeSecondary` VARCHAR(30) NOT NULL AFTER `languageHomePrimary`;end
ALTER TABLE `gibbonFamilyUpdate` CHANGE `languageHome` `languageHomePrimary` VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;end
ALTER TABLE `gibbonFamilyUpdate` ADD `languageHomeSecondary` VARCHAR(30) NOT NULL AFTER `languageHomePrimary`;end
UPDATE gibbonPerson SET receiveNoticiationEmails='Y';end
ALTER TABLE `gibbonPerson` CHANGE `receiveNoticiationEmails` `receiveNoticiationEmails` ENUM('Y','N') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'Y';end
UPDATE gibbonSetting SET value=concat(value, ',div[*]') WHERE name='allowableHTML' AND value NOT LIKE '%div[*]%';end
ALTER TABLE `gibbonAction` ADD UNIQUE KEY `moduleActionName` (`name`,`gibbonModuleID`);end
UPDATE gibbonAction SET URLList='rubrics.php, rubrics_add.php, rubrics_edit.php, rubrics_delete.php, rubrics_edit_editRowsColumns.php, rubrics_duplicate.php' WHERE URLList='rubrics.php, rubrics_add.php, rubrics_edit.php, rubrics_delete.php, rubrics_edit_editRowsColumns.php';end
ALTER TABLE `gibbonINArchive` ADD `descriptors` TEXT NOT NULL COMMENT 'Serialised array of descriptors.' AFTER `notes`;end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'Application Form', 'autoHouseAssign', 'Auto House Assign', 'Attempt to automatically place student in a house?', 'N');end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='School Admin'), 'Tracking Settings', 0, 'Assessment', 'Allows a user to manage settings for the Tracking module.', 'trackingSettings.php', 'trackingSettings.php', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='School Admin' AND gibbonAction.name='Tracking Settings'));end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Tracking'), 'Data Points', 0, 'Analyse', 'Allows a user to export certain key assessment data points to a spreadsheet.', 'dataPoints.php', 'dataPoints.php', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Tracking' AND gibbonAction.name='Data Points'));end
UPDATE gibbonAction SET category='Visualise' WHERE name='Graphing_all' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Tracking');end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'Tracking', 'externalAssessmentDataPoints', 'External Assessment Data Points', 'Stores the external assessment choices for data points output in tracking.', '');end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'Tracking', 'internalAssessmentDataPoints', 'Internal Assessment Data Points', 'Stores the internal assessment choices for data points output in tracking.', '');end
DROP TABLE gibbonActivityStudentPayment;end
ALTER TABLE `gibbonActivityStudent` ADD `invoiceGenerated` ENUM('N','Y') NOT NULL DEFAULT 'N' AFTER `gibbonActivityIDBackup`, ADD `gibbonFinanceInvoiceID` INT(14) UNSIGNED ZEROFILL NULL DEFAULT NULL AFTER `invoiceGenerated`;end
UPDATE gibbonAction SET URLList='activities_payment.php', entryURL='activities_payment.php', category='Finance', name='Generate Invoices' WHERE name='Payment' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE gibbonModule.name='Activities') ;end
ALTER TABLE `gibbonScaleGrade` ADD `isDefault` ENUM('N','Y') NOT NULL DEFAULT 'N' AFTER `sequenceNumber`;end
UPDATE gibbonExternalAssessmentStudentEntry SET gibbonScaleGradeIDPrimaryAssessmentScale=NULL WHERE gibbonScaleGradeIDPrimaryAssessmentScale=0;end
UPDATE gibbonExternalAssessmentStudentEntry SET gibbonScaleGradeID=NULL WHERE gibbonScaleGradeID=0;end
INSERT INTO `gibboni18n` (`code`, `name`, `active`, `systemDefault`, `maintainerName`, `maintainerWebsite`, `dateFormat`, `dateFormatRegEx`, `dateFormatPHP`,`rtl`) VALUES ('ru_RU', 'ру́сский язы́к', 'N', 'N', 'Info Web', '', 'dd.mm.yyyy', '/^(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\\\d\\\d$/i', 'd.m.Y', 'N');end
INSERT INTO `gibboni18n` (`code`, `name`, `active`, `systemDefault`, `maintainerName`, `maintainerWebsite`, `dateFormat`, `dateFormatRegEx`, `dateFormatPHP`,`rtl`) VALUES ('uk_UA', 'українська мова', 'N', 'N', 'Info Web', '', 'dd.mm.yyyy', '/^(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\\\d\\\d$/i', 'd.m.Y', 'N');end
ALTER TABLE `gibbonPerson` CHANGE `receiveNoticiationEmails` `receiveNotificationEmails` ENUM('Y','N') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'Y';end
UPDATE gibbonAction SET URLList='studentEnrolment_manage.php, studentEnrolment_manage_edit.php, studentEnrolment_manage_edit_edit.php' WHERE name='Manage Student Enrolment' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Timetable');end
INSERT INTO `gibboni18n` (`code`, `name`, `active`, `systemDefault`, `maintainerName`, `maintainerWebsite`, `dateFormat`, `dateFormatRegEx`, `dateFormatPHP`,`rtl`) VALUES ('bn_BD', 'বাংলা', 'N', 'N', 'Tarul Ahsan', '', 'dd/mm/yyyy', '/^(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\\\d\\\d$/i', 'd/m/Y', 'N');end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'Behaviour', 'enableBehaviourLetters', 'Enable Behaviour Letters', 'Should automated behaviour letter functionality be enabled?', 'N');end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'Behaviour', 'behaviourLettersLetter1Count', 'Letter 1 Count', 'After how many negative records should letter 1 be sent?', '3');end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'Behaviour', 'behaviourLettersLetter1Text', 'Letter 1 Text', 'The contents of letter 1, as HTML.', 'Dear [parentName],<br/><br/>This letter has been automatically generated to alert you to the fact that your child, [studentName] has reached [behaviourCount] negative behaviour incidents. Please see the list below for details of these incidents:<br/><br/>[behaviourRecord]<br/><br/>This letter represents the first communication in a sequence of 3 potential alerts, each of which is more critical than the last.<br/><br/>If you would like more information on this matter, please contact your child\'s tutor.<br/><br/>[systemEmailSignature]');end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'Behaviour', 'behaviourLettersLetter2Count', 'Letter 2 Count', 'After how many negative records should letter 2 be sent?', '6');end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'Behaviour', 'behaviourLettersLetter2Text', 'Letter 2 Text', 'The contents of letter 2, as HTML.', 'Dear [parentName],<br/><br/>This letter has been automatically generated to alert you to the fact that your child, [studentName] has reached [behaviourCount] negative behaviour incidents. Please see the list below for details of these incidents:<br/><br/>[behaviourRecord]<br/><br/>This letter represents the second communication in a sequence of 3 potential alerts, each of which is more critical than the last.<br/><br/>If you would like more information on this matter, please contact your child\'s tutor.<br/><br/>[systemEmailSignature]');end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'Behaviour', 'behaviourLettersLetter3Count', 'Letter 3 Count', 'After how many negative records should letter 3 be sent?', '9');end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'Behaviour', 'behaviourLettersLetter3Text', 'Letter 3 Text', 'The contents of letter 3, as HTML.', 'Dear [parentName],<br/><br/>This letter has been automatically generated to alert you to the fact that your child, [studentName] has reached [behaviourCount] negative behaviour incidents. Please see the list below for details of these incidents:<br/><br/>[behaviourRecord]<br/><br/>This letter represents the final communication in a sequence of 3 potential alerts, each of which is more critical than the last.<br/><br/>If you would like more information on this matter, please contact your child\'s tutor.<br/><br/>[systemEmailSignature]');end
CREATE TABLE `gibbonBehaviourLetter` ( `gibbonBehaviourLetterID` int(10) unsigned zerofill NOT NULL, `gibbonSchoolYearID` int(3) unsigned zerofill NOT NULL, `gibbonPersonID` int(10) unsigned zerofill NOT NULL, `letterLevel` enum('1','2','3') NOT NULL, `status` enum('Warning','Issued') NOT NULL, `body` text NOT NULL, `behaviourRecord` text NOT NULL, `recipientList` text NOT NULL, `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP) ENGINE=MyISAM DEFAULT CHARSET=utf8;end
ALTER TABLE `gibbonBehaviourLetter` ADD PRIMARY KEY (`gibbonBehaviourLetterID`);end
ALTER TABLE `gibbonBehaviourLetter` MODIFY `gibbonBehaviourLetterID` int(10) unsigned zerofill NOT NULL AUTO_INCREMENT;end
ALTER TABLE `gibbonAlarmConfirm` ENGINE = MyISAM;end
ALTER TABLE `gibbonPayment` ENGINE = MyISAM;end
ALTER TABLE `gibbonLanguage` ENGINE = MyISAM;end
ALTER TABLE `gibbonUnitBlockStar` ENGINE = MyISAM;end
ALTER TABLE `gibbonFinanceBudgetCycleAllocation` ENGINE = MyISAM;end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Behaviour'), 'View Behaviour Letters', 0, 'Behaviour Tracking', 'Allows a user to view automated behaviour letters sent out by the system.', 'behaviour_letters.php', 'behaviour_letters.php', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Behaviour' AND gibbonAction.name='View Behaviour Letters'));end
UPDATE gibbonAction SET category='Behaviour Tracking' WHERE name='Find Behaviour Patterns' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Behaviour');end
UPDATE gibbonAction SET category='Behaviour Records' WHERE name LIKE 'Manage Behaviour Records%' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Behaviour');end
UPDATE gibbonAction SET category='Behaviour Records' WHERE name LIKE 'View Behaviour Records%' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Behaviour');end
ALTER TABLE `gibbonBehaviourLetter` ADD `recordCountAtCreation` INT(3) NOT NULL AFTER `status`;end
ALTER TABLE `gibbonBehaviourLetter` DROP `behaviourRecord`;end
UPDATE `gibbonSetting` SET value='Dear Parent/Guardian,<br/><br/>This letter has been automatically generated to alert you to the fact that your child, [studentName], has reached [behaviourCount] negative behaviour incidents. Please see the list below for the details of these incidents:<br/><br/>[behaviourRecord]<br/><br/>This letter represents the first communication in a sequence of 3 potential alerts, each of which is more critical than the last.<br/><br/>If you would like more information on this matter, please contact your child\'s tutor.' WHERE name='behaviourLettersLetter1Text' AND scope='Behaviour';end
UPDATE `gibbonSetting` SET value='Dear Parent/Guardian,<br/><br/>This letter has been automatically generated to alert you to the fact that your child, [studentName], has reached [behaviourCount] negative behaviour incidents. Please see the list below for the details of these incidents:<br/><br/>[behaviourRecord]<br/><br/>This letter represents the second communication in a sequence of 3 potential alerts, each of which is more critical than the last.<br/><br/>If you would like more information on this matter, please contact your child\'s tutor.' WHERE name='behaviourLettersLetter2Text' AND scope='Behaviour';end
UPDATE `gibbonSetting` SET value='Dear Parent/Guardian,<br/><br/>This letter has been automatically generated to alert you to the fact that your child, [studentName], has reached [behaviourCount] negative behaviour incidents. Please see the list below for the details of these incidents:<br/><br/>[behaviourRecord]<br/><br/>This letter represents the final communication in a sequence of 3 potential alerts, each of which is more critical than the last.<br/><br/>If you would like more information on this matter, please contact your child\'s tutor.' WHERE name='behaviourLettersLetter3Text' AND scope='Behaviour';end
UPDATE gibbonSetting SET value='br,strong[*],em[*],span[*],p[*],address[*],pre[*],h1[*],h2[*],h3[*],h4[*],h5[*],h6[*],table[*],thead[*],tbody[*],tfoot[*],tr[*],td[*],ol[*],ul[*],li[*],blockquote[*],a[*],img[*],video[*],source[*],hr[*],iframe[*],embed[*],div[*],sup,sub' WHERE value='br,strong[*],em[*],span[*],p[*],address[*],pre[*],h1[*],h2[*],h3[*],h4[*],h5[*],h6[*],table[*],thead[*],tbody[*],tfoot[*],tr[*],td[*],ol[*],ul[*],li[*],blockquote[*],a[*],img[*],video[*],source[*],hr[*],iframe[*],embed[*],div[*]' AND name='allowableHTML' AND scope='System';end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Finance'), 'View Invoices', 0, 'Billing', 'Allows parents to view invoices issued to members of their family.', 'invoices_view.php, invoices_view_print.php', 'invoices_view.php', 'N', 'N', 'N', 'Y', 'N', 'N', 'N', 'Y', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '4', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Finance' AND gibbonAction.name='View Invoices'));end
UPDATE gibbonAction SET category='View Messages' WHERE name LIKE 'View Message Wall%' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Messenger');end
UPDATE gibbonAction SET category='Manage Messages' WHERE name LIKE 'Manage Messages%' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Messenger');end
UPDATE gibbonAction SET category='Manage Messages' WHERE name LIKE 'New Message%' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Messenger');end
UPDATE gibbonAction SET category='Manage Messages' WHERE name LIKE 'New Quick Wall Message%' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Messenger');end
UPDATE gibbonAction SET name='Attendance By Roll Group' WHERE name='Attendance By Roll' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Attendance');end
UPDATE `gibboni18n` SET `active` = 'Y' WHERE `code` = 'RO_ro';end
";
//v12.0.00
++$count;
$sql[$count][0] = '12.0.00';
$sql[$count][1] = "
INSERT INTO `gibboni18n` (`code`, `name`, `active`, `systemDefault`, `maintainerName`, `maintainerWebsite`, `dateFormat`, `dateFormatRegEx`, `dateFormatPHP`,`rtl`) VALUES ('da_DK', 'Dansk - Danmark', 'N', 'N', 'Jørgen Mortensen', '', 'dd/mm/yyyy', '/^(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\\\d\\\d$/i', 'd/m/Y', 'N');end
ALTER TABLE `gibbonActivity` CHANGE `payment` `payment` DECIMAL(8,2) NULL DEFAULT NULL;end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'Markbook', 'enableColumnWeighting', 'Enable Column Weighting', 'Should column weighting and total scores be enabled in the Markbook?', 'N');end
ALTER TABLE `gibbonMarkbookColumn` ADD `attainmentWeighting` INT(3) NULL DEFAULT NULL AFTER `gibbonScaleIDAttainment`;end
UPDATE gibbonAction SET entrySidebar='N', category='Markbook' WHERE name LIKE 'View Markbook%' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Markbook');end
UPDATE gibbonAction SET name='View Markbook_viewMyChildrensClasses' WHERE name='Markbook_viewMyChildrensClasses' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Markbook');end
UPDATE gibbonAction SET category='Markbook' WHERE name LIKE 'Edit Markbook%' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Markbook');end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Individual Needs'), 'View Individual Education Plans_myChildren', 0, 'Individual Needs', 'Allows parents to view individual needs plans for members of their family.', 'iep_view_myChildren.php', 'iep_view_myChildren.php', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'Y', 'N') ;end
ALTER TABLE `gibbonFamily` CHANGE `languageHomeSecondary` `languageHomeSecondary` VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;end
UPDATE gibbonLibraryType SET fields='a:20:{i:0;a:6:{s:4:\"name\";s:6:\"Format\";s:11:\"description\";s:0:\"\";s:4:\"type\";s:6:\"Select\";s:7:\"options\";s:341:\",Art - Original,Art - Reproduction,Book,Braille,Cartographic material,Chart,Diorama,Electronic Resource,Filmstrip,Flash Card,Game,Globe,Journal,Kit,Large print,Magazine,Manuscript,Microform,Microscope slide,Model,Motion Picture,Music,Picture,Realia,Resource,Serial,Slide,Sound Recording,Technical Drawing,Text,Toy,Transparency,Videorecording\";s:7:\"default\";s:0:\"\";s:8:\"required\";s:1:\"N\";}i:1;a:6:{s:4:\"name\";s:9:\"Publisher\";s:11:\"description\";s:45:\"Name of the company who published the volume.\";s:4:\"type\";s:4:\"Text\";s:7:\"options\";s:3:\"255\";s:7:\"default\";s:0:\"\";s:8:\"required\";s:1:\"N\";}i:2;a:6:{s:4:\"name\";s:16:\"Publication Date\";s:11:\"description\";s:36:\"Format: dd/mm/yyyy, mm/yyyy or yyyy.\";s:4:\"type\";s:4:\"Text\";s:7:\"options\";s:2:\"10\";s:7:\"default\";s:0:\"\";s:8:\"required\";s:1:\"N\";}i:3;a:6:{s:4:\"name\";s:22:\"Country of Publication\";s:11:\"description\";s:0:\"\";s:4:\"type\";s:4:\"Text\";s:7:\"options\";s:2:\"50\";s:7:\"default\";s:0:\"\";s:8:\"required\";s:1:\"N\";}i:4;a:6:{s:4:\"name\";s:7:\"Edition\";s:11:\"description\";s:0:\"\";s:4:\"type\";s:4:\"Text\";s:7:\"options\";s:2:\"50\";s:7:\"default\";s:0:\"\";s:8:\"required\";s:1:\"N\";}i:5;a:6:{s:4:\"name\";s:6:\"ISBN10\";s:11:\"description\";s:28:\"10-digit unique ISBN number.\";s:4:\"type\";s:4:\"Text\";s:7:\"options\";s:2:\"10\";s:7:\"default\";s:0:\"\";s:8:\"required\";s:1:\"N\";}i:6;a:6:{s:4:\"name\";s:6:\"ISBN13\";s:11:\"description\";s:28:\"13-digit unique ISBN number.\";s:4:\"type\";s:4:\"Text\";s:7:\"options\";s:2:\"13\";s:7:\"default\";s:0:\"\";s:8:\"required\";s:1:\"Y\";}i:7;a:6:{s:4:\"name\";s:11:\"Description\";s:11:\"description\";s:36:\"A brief blurb describing the volume.\";s:4:\"type\";s:8:\"Textarea\";s:7:\"options\";s:2:\"10\";s:7:\"default\";s:0:\"\";s:8:\"required\";s:1:\"N\";}i:8;a:6:{s:4:\"name\";s:8:\"Subjects\";s:11:\"description\";s:33:\"Comma separated list of subjects.\";s:4:\"type\";s:8:\"Textarea\";s:7:\"options\";s:1:\"2\";s:7:\"default\";s:0:\"\";s:8:\"required\";s:1:\"N\";}i:9;a:6:{s:4:\"name\";s:10:\"Collection\";s:11:\"description\";s:0:\"\";s:4:\"type\";s:6:\"Select\";s:7:\"options\";s:230:\",Fiction, Fiction - Best Sellers, Fiction - Classics, Fiction - Mystery, Fiction - Series, Fiction - Young Adult, Nonfiction, Nonfiction - College Prep, Nonfiction - Graphic Novels, Nonfiction - Life Skills, Nonfiction - Reference\";s:7:\"default\";s:0:\"\";s:8:\"required\";s:1:\"N\";}i:10;a:6:{s:4:\"name\";s:14:\"Control Number\";s:11:\"description\";s:0:\"\";s:4:\"type\";s:4:\"Text\";s:7:\"options\";s:3:\"255\";s:7:\"default\";s:0:\"\";s:8:\"required\";s:1:\"N\";}i:11;a:6:{s:4:\"name\";s:20:\"Cataloging Authority\";s:11:\"description\";s:37:\"Issuing authority for Control Number.\";s:4:\"type\";s:4:\"Text\";s:7:\"options\";s:3:\"255\";s:7:\"default\";s:0:\"\";s:8:\"required\";s:1:\"N\";}i:12;a:6:{s:4:\"name\";s:21:\"Reader Age (Youngest)\";s:11:\"description\";s:50:\"Age in years, youngest reading age recommendation.\";s:4:\"type\";s:4:\"Text\";s:7:\"options\";s:1:\"3\";s:7:\"default\";s:0:\"\";s:8:\"required\";s:1:\"N\";}i:13;a:6:{s:4:\"name\";s:19:\"Reader Age (Oldest)\";s:11:\"description\";s:48:\"Age in years, oldest reading age recommendation.\";s:4:\"type\";s:4:\"Text\";s:7:\"options\";s:1:\"3\";s:7:\"default\";s:0:\"\";s:8:\"required\";s:1:\"N\";}i:14;a:6:{s:4:\"name\";s:10:\"Page Count\";s:11:\"description\";s:34:\"The number of pages in the volume.\";s:4:\"type\";s:4:\"Text\";s:7:\"options\";s:1:\"4\";s:7:\"default\";s:0:\"\";s:8:\"required\";s:1:\"N\";}i:15;a:6:{s:4:\"name\";s:6:\"Height\";s:11:\"description\";s:41:\"The physical height of the volume, in cm.\";s:4:\"type\";s:4:\"Text\";s:7:\"options\";s:1:\"6\";s:7:\"default\";s:0:\"\";s:8:\"required\";s:1:\"N\";}i:16;a:6:{s:4:\"name\";s:5:\"Width\";s:11:\"description\";s:40:\"The physical width of the volume, in cm.\";s:4:\"type\";s:4:\"Text\";s:7:\"options\";s:1:\"6\";s:7:\"default\";s:0:\"\";s:8:\"required\";s:1:\"N\";}i:17;a:6:{s:4:\"name\";s:9:\"Thickness\";s:11:\"description\";s:44:\"The physical thickness of the volume, in cm.\";s:4:\"type\";s:4:\"Text\";s:7:\"options\";s:1:\"6\";s:7:\"default\";s:0:\"\";s:8:\"required\";s:1:\"N\";}i:18;a:6:{s:4:\"name\";s:8:\"Language\";s:11:\"description\";s:35:\"The primary language of the volume.\";s:4:\"type\";s:4:\"Text\";s:7:\"options\";s:2:\"50\";s:7:\"default\";s:0:\"\";s:8:\"required\";s:1:\"N\";}i:19;a:6:{s:4:\"name\";s:4:\"Link\";s:11:\"description\";s:44:\"Link to web-based information on the volume.\";s:4:\"type\";s:3:\"URL\";s:7:\"options\";s:3:\"255\";s:7:\"default\";s:0:\"\";s:8:\"required\";s:1:\"N\";}}' WHERE name='Print Publication';end
INSERT INTO `gibboni18n` (`code`, `name`, `active`, `systemDefault`, `maintainerName`, `maintainerWebsite`, `dateFormat`, `dateFormatRegEx`, `dateFormatPHP`,`rtl`) VALUES ('fa_IR', 'فارسی', 'N', 'N', 'CR Robotic', '', 'dd/mm/yyyy', '/^(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\\\d\\\d$/i', 'd/m/Y', 'Y');end
INSERT INTO `gibboni18n` (`code`, `name`, `active`, `systemDefault`, `maintainerName`, `maintainerWebsite`, `dateFormat`, `dateFormatRegEx`, `dateFormatPHP`,`rtl`) VALUES ('pt_BR', 'Português - Brasil', 'N', 'N', 'Rodrigo Magalhães ', '', 'dd/mm/yyyy', '/^(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\\\d\\\d$/i', 'd/m/Y', 'N');end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'System', 'firstDayOfTheWeek', 'First Day Of The Week', 'On which day should the week begin?', 'Monday');end
ALTER TABLE `gibbonStaff` CHANGE `type` `type` VARCHAR(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;end
CREATE TABLE `gibbonString` ( `gibbonStringID` int(8) unsigned zerofill NOT NULL AUTO_INCREMENT, `original` varchar(100) NOT NULL, `replacement` varchar(100) NOT NULL, `mode` enum('Whole','Partial') NOT NULL, `caseSensitive` ENUM('Y','N') NOT NULL, `priority` INT(2) NOT NULL DEFAULT '0', PRIMARY KEY (`gibbonStringID`)) ENGINE=MyISAM DEFAULT CHARSET=utf8;end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='System Admin'), 'String Replacement', 0, 'Settings', 'Allows for interface strings to be replaced with custom values.', 'stringReplacement_manage.php, stringReplacement_manage_add.php, stringReplacement_manage_edit.php, stringReplacement_manage_delete.php', 'stringReplacement_manage.php', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='System Admin' AND gibbonAction.name='String Replacement'));end
ALTER TABLE `gibbonLibraryItem` ADD `physicalCondition` ENUM('','As New','Lightly Worn','Moderately Worn','Damaged','Unusable') NOT NULL AFTER `gibbonSchoolYearIDReplacement`;end
ALTER TABLE `gibbonHook` CHANGE `type` `type` ENUM('Public Home Page','Student Profile','Unit','Parental Dashboard','Staff Dashboard','Student Dashboard') CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='User Admin'), 'Import User Photos', 0, 'Import', 'Allows bulk import of user photos based on a ZIP file.', 'import_userPhotos.php', 'import_userPhotos.php', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='User Admin' AND gibbonAction.name='Import User Photos'));end
INSERT INTO `gibboni18n` (`code`, `name`, `active`, `systemDefault`, `maintainerName`, `maintainerWebsite`, `dateFormat`, `dateFormatRegEx`, `dateFormatPHP`,`rtl`) VALUES ('ke_GE', 'ქართული ენა', 'N', 'N', 'Giorgi Beria', '', 'dd/mm/yyyy', '/^(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\\\d\\\d$/i', 'd/m/Y', 'N');end
INSERT INTO `gibboni18n` (`code`, `name`, `active`, `systemDefault`, `maintainerName`, `maintainerWebsite`, `dateFormat`, `dateFormatRegEx`, `dateFormatPHP`,`rtl`) VALUES ('nl_NL', 'Dutch - Nederland', 'N', 'N', 'Vic Mortelmans', '', 'dd-mm-yyyy', '/^(0[1-9]|[12][0-9]|3[01])[-](0[1-9]|1[012])[-](19|20)\\\d\\\d$/i', 'd-m-Y', 'N');end
ALTER TABLE `gibbonLibraryItem` ADD `replacement` ENUM('Y','N') NOT NULL DEFAULT 'Y' AFTER `gibbonDepartmentID`;end
UPDATE `gibbonLibraryItem` SET `replacement`='N' WHERE gibbonSchoolYearIDReplacement IS NULL AND replacementCost IS NULL;end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'Application Form', 'usernameFormat', 'Username Format', 'How should usernames be formated? Choose from [preferredName], [preferredNameInitial], [surname].', '[preferredNameInitial][surname]');end
ALTER TABLE `gibbonUnit` ADD `ordering` INT(2) NOT NULL DEFAULT '0' AFTER `description`;end
UPDATE gibbonAction SET name='Manage Facilities' WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='School Admin') AND name='Manage Spaces';end
UPDATE gibbonAction SET name='View Timetable by Facility' WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Timetable') AND name='View Timetable by Space';end
UPDATE gibbonAction SET name='View Available Facilities' WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Timetable') AND name='View Available Spaces';end
UPDATE gibbonAction SET name='Manage Facility Changes_allClasses' WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Timetable') AND name='Manage Space Changes_allClasses';end
UPDATE gibbonAction SET name='Manage Facility Changes_myClasses' WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Timetable') AND name='Manage Space Changes_myClasses';end
UPDATE gibbonAction SET name='Manage Facility Bookings_allBookings' WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Timetable') AND name='Manage Space Bookings_allBookings';end
UPDATE gibbonAction SET name='Manage Facility Bookings_myBookings' WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Timetable') AND name='Manage Space Bookings_myBookings';end
UPDATE gibbonAction SET name='Manage Facility Settings' WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='School Admin') AND name='Manage Space Settings';end
UPDATE gibbonSetting SET name='facilityTypes', nameDisplay='FacilityTypes', description='A comma-separated list of types for facilities.' WHERE scope='School Admin' AND name='spaceTypes';end
ALTER TABLE `gibbonSpace` CHANGE `gibbonSpaceID` `gibbonSpaceID` INT(10) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT;end
ALTER TABLE `gibbonTTSpaceBooking` ADD `foreignKey` ENUM('gibbonSpaceID','gibbonLibraryItemID') NOT NULL DEFAULT 'gibbonSpaceID' AFTER `gibbonTTSpaceBookingID`;end
ALTER TABLE `gibbonTTSpaceBooking` CHANGE `gibbonSpaceID` `foreignKeyID` INT(10) UNSIGNED ZEROFILL NOT NULL;end
ALTER TABLE `gibbonLibraryItem` ADD `bookable` ENUM('N','Y') NOT NULL DEFAULT 'N' AFTER `physicalCondition`;end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Messenger'), 'Canned Response', 0, 'Manage Messages', 'Allows for the creation of message templates.', 'cannedResponse_manage.php, cannedResponse_manage_add.php, cannedResponse_manage_edit.php, cannedResponse_manage_delete.php', 'cannedResponse_manage.php', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Messenger' AND gibbonAction.name='Canned Response'));end
CREATE TABLE `gibbonMessengerCannedResponse` ( `gibbonMessengerCannedResponseID` int(10) unsigned zerofill NOT NULL AUTO_INCREMENT, `subject` varchar(30) NOT NULL, `body` text NOT NULL, `timestampCreator` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `gibbonPersonIDCreator` int(11) unsigned zerofill NOT NULL, PRIMARY KEY (`gibbonMessengerCannedResponseID`)) ENGINE=MyISAM DEFAULT CHARSET=utf8;end
UPDATE gibbonAction SET name='Application Form', category='Admissions', gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Students') WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Application Form') AND name='Apply';end
DELETE FROM gibbonModule WHERE name='Application Form';end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Staff'), 'Job Openings', 0, 'Recruitment', 'Allows for the creation of job openings, which can be used in the job application form.', 'jobOpenings_manage.php, jobOpenings_manage_add.php, jobOpenings_manage_edit.php, jobOpenings_manage_delete.php', 'jobOpenings_manage.php', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Staff' AND gibbonAction.name='Job Openings'));end
CREATE TABLE `gibbonStaffJobOpening` ( `gibbonStaffJobOpeningID` int(10) unsigned zerofill NOT NULL AUTO_INCREMENT, `type` varchar(20) NOT NULL, `jobTitle` varchar(100) NOT NULL, `dateOpen` DATE NOT NULL, `active` enum('Y','N') NOT NULL DEFAULT 'Y', `description` text NOT NULL, `gibbonPersonIDCreator` int(10) unsigned zerofill NOT NULL, `timestampCreator` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`gibbonStaffJobOpeningID`)) ENGINE=MyISAM DEFAULT CHARSET=utf8;end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='User Admin'), 'Manage Staff Settings', 0, 'User Management', 'Controls settings for users with role category Staff.', 'staffSettings.php', 'staffSettings.php', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='User Admin' AND gibbonAction.name='Manage Staff Settings'));end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'Staff', 'jobOpeningDescriptionTemplate', 'Job Opening Description Template', 'Default HTML contnets for the Job Opening Description field.', '<table style=\'width: 100%\'>\n\t<tr>\n\t\t<td colspan=2 style=\'vertical-align: top\'>\n\t\t\t<span style=\'text-decoration: underline; font-weight: bold\'>Job Description</span><br/>\n\t\t\t<br/>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td style=\'width: 50%; vertical-align: top\'>\n\t\t\t<span style=\'text-decoration: underline; font-weight: bold\'>Responsibilities</span><br/>\n\t\t\t<ul style=\'margin-top:0px\'>\n\t\t\t\t<li></li>\n\t\t\t\t<li></li>\n\t\t\t</ul>\n\t\t</td>\n\t\t<td style=\'width: 50%; vertical-align: top\'>\n\t\t\t<span style=\'text-decoration: underline; font-weight: bold\'>Required Skills/Characteristics</span><br/>\n\t\t\t<ul style=\'margin-top:0px\'>\n\t\t\t\t<li></li>\n\t\t\t\t<li></li>\n\t\t\t</ul>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td style=\'width: 50%; vertical-align: top\'>\n\t\t\t<span style=\'text-decoration: underline; font-weight: bold\'>Remuneration</span><br/>\n\t\t\t<ul style=\'margin-top:0px\'>\n\t\t\t\t<li></li>\n\t\t\t\t<li></li>\n\t\t\t</ul>\n\t\t</td>\n\t\t<td style=\'width: 50%; vertical-align: top\'>\n\t\t\t<span style=\'text-decoration: underline; font-weight: bold\'>Other Details </span><br/>\n\t\t\t<ul style=\'margin-top:0px\'>\n\t\t\t\t<li></li>\n\t\t\t\t<li></li>\n\t\t\t</ul>\n\t\t</td>\n\t</tr>\n</table>');end
UPDATE gibbonAction SET category='Admissions', gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Students') WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='User Admin') AND name='Manage Applications';end
UPDATE gibbonAction SET category='Admissions', gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Students') WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='User Admin') AND name='Student Enrolment';end
UPDATE gibbonAction SET category='Staff Management', gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Staff') WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='User Admin') AND name='Manage Staff';end
UPDATE gibbonAction SET category='Staff Management' WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Staff') AND name='Job Openings';end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Staff'), 'Application Form', 0, 'Staff Management', 'Allows prospective staff to apply for job openings.', 'applicationForm.php, applicationForm_jobOpenings_view.php', 'applicationForm.php', 'Y', 'Y', 'N', 'N', 'Y', 'Y', 'Y', 'Y', 'Y') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Staff' AND gibbonAction.name='Application Form'));end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '2', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Staff' AND gibbonAction.name='Application Form'));end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '6', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Staff' AND gibbonAction.name='Application Form'));end
CREATE TABLE `gibbonStaffApplicationForm` (`gibbonStaffApplicationFormID` int(12) unsigned zerofill NOT NULL AUTO_INCREMENT, `gibbonStaffJobOpeningID` int(10) unsigned zerofill NOT NULL, `surname` varchar(30) NOT NULL DEFAULT '',`firstName` varchar(30) NOT NULL DEFAULT '',`preferredName` varchar(30) NOT NULL DEFAULT '',`officialName` varchar(150) NOT NULL,`nameInCharacters` varchar(20) NOT NULL,`gender` enum('M','F') NOT NULL DEFAULT 'M',`status` enum('Pending','Accepted','Rejected','Withdrawn') NOT NULL DEFAULT 'Pending',`dob` date DEFAULT NULL,`email` varchar(50) DEFAULT NULL,`homeAddress` mediumtext,`homeAddressDistrict` varchar(255) DEFAULT NULL,`homeAddressCountry` varchar(255) DEFAULT NULL,`phone1Type` enum('','Mobile','Home','Work','Fax','Pager','Other') NOT NULL DEFAULT '',`phone1CountryCode` varchar(7) NOT NULL,`phone1` varchar(20) NOT NULL,`countryOfBirth` varchar(30) NOT NULL,`citizenship1` varchar(255) NOT NULL,`citizenship1Passport` varchar(30) NOT NULL,`nationalIDCardNumber` varchar(30) NOT NULL,`residencyStatus` varchar(255) NOT NULL,`visaExpiryDate` date DEFAULT NULL,`languageFirst` varchar(30) NOT NULL,`languageSecond` varchar(30) NOT NULL,`languageThird` varchar(30) NOT NULL,`agreement` enum('N','Y') DEFAULT NULL,`timestamp` timestamp NULL DEFAULT NULL,`priority` int(1) NOT NULL DEFAULT '0',`milestones` text NOT NULL,`notes` text NOT NULL,`dateStart` date DEFAULT NULL,`questions` text NOT NULL,`fields` text NOT NULL COMMENT 'Serialised array of custom field values',PRIMARY KEY (`gibbonStaffApplicationFormID`)) ENGINE=MyISAM DEFAULT CHARSET=utf8;end
CREATE TABLE `gibbonStaffApplicationFormFile` ( `gibbonStaffApplicationFormFileID` int(14) unsigned zerofill NOT NULL AUTO_INCREMENT, `gibbonStaffApplicationFormID` int(12) unsigned zerofill NOT NULL, `name` varchar(255) NOT NULL, `path` varchar(255) NOT NULL, PRIMARY KEY (`gibbonStaffApplicationFormFileID`)) ENGINE=MyISAM DEFAULT CHARSET=utf8;end
INSERT INTO `gibbonSetting` (`scope`, `name`, `nameDisplay`, `description`, `value`) VALUES ('Staff', 'staffApplicationFormIntroduction', 'Introduction', 'Information to display before the form', ''), ('Staff', 'staffApplicationFormPostscript', 'Postscript', 'Information to display at the end of the form', ''), ('Staff', 'staffApplicationFormAgreement', 'Agreement', 'Without this text, which is displayed above the agreement, users will not be asked to agree to anything', 'In submitting this form, I confirm that all information provided above is accurate and complete to the best of my knowledge.'), ('Staff', 'staffApplicationFormMilestones', 'Milestones', 'Comma-separated list of the major steps in the application process. Applicants can be tracked through the various stages.', 'Short List, First Interview, Second Interview, Offer Made, Offer Accepted, Contact Issued, Contact Signed'), ('Staff', 'staffApplicationFormRequiredDocuments', 'Required Documents', 'Comma-separated list of documents which must be submitted electronically with the application form.', 'Curriculum Vitae'), ('Staff', 'staffApplicationFormRequiredDocumentsCompulsory', 'Required Documents Compulsory?', 'Are the required documents compulsory?', 'Y'), ('Staff', 'staffApplicationFormRequiredDocumentsText', 'Required Documents Text', 'Explanatory text to appear with the required documents?', 'Please submit the following document(s) to ensure your application can be processed without delay.'), ('Staff', 'staffApplicationFormNotificationDefault', 'Notification Default', 'Should acceptance email be turned on or off by default.', 'Y'), ('Staff', 'staffApplicationFormNotificationMessage', 'Notification Message', 'A custom message to add to the standard email on acceptance.', ''), ('Staff', 'staffApplicationFormDefaultEmail', 'Default Email', 'Set default email on acceptance, using [username] to insert username.', ''), ('Staff', 'staffApplicationFormDefaultWebsite', 'Default Website', 'Set default website on acceptance, using [username] to insert username.', ''), ('Staff', 'staffApplicationFormUsernameFormat', 'Username Format', 'How should usernames be formated? Choose from [preferredName], [preferredNameInitial], [surname].', '[preferredNameInitial].[surname]');end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='User Admin'), 'Staff Application Form Settings', 0, 'Staff Management', 'Allows admins to control the staff application form.', 'staffApplicationFormSettings.php', 'staffApplicationFormSettings.php', 'Y', 'Y', 'N', 'N', 'N', 'Y', 'N', 'N', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='User Admin' AND gibbonAction.name='Staff Application Form Settings'));end
UPDATE gibbonAction SET category='Student Management' WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='User Admin') AND category='Admissions';end
UPDATE gibbonAction SET category='Staff Management' WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='User Admin') AND name='Manage Staff Settings';end
UPDATE gibbonAction SET category='Student Management' WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='User Admin') AND name='Manage Staff Settings';end
UPDATE gibbonAction SET gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Students') WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='User Admin') AND name='Manage Medical Forms';end
INSERT INTO `gibbonSetting` (`scope`, `name`, `nameDisplay`, `description`, `value`) VALUES('System', 'organisationHR', 'Human Resources Administrator', 'The staff member who receives notifications for staffing events.', '0000000001');end
INSERT INTO `gibbonSetting` (`scope`, `name`, `nameDisplay`, `description`, `value`) VALUES('Staff', 'staffApplicationFormQuestions', 'Application Questions', 'HTML text that will appear as questions for the applicant to answer.', '<span style=\'text-decoration: underline; font-weight: bold\'>Why are you applying for this role?</span><br/>');end
ALTER TABLE `gibbonStaffApplicationForm` ADD `gibbonPersonID` INT(10) UNSIGNED ZEROFILL NULL DEFAULT NULL AFTER `gibbonStaffJobOpeningID`;end
UPDATE gibbonSetting SET value='<span style=''text-decoration: underline; font-weight: bold''>Why are you applying for this role?</span><br/><p></p>' WHERE name='staffApplicationFormQuestions' AND scope='Staff';end
ALTER TABLE `gibbonStaffApplicationForm` CHANGE `surname` `surname` VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, CHANGE `firstName` `firstName` VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, CHANGE `preferredName` `preferredName` VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, CHANGE `officialName` `officialName` VARCHAR(150) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, CHANGE `nameInCharacters` `nameInCharacters` VARCHAR(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, CHANGE `gender` `gender` ENUM('M','F') CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, CHANGE `dob` `dob` DATE NULL DEFAULT NULL, CHANGE `email` `email` VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, CHANGE `homeAddress` `homeAddress` MEDIUMTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, CHANGE `homeAddressDistrict` `homeAddressDistrict` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, CHANGE `homeAddressCountry` `homeAddressCountry` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, CHANGE `phone1Type` `phone1Type` ENUM('','Mobile','Home','Work','Fax','Pager','Other') CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, CHANGE `phone1CountryCode` `phone1CountryCode` VARCHAR(7) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, CHANGE `phone1` `phone1` VARCHAR(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, CHANGE `countryOfBirth` `countryOfBirth` VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, CHANGE `citizenship1` `citizenship1` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, CHANGE `citizenship1Passport` `citizenship1Passport` VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, CHANGE `nationalIDCardNumber` `nationalIDCardNumber` VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, CHANGE `residencyStatus` `residencyStatus` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, CHANGE `visaExpiryDate` `visaExpiryDate` DATE NULL DEFAULT NULL, CHANGE `languageFirst` `languageFirst` VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, CHANGE `languageSecond` `languageSecond` VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, CHANGE `languageThird` `languageThird` VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Staff'), 'Manage Applications', 0, 'Staff Management', 'Allows administrators to view and action staff applications.', 'applicationForm_manage.php, applicationForm_manage_edit.php, applicationForm_manage_delete.php, applicationForm_manage_accept.php, applicationForm_manage_reject.php', 'applicationForm_manage.php', 'Y', 'Y', 'N', 'N', 'N', 'Y', 'N', 'N', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Staff' AND gibbonAction.name='Manage Applications'));end
UPDATE gibbonAction SET name='Manage Staff_general', precedence=0, description='Edit general information on members of staff.' WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Staff') AND name='Manage Staff';end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Staff'), 'Manage Staff_confidential', 1, 'Staff Management', 'Edit general and confidential information on members of staff.', 'staff_manage.php, staff_manage_add.php, staff_manage_edit.php, staff_manage_delete.php, staff_manage_edit_contract_add.php, staff_manage_edit_contract_edit.php', 'staff_manage.php', 'Y', 'Y', 'N', 'N', 'N', 'Y', 'N', 'N', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Staff' AND gibbonAction.name='Manage Staff_confidential'));end
CREATE TABLE `gibbonStaffContract` (`gibbonStaffContractID` int(12) unsigned zerofill NOT NULL AUTO_INCREMENT, `gibbonStaffID` int(10) unsigned zerofill NOT NULL, `title` varchar(100) NOT NULL, `status` ENUM('','Pending','Active','Expired') NOT NULL DEFAULT '', `dateStart` date NOT NULL, `dateEnd` date NULL DEFAULT NULL, `salaryScale` varchar(255) NULL DEFAULT NULL, `salaryAmount` decimal(12,2), `salaryPeriod` enum('','Week','Month','Year','Contract') NULL DEFAULT NULL, `responsibility` varchar(255) NULL DEFAULT NULL, `responsibilityAmount` decimal(12,2) NULL DEFAULT NULL, `responsibilityPeriod` enum('','Week','Month','Year','Contract') NULL DEFAULT NULL, `housingAmount` decimal(12,2) NULL DEFAULT NULL, `housingPeriod` enum('','Week','Month','Year','Contract') NULL DEFAULT NULL, `travelAmount` decimal(12,2) NULL DEFAULT NULL, `travelPeriod` enum('','Week','Month','Year','Contract') NULL DEFAULT NULL, `retirementAmount` decimal(12,2) NULL DEFAULT NULL, `retirementPeriod` enum('','Week','Month','Year','Contract') NULL DEFAULT NULL, `bonusAmount` decimal(12,2) NULL DEFAULT NULL, `bonusPeriod` enum('','Week','Month','Year','Contract') NULL DEFAULT NULL, `education` text NOT NULL, `notes` text NOT NULL, `contractUpload` varchar(255) NULL DEFAULT NULL, `gibbonPersonIDCreator` int(10) unsigned zerofill NOT NULL, `timestampCreator` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`gibbonStaffContractID`)) ENGINE=MyISAM DEFAULT CHARSET=utf8;end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'Staff', 'salaryScalePositions', 'Salary Scale Positions', 'Comma-separated list of salary scale positions, from lowest to highest.', '1,2,3,4,5,6,7,8,9,10');end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'Staff', 'responsibilityPosts', 'Responsibility Posts', 'Comma-separated list of posts carrying extra responsibilities.', '');end
ALTER TABLE `gibbonApplicationForm` CHANGE `developmentInformation` `senDetails` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;end
ALTER TABLE `gibbonApplicationForm` ADD `sen` ENUM('N','Y') NULL DEFAULT NULL AFTER `medicalInformation`;end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'Students', 'applicationFormSENText', 'Application Form SEN Text', 'Text to appear with the Special Educational Needs section of the student application form.', 'Please indicate whether or not your child has any known, or suspected, special educational needs, or whether they have been assessed for any such needs in the past. Provide any comments or information concerning your child\'s development that may be relevant to your child\'s performance in the classroom or elsewhere? Incorrect or withheld information may affect continued enrolment.');end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'Students', 'applicationFormRefereeLink', 'Application Form Referee Link', 'Link to an external form that will be emailed to a referee of the applicant\'s choosing.', '');end
ALTER TABLE `gibbonApplicationForm` ADD `referenceEmail` VARCHAR(100) NULL DEFAULT NULL AFTER `dayType`;end
INSERT INTO `gibbonSetting` (`scope`, `name`, `nameDisplay`, `description`, `value`) VALUES ('User Admin', 'religions', 'Religions', 'Comma-separated list of ethnicities available in system', ',Nonreligious/Agnostic/Atheist,Buddhism,Christianity,Hinduism,Islam,Judaism,Other');end
ALTER TABLE `gibbonApplicationForm` CHANGE `companyEmail` `companyEmail` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;end
ALTER TABLE `gibbonFinanceInvoicee` CHANGE `companyEmail` `companyEmail` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;end
ALTER TABLE `gibbonFinanceInvoiceeUpdate` CHANGE `companyEmail` `companyEmail` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;end
UPDATE gibbonAction SET category='Staff Management' WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='User Admin') AND name='Manage Staff Settings';end
UPDATE gibbonAction SET category='Request Updates' WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Data Updater') AND name LIKE 'Update Family Data_%';end
UPDATE gibbonAction SET category='Request Updates' WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Data Updater') AND name LIKE 'Update Finance Data_%';end
UPDATE gibbonAction SET category='Request Updates' WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Data Updater') AND name LIKE 'Update Medical Data_%';end
UPDATE gibbonAction SET category='Request Updates' WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Data Updater') AND name LIKE 'Update Personal Data_%';end
UPDATE gibbonSetting SET description='Default HTML contents for the Job Opening Description field.' WHERE name='jobOpeningDescriptionTemplate' AND scope='Staff';end
INSERT INTO `gibboni18n` (`code`, `name`, `active`, `systemDefault`, `maintainerName`, `maintainerWebsite`, `dateFormat`, `dateFormatRegEx`, `dateFormatPHP`,`rtl`) VALUES ('hu_HU', 'Magyar - Magyarország', 'N', 'N', 'Attila Pegan', '', 'dd-mm-yyyy', '/^(0[1-9]|[12][0-9]|3[01])[-](0[1-9]|1[012])[-](19|20)\\\d\\\d$/i', 'd-m-Y', 'N');end
ALTER TABLE `gibbonStaffApplicationForm` ADD `referenceEmail1` VARCHAR(100) NOT NULL, ADD `referenceEmail2` VARCHAR(100) NOT NULL;end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'Staff', 'applicationFormRefereeLink', 'Application Form Referee Link', 'Link to an external form that will be emailed to a referee of the applicant\'s choosing.', '');end
UPDATE gibbonAction SET URLList='report_attendance.php, report_attendanceExport.php' WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Activities') AND name='Attendance by Activity';end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Activities'), 'Enter Activity Attendance', 0, 'Attendance', 'Record student attendance for activities.', 'activities_attendance.php,activities_attendanceProcess.php', 'activities_attendance.php', 'Y', 'Y', 'N', 'N', 'N', 'Y', 'N', 'N', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Activities' AND gibbonAction.name='Enter Activity Attendance'));end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '2', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Activities' AND gibbonAction.name='Enter Activity Attendance'));end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Activities'), 'Printable Attendance Sheet', 1, 'Attendance', 'Generate a printable attendance sheet for activities.', 'activities_attendance_sheet.php,activities_attendance_sheetPrint.php', 'activities_attendance_sheet.php', 'Y', 'Y', 'N', 'N', 'N', 'Y', 'N', 'N', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Activities' AND gibbonAction.name='Printable Attendance Sheet'));end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '2', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Activities' AND gibbonAction.name='Printable Attendance Sheet'));end
CREATE TABLE `gibbonActivityAttendance` ( `gibbonActivityAttendanceID` int(10) unsigned zerofill NOT NULL AUTO_INCREMENT, `gibbonActivityID` int(8) unsigned zerofill NOT NULL, `gibbonPersonIDTaker` int(8) unsigned zerofill NOT NULL, `attendance` text NOT NULL, `date` date DEFAULT NULL, `timestampTaken` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`gibbonActivityAttendanceID`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;end
UPDATE gibbonAction SET name='Attendance History by Activity', category='Attendance' WHERE name='Attendance by Activity' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Activities');end
ALTER TABLE `gibbonScale` CHANGE `nameShort` `nameShort` VARCHAR(5) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Formal Assessment'), 'View External Assessments_mine', 0, 'External Assessment', 'Allows a student to view their own external assessment records.', 'externalAssessment_view.php', 'externalAssessment_view.php', 'Y', 'N', 'N', 'N', 'N', 'N', 'Y', 'N', 'N') ;end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Formal Assessment'), 'View External Assessments_myChildrens', 1, 'External Assessment', 'Allows a parent to view external assessment records for their children.', 'externalAssessment_view.php', 'externalAssessment_view.php', 'Y', 'N', 'N', 'N', 'N', 'N', 'N', 'Y', 'N') ;end
ALTER TABLE `gibbonAction` ADD `menuShow` ENUM('Y','N') NOT NULL DEFAULT 'Y' AFTER `entrySidebar`;end
UPDATE gibbonAction SET category='Rubrics' WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Rubrics');end
UPDATE gibbonAction SET category='Crowd Assessment' WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Crowd Assessment');end
UPDATE gibbonAction SET name='View Invoices_myChildren', precedence='1' WHERE name='View Invoices' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Finance');end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Finance'), 'View Invoices_mine', 0, 'Billing', 'Allows a student to view their own invoices.', 'invoices_view.php, invoices_view_print.php', 'invoices_view.php', 'N', 'N', 'N', 'N', 'N', 'N', 'Y', 'N', 'N') ;end
UPDATE gibbonAction SET defaultPermissionAdmin='N' WHERE name='View External Assessments_myChildrens' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Formal Assessment');end
UPDATE gibbonAction SET defaultPermissionAdmin='N' WHERE name='View External Assessments_mine' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Formal Assessment');end
UPDATE gibbonAction SET precedence='2' WHERE name='Manage Facility Changes_allClasses' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Timetable');end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Timetable'), 'Manage Facility Changes_myDepartment', 1, 'Spaces', 'Allows a department coordinator to manage changes for all classes in their department.', 'spaceChange_manage.php,spaceChange_manage_add.php,spaceChange_manage_edit.php,spaceChange_manage_delete.php', 'spaceChange_manage.php', 'N', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'N') ;end
UPDATE gibbonAction SET category='Facilities' WHERE category='Spaces' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Timetable');end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Messenger'), 'New Message_attendance', 0, 'Manage Messages', 'Bulk email by student attendance.', 'messenger_post.php', 'messenger_post.php', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Messenger' AND gibbonAction.name='New Message_attendance'));end
ALTER TABLE `gibbonMessengerTarget` CHANGE `type` `type` ENUM('Class','Course','Roll Group','Year Group','Activity','Role','Applicants','Individuals','Houses','Role Category','Transport','Attendance');end
ALTER TABLE gibbonAttendanceLogPerson ADD INDEX `gibbonPersonID` (`gibbonPersonID`);end
UPDATE gibbonAction SET category='Roll Groups' WHERE name='View Roll Groups' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Roll Groups');end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Formal Assessment'), 'Import Internal Assessments', 0, 'Import', 'Imports internal assessment results into existing columns.', 'import_internal_results.php', 'import_internal_results.php', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Formal Assessment' AND gibbonAction.name='Import Internal Assessments'));end
UPDATE gibbonAction SET category='Import', name='Import External Assessments' WHERE name='Import Assessment Results' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Formal Assessment');end
ALTER TABLE `gibbonUnit` ADD `active` ENUM('Y','N') NOT NULL DEFAULT 'Y' AFTER `name`;end
ALTER TABLE `gibbonMarkbookColumn` ADD `sequenceNumber` INT(3) UNSIGNED NOT NULL DEFAULT '0' AFTER `description`, ADD `date` DATE AFTER `description`;end
ALTER TABLE `gibbonMarkbookColumn` ADD `attainmentRaw` ENUM('Y','N') NOT NULL DEFAULT 'N' AFTER `attainmentWeighting`, ADD `attainmentRawMax` INT(4) NULL AFTER `attainmentRaw`;end
ALTER TABLE `gibbonMarkbookColumn` ADD `gibbonSchoolYearTermID` INT(5) UNSIGNED ZEROFILL NULL AFTER `gibbonPlannerEntryID`;end
ALTER TABLE `gibbonMarkbookColumn` CHANGE `attainmentWeighting` `attainmentWeighting` DECIMAL(5,2) NULL DEFAULT NULL;end
ALTER TABLE `gibbonMarkbookEntry` ADD `attainmentValueRaw` VARCHAR(10) NULL AFTER `attainmentValue`;end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'Markbook', 'enableRawAttainment', 'Enable Raw Attainment Marks', 'Should recording of raw marks be enabled in the Markbook?', 'N');end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'Markbook', 'enableGroupByTerm', 'Group Columns by Term', 'Should columns and total scores be grouped by term?', 'N');end
CREATE TABLE `gibbonMarkbookWeight` ( `gibbonMarkbookWeightID` INT(10) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT , `gibbonCourseClassID` INT(8) UNSIGNED ZEROFILL NOT NULL , `type` VARCHAR(50) NOT NULL , `description` VARCHAR(50) NOT NULL, `reportable` ENUM('Y','N') NOT NULL DEFAULT 'Y' , `calculate` ENUM('term','year') NOT NULL DEFAULT 'year' , `weighting` DECIMAL(5,2) NOT NULL , PRIMARY KEY (`gibbonMarkbookWeightID`)) ENGINE=MyISAM DEFAULT CHARSET=utf8;end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `entrySidebar`, `menuShow`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Markbook'), 'Manage Weightings_everything', 1, 'Markbook', 'Manage markbook weightings for any class.', 'weighting_manage.php,weighting_manage_add.php,weighting_manage_edit.php,weighting_manage_delete.php', 'weighting_manage.php', 'Y', 'N', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Markbook' AND gibbonAction.name='Manage Weightings_everything'));end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `entrySidebar`, `menuShow`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Markbook'), 'Manage Weightings_singleClass', 2, 'Markbook', 'Manage markbook weightings for a single class at a time.', 'weighting_manage.php,weighting_manage_add.php,weighting_manage_edit.php,weighting_manage_delete.php', 'weighting_manage.php', 'Y', 'N', 'Y', 'Y', 'N', 'N', 'N', 'Y', 'N', 'N', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Markbook' AND gibbonAction.name='Manage Weightings_singleClass'));end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '2', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Markbook' AND gibbonAction.name='Manage Weightings_singleClass'));end
UPDATE gibbonAction SET categoryPermissionStaff='Y' WHERE (name='Enter Activity Attendance' OR name='Printable Attendance Sheet') AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Activities');end
UPDATE gibbonAction SET entrySidebar='N' WHERE name='Privacy Choices by Student' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Students');end
UPDATE gibboni18n SET maintainerName='Sint-Ignatiusschool, Brussels', maintainerWebsite='http://sint-ignatius.be' WHERE code='nl_NL';end
UPDATE gibbonPerson SET lastTimestamp=NULL WHERE lastTimestamp='0000-00-00 00:00:00';end
UPDATE gibbonPerson SET lastFailTimestamp=NULL WHERE lastFailTimestamp='0000-00-00 00:00:00';end
UPDATE gibbonPerson SET visaExpiryDate=NULL WHERE visaExpiryDate='0000-00-00';end
UPDATE gibbonPerson SET gibbonSchoolYearIDClassOf=NULL WHERE gibbonSchoolYearIDClassOf=0;end
UPDATE gibbonPerson SET gibbonApplicationFormID=NULL WHERE gibbonApplicationFormID=0;end
UPDATE gibbonPerson SET gibbonThemeIDPersonal=NULL WHERE gibbonThemeIDPersonal=0;end
UPDATE gibbonPerson SET gibboni18nIDPersonal=NULL WHERE gibboni18nIDPersonal=0;end
ALTER TABLE gibbonExternalAssessmentStudentEntry ADD INDEX `gibbonExternalAssessmentStudentID` (`gibbonExternalAssessmentStudentID`);end
ALTER TABLE gibbonExternalAssessmentStudentEntry ADD INDEX `gibbonExternalAssessmentFieldID` (`gibbonExternalAssessmentFieldID`);end
ALTER TABLE gibbonExternalAssessmentStudentEntry ADD INDEX `gibbonScaleGradeID` (`gibbonScaleGradeID`);end
ALTER TABLE gibbonExternalAssessmentStudentEntry ADD INDEX `gibbonScaleGradeIDPrimaryAssessmentScale` (`gibbonScaleGradeIDPrimaryAssessmentScale`);end
ALTER TABLE gibbonExternalAssessmentStudent ADD INDEX `gibbonExternalAssessmentID` (`gibbonExternalAssessmentID`);end
ALTER TABLE gibbonExternalAssessmentStudent ADD INDEX `gibbonPersonID` (`gibbonPersonID`);end
ALTER TABLE gibbonExternalAssessmentField ADD INDEX `gibbonExternalAssessmentID` (`gibbonExternalAssessmentID`);end
UPDATE gibbonAction SET category='Departments' WHERE name='View Departments' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Departments');end
UPDATE gibbonAction SET category='Resources' WHERE name LIKE 'Manage Resources_%' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Resources');end
UPDATE gibbonAction SET category='Resources' WHERE name='View Resources' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Resources');end
UPDATE gibbonPerson SET dob=NULL WHERE dob='0000-00-00';end
UPDATE gibbonAction SET category='Request Updates' WHERE name='Update Medical Form_family' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Data Updater');end
ALTER TABLE `gibbonModule` CHANGE `description` `description` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ;end
UPDATE gibbonCountry SET iddCountryCode='853' WHERE printable_name='Macao';end
UPDATE gibboni18n SET active='Y' WHERE code='nl_NL';end
";
//v13.0.00
++$count;
$sql[$count][0] = '13.0.00';
$sql[$count][1] = "
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'Markbook', 'enableEffort', 'Enable Effort', 'Should columns have the Effort section enabled?', 'Y');end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'Markbook', 'enableRubrics', 'Enable Rubrics', 'Should columns have Rubrics section enabled?', 'Y');end
ALTER TABLE `gibbonStaff` CHANGE `smartWorkflowHelp` `smartWorkflowHelp` ENUM('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'Y';end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `entrySidebar`, `menuShow`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='School Admin'), 'Manage Dashboard Settings', 0, 'Other', 'Manage settings that control Staff, Student and Parent dashboards.', 'dashboardSettings.php', 'dashboardSettings.php', 'Y', 'Y', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='School Admin' AND gibbonAction.name='Manage Dashboard Settings'));end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'School Admin', 'staffDashboardDefaultTab', 'Staff Dashboard Default Tab', 'The default landing tab for the staff dashboard.', '');end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'School Admin', 'studentDashboardDefaultTab', 'Student Dashboard Default Tab', 'The default landing tab for the student dashboard.', '');end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'School Admin', 'parentDashboardDefaultTab', 'Parent Dashboard Default Tab', 'The default landing tab for the parent dashboard.', '');end
UPDATE gibbonSetting SET name='defaultAssessmentScale', nameDisplay='Default Assessment Scale', description='This is the scale used as a default where assessment scales need to be selected.' WHERE name='primaryAssessmentScale' AND scope='System';end
ALTER TABLE `gibbonExternalAssessmentStudentEntry` DROP `gibbonScaleGradeIDPrimaryAssessmentScale`;end
INSERT INTO `gibboni18n` (`code`, `name`, `active`, `systemDefault`, `maintainerName`, `maintainerWebsite`, `dateFormat`, `dateFormatRegEx`, `dateFormatPHP`,`rtl`) VALUES ('bg_BG', 'български език', 'N', 'N', 'Dimitar Hubenov', '', 'dd-mm-yyyy', '/^(0[1-9]|[12][0-9]|3[01])[-](0[1-9]|1[012])[-](19|20)\\\d\\\d$/i', 'd-m-Y', 'N');end
INSERT INTO `gibboni18n` (`code`, `name`, `active`, `systemDefault`, `maintainerName`, `maintainerWebsite`, `dateFormat`, `dateFormatRegEx`, `dateFormatPHP`,`rtl`) VALUES ('ko_KP', '한국어 - 대한민국', 'N', 'N', '조대훈', '', 'dd-mm-yyyy', '/^(0[1-9]|[12][0-9]|3[01])[-](0[1-9]|1[012])[-](19|20)\\\d\\\d$/i', 'd-m-Y', 'N');end
UPDATE gibbonAction SET URLList='student_view.php,student_view_details.php,student_view_details_notes_add.php,student_view_details_notes_edit.php' WHERE name='View Student Profile_full' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Students');end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'System', 'enableMailerSMTP', 'Enable SMTP Mail', 'Adds PHPMailer settings for servers with an SMTP connection.', 'N');end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'System', 'mailerSMTPHost', 'SMTP Host', 'Set the hostname of the mail server.', '');end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'System', 'mailerSMTPPort', 'SMTP Port', 'Set the SMTP port number - likely to be 25, 465 or 587.', '25');end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'System', 'mailerSMTPUsername', 'SMTP Username', 'Username to use for SMTP authentication. Leave blank for no authentication.', '');end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'System', 'mailerSMTPPassword', 'SMTP Password', 'Password to use for SMTP authentication. Leave blank for no authentication.', '');end
ALTER TABLE `gibbonUnit` ADD `tags` TEXT NOT NULL AFTER `description`;end
UPDATE gibbonAction SET URLList = 'markbook_edit.php, markbook_edit_add.php, markbook_edit_edit.php, markbook_edit_delete.php,markbook_edit_data.php,markbook_edit_targets.php,markbook_edit_copy.php' WHERE (name='Edit Markbook_singleClass' OR name='Edit Markbook_multipleClassesInDepartment' OR name='Edit Markbook_multipleClassesAcrossSchool' OR name='Edit Markbook_everything') AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Markbook');end
UPDATE gibbonAction SET precedence=0 WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Markbook') AND name='Manage Weightings_singleClass';end
UPDATE gibbonAction SET URLList = 'markbook_edit.php, markbook_edit_add.php, markbook_edit_edit.php, markbook_edit_delete.php,markbook_edit_data.php,markbook_edit_targets.php,markbook_edit_copy.php,markbook_edit_addMulti.php' WHERE (name='Edit Markbook_multipleClassesInDepartment' OR name='Edit Markbook_multipleClassesAcrossSchool') AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Markbook');end
INSERT INTO `gibbonModule` (`gibbonModuleID`, `name`, `description`, `entryURL`, `type`, `active`, `category`, `version`, `author`, `url`) VALUES ('0', 'Security', 'Security scripts for Gibbon', 'index.php', 'Core', 'N', 'Admin', '', 'Craig Rayner', 'http://www.craigrayner.com');end
SELECT gibbonModuleID FROM gibbonModule;end
INSERT INTO `gibbonModule` (`gibbonModuleID`, `name`, `description`, `entryURL`, `type`, `active`, `category`, `version`, `author`, `url`) VALUES ('0', 'Notifications', 'Notification Scripts for Gibbon', 'index.php', 'Core', 'N', 'Admin', '', 'Craig Rayner', 'http://www.craigrayner.com');end
UPDATE `gibbonSetting` SET `name` = 'browseBGColour', `nameDisplay` = 'Browse Library BG Colour' WHERE `gibbonSetting`.`name` = 'browseBGColor' AND `scope` = 'Library';end
UPDATE `gibbonSetting` SET `name` = 'messageBubbleBGColour', `nameDisplay` = 'Message Bubble Background Colour' WHERE `gibbonSetting`.`name` = 'messageBubbleBGColor' AND `scope` = 'Messenger';end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'Messenger', 'messageRepeatTime', 'Message Repeat Time', 'Time in seconds to repeat the message bubble notification.', '300');end
INSERT INTO `gibbonAction` (`gibbonActionID`, `gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `entrySidebar`, `menuShow`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES (NULL, '0003', 'System File Management', '0', 'Settings', 'System settings set by File', 'systemSettingsFileManage.php', 'systemSettingsFileManage.php', 'Y', 'Y', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'N');end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT `gibbonActionID` FROM `gibbonAction` JOIN `gibbonModule` ON (`gibbonAction`.`gibbonModuleID` = `gibbonModule`.`gibbonModuleID`) WHERE `gibbonModule`.`name` = 'System Admin' AND `gibbonAction`.`name` = 'System File Management'));end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`) VALUES (NULL , 'System', 'mailerFrom', 'From EMail', 'Email address to set as the from address.', '');end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`) VALUES (NULL , 'System', 'mailerFromName', 'From Name', 'The name of the person or organisation from which the email is sent.', '');end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`) VALUES (NULL , 'System', 'mailerSMTPSecure', 'Secure Transport Protocol', '', '');end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'System', 'defaultLanguage', 'Default Language', 'Sets the default system Language. This default can be over-ridden by individual users.', 'en_GB');end
CREATE TABLE IF NOT EXISTS `gibbonPasswordReset` (`gibbonPasswordResetID` int(11) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT, `gibbonPersonID` int(10) UNSIGNED ZEROFILL NOT NULL, `token` varchar(64) COLLATE utf8_unicode_ci NOT NULL, `requestTime` int(16) NOT NULL, PRIMARY KEY (`gibbonPasswordResetID`),UNIQUE KEY `personID` (`gibbonPersonID`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Store Password Reset Requests';end
ALTER TABLE `gibbonFileExtension` ADD `mimeType` TINYTEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL AFTER `name`;end
UPDATE `gibbonFileExtension` SET `mimeType` = 'application/msword' WHERE `extension` = 'doc';end
UPDATE `gibbonFileExtension` SET `mimeType` = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' WHERE `extension` = 'docx';end
UPDATE `gibbonFileExtension` SET `mimeType` = 'application/x-iwork-pages-sffpages' WHERE `extension` = 'pages';end
UPDATE `gibbonFileExtension` SET `mimeType` = 'application/vnd.oasis.opendocument.text' WHERE `extension` = 'odt';end
UPDATE `gibbonFileExtension` SET `mimeType` = 'text/plain' WHERE `extension` = 'txt';end
UPDATE `gibbonFileExtension` SET `mimeType` = 'application/rtf' WHERE `extension` = 'rtf';end
UPDATE `gibbonFileExtension` SET `mimeType` = 'application/excel' WHERE `extension` = 'xls';end
UPDATE `gibbonFileExtension` SET `mimeType` = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' WHERE `extension` = 'xlsx';end
UPDATE `gibbonFileExtension` SET `mimeType` = 'application/vnd.oasis.opendocument.spreadsheet' WHERE `extension` = 'ods';end
UPDATE `gibbonFileExtension` SET `mimeType` = 'application/x-iwork-numbers-sffnumbers' WHERE `extension` = 'numbers';end
UPDATE `gibbonFileExtension` SET `mimeType` = 'text/csv,text/plain,application/octet-stream' WHERE `extension` = 'csv';end
UPDATE `gibbonFileExtension` SET `mimeType` = 'application/mspowerpoint' WHERE `extension` = 'ppt';end
UPDATE `gibbonFileExtension` SET `mimeType` = 'application/vnd.openxmlformats-officedocument.presentationml.presentation' WHERE `extension` = 'pptx';end
UPDATE `gibbonFileExtension` SET `mimeType` = 'application/x-iwork-keynote-sffkey' WHERE `extension` = 'key';end
UPDATE `gibbonFileExtension` SET `mimeType` = 'audio/mpeg3' WHERE `extension` = 'mp3';end
UPDATE `gibbonFileExtension` SET `mimeType` = 'audio/mp4' WHERE `extension` = 'mp4';end
UPDATE `gibbonFileExtension` SET `mimeType` = 'audio/mp4' WHERE `extension` = 'm4a';end
UPDATE `gibbonFileExtension` SET `mimeType` = 'audio/x-ms-wma' WHERE `extension` = 'wma';end
UPDATE `gibbonFileExtension` SET `mimeType` = 'audio/ogg' WHERE `extension` = 'ogg';end
UPDATE `gibbonFileExtension` SET `mimeType` = 'image/png' WHERE `extension` = 'png';end
UPDATE `gibbonFileExtension` SET `mimeType` = 'image/jpeg' WHERE `extension` = 'jpg';end
UPDATE `gibbonFileExtension` SET `mimeType` = 'image/gif' WHERE `extension` = 'gif';end
UPDATE `gibbonFileExtension` SET `mimeType` = 'application/postscript' WHERE `extension` = 'ai';end
UPDATE `gibbonFileExtension` SET `mimeType` = 'image/vnd.adobe.photoshop' WHERE `extension` = 'psd';end
UPDATE `gibbonFileExtension` SET `mimeType` = 'image/svg+xml' WHERE `extension` = 'svg';end
UPDATE `gibbonFileExtension` SET `mimeType` = 'image/xcf' WHERE `extension` = 'xcf';end
UPDATE `gibbonFileExtension` SET `mimeType` = 'video/x-msvideo' WHERE `extension` = 'avi';end
UPDATE `gibbonFileExtension` SET `mimeType` = 'video/x-ms-wmv' WHERE `extension` = 'wmv';end
UPDATE `gibbonFileExtension` SET `mimeType` = 'video/mpeg' WHERE `extension` = 'mpg';end
UPDATE `gibbonFileExtension` SET `mimeType` = 'video/quicktime' WHERE `extension` = 'mov';end
UPDATE `gibbonFileExtension` SET `mimeType` = 'video/x-flv' WHERE `extension` = 'flv';end
UPDATE `gibbonFileExtension` SET `mimeType` = 'application/vnd.adobe.flash-movie' WHERE `extension` = 'fla';end
UPDATE `gibbonFileExtension` SET `mimeType` = 'application/x-shockwave-flash' WHERE `extension` = 'swf';end
UPDATE `gibbonFileExtension` SET `mimeType` = 'application/vnd.sketchup.skp' WHERE `extension` = 'skp';end
UPDATE `gibbonFileExtension` SET `mimeType` = 'application/pdf' WHERE `extension` = 'pdf';end
UPDATE `gibbonFileExtension` SET `mimeType` = 'image/jpeg' WHERE `extension` = 'jpeg';end
UPDATE `gibbonFileExtension` SET `mimeType` = 'video/mpeg' WHERE `extension` = 'mpeg';end
UPDATE `gibbonFileExtension` SET `mimeType` = 'video/x-m4v' WHERE `extension` = 'm4v';end
UPDATE `gibbonFileExtension` SET `mimeType` = 'application/zip,application/x-zip,application/octet-stream,application/x-zip-compressed' WHERE `extension` = 'zip';end
UPDATE `gibbonFileExtension` SET `mimeType` = 'text/html' WHERE `extension` = 'htm';end
UPDATE `gibbonFileExtension` SET `mimeType` = 'text/html' WHERE `extension` = 'html';end
UPDATE `gibbonFileExtension` SET `mimeType` = 'video/3gpp' WHERE `extension` = '3gp';end
UPDATE `gibbonFileExtension` SET `mimeType` = 'audio/x-aac' WHERE `extension` = 'aac';end
ALTER TABLE `gibbonUnit` ADD `map` ENUM('Y','N') NOT NULL DEFAULT 'Y' COMMENT 'Should this unit be included in curriculum maps and other summaries?' AFTER `tags`;end
ALTER TABLE `gibbonCourseClass` ADD `gibbonScaleIDTarget` INT(5) UNSIGNED ZEROFILL NULL DEFAULT NULL AFTER `reportable`;end
ALTER TABLE `gibbonRollGroup` ADD `gibbonPersonIDEA` INT(10) UNSIGNED ZEROFILL NULL DEFAULT NULL AFTER `gibbonPersonIDTutor3`, ADD `gibbonPersonIDEA2` INT(10) UNSIGNED ZEROFILL NULL DEFAULT NULL AFTER `gibbonPersonIDEA`, ADD `gibbonPersonIDEA3` INT(10) UNSIGNED ZEROFILL NULL DEFAULT NULL AFTER `gibbonPersonIDEA2`;end
SELECT `gibbonModuleID` FROM `gibbonModule` LIMIT 1;end
UPDATE gibbonSetting SET nameDisplay='Password - Alpha Requirement' WHERE name='passwordPolicyAlpha' AND scope='System';end
UPDATE gibbonSetting SET nameDisplay='Password - Numeric Requirement' WHERE name='passwordPolicyNumeric' AND scope='System';end
UPDATE gibbonSetting SET nameDisplay='Password - Non-Alphanumeric Requirement' WHERE name='passwordPolicyNonAlphaNumeric' AND scope='System';end
UPDATE gibbonSetting SET nameDisplay='Password - Minimum Length' WHERE name='passwordPolicyMinLength' AND scope='System';end
SELECT gibbonPersonID FROM gibbonPerson LIMIT 1;end
SELECT gibbonPersonID FROM gibbonPerson LIMIT 1;end
SELECT gibbonPersonID FROM gibbonPerson LIMIT 1;end
ALTER TABLE `gibbonSetting` ADD `type` ENUM('text','array','number','date') CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT 'text' AFTER `value`, ADD INDEX `type` (`type`);end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`, `type`) VALUES (NULL , 'System', 'mainMenuCategories', 'Main Menu Categories', 'A list of menu categories and the order in which they are displayed. Provide a comma separated list of categories in the order you wish them displayed.', '[]', 'array');end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='System Admin'), 'Main Menu Settings', 0, 'Settings', 'Allows administrators to configure the main menu Categories and the order they are displayed.', 'menu_manage.php', 'menu_manage.php', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='System Admin' AND gibbonAction.name='Main Menu Settings'));end
UPDATE `gibbonSetting` SET value='en_GB' WHERE `scope`='System' AND `name`='defaultLanguage';end
UPDATE `gibbonSetting` SET `type` = 'array' WHERE `gibbonSetting`.`name` = 'facilityTypes' AND `scope` = 'School Admin';end
ALTER TABLE `gibbonSchoolYearTerm` DROP INDEX `sequenceNumber`, ADD UNIQUE `sequenceNumber` (`sequenceNumber`, `gibbonSchoolYearID`);end
UPDATE `gibbonAction` SET `name` = 'Display Settings' WHERE `gibbonAction`.`name` = 'Main Menu Settings';end
UPDATE `gibbonAction` SET `name` = 'Display Settings' WHERE `gibbonAction`.`name` = 'Main Menu Settings';end
ALTER TABLE `gibbonSetting` CHANGE `type` `type` ENUM('text','array','number','date','yesno') CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT 'text';end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`, `type`) VALUES (NULL , 'System', 'pageAnchorDisplay', 'Display Page Anchors', 'Allows the school to turn off display of the Page Anchors in the menu.', 'Y', 'yesno');end
UPDATE gibbonModule SET category='Other' WHERE category='';end
ALTER TABLE `gibbonMessenger` CHANGE `subject` `subject` VARCHAR(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;end
SELECT gibbonLogID FROM gibbonLog LIMIT 1;end
SELECT gibbonLogID FROM gibbonLog LIMIT 1;end
SELECT gibbonLogID FROM gibbonLog LIMIT 1;end
DELETE FROM gibbonModule WHERE name='Security';end
DELETE FROM gibbonModule WHERE name='Notifications';end
UPDATE `gibbonSetting` SET `name` = 'browseBGColor', `nameDisplay` = 'Browse Library BG Color' WHERE `gibbonSetting`.`name` = 'browseBGColour' AND `scope` = 'Library';end
UPDATE `gibbonSetting` SET `name` = 'messageBubbleBGColor', `nameDisplay` = 'Message Bubble Background Color' WHERE `gibbonSetting`.`name` = 'messageBubbleBGColour' AND `scope` = 'Messenger';end
DELETE FROM `gibbonSetting` WHERE scope='Messenger' AND name='messageRepeatTime';end
DELETE FROM gibbonAction WHERE name='System File Management' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='System Admin');end
DELETE FROM `gibbonSetting` WHERE scope='System' AND name='mailerFrom';end
DELETE FROM `gibbonSetting` WHERE scope='System' AND name='mailerFromName';end
DELETE FROM `gibbonSetting` WHERE scope='System' AND name='mailerSMTPSecure';end
DELETE FROM `gibbonSetting` WHERE scope='System' AND name='defaultLanguage';end
DROP TABLE gibbonPasswordReset;end
ALTER TABLE `gibbonFileExtension` DROP `mimeType`;end
SELECT gibbonPersonID FROM gibbonPerson LIMIT 1;end
SELECT gibbonPersonID FROM gibbonPerson LIMIT 1;end
ALTER TABLE `gibbonSetting` DROP `type`;end
DELETE FROM `gibbonSetting` WHERE scope='System' AND name='pageAnchorDisplay';end
SELECT gibbonLogID FROM gibbonLog LIMIT 1;end
SELECT gibbonLogID FROM gibbonLog LIMIT 1;end
SELECT gibbonLogID FROM gibbonLog LIMIT 1;end
SELECT gibbonLogID FROM gibbonLog LIMIT 1;end
SELECT gibbonLogID FROM gibbonLog LIMIT 1;end
SELECT gibbonLogID FROM gibbonLog LIMIT 1;end
SELECT gibbonLogID FROM gibbonLog LIMIT 1;end
SELECT gibbonLogID FROM gibbonLog LIMIT 1;end
SELECT gibbonLogID FROM gibbonLog LIMIT 1;end
SELECT gibbonLogID FROM `gibbonLog` LIMIT 1;end
INSERT INTO `gibboni18n` (`code`, `name`, `active`, `systemDefault`, `maintainerName`, `maintainerWebsite`, `dateFormat`, `dateFormatRegEx`, `dateFormatPHP`,`rtl`) VALUES ('fi_FI', 'Suomen Kieli - Suomi', 'N', 'N', 'Pia Kontiainen', '', 'dd-mm-yyyy', '/^(0[1-9]|[12][0-9]|3[01])[-](0[1-9]|1[012])[-](19|20)\\\d\\\d$/i', 'd-m-Y', 'N');end
UPDATE `gibbonAction` SET `description` = 'Allows administrators to configure the system display settings.', `URLList` = 'displaySettings.php', `entryURL` = 'displaySettings.php' WHERE `name`='Display Settings' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='System Admin');end
UPDATE `gibbonSetting` SET `value` = 'Admin,Assess,Learn,People,Other', name='mainMenuCategoryOrder',`nameDisplay` = 'Main Menu Category Order', description='A comma separated list of module categories in display order.' WHERE `gibbonSetting`.`name` = 'mainMenuCategories' AND `scope` = 'System';end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `entrySidebar`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Planner'), 'Scope & Sequence', 0, 'Curriculum Mapping', 'Allows users to generate scope and sequence documentation for individual courses, based on the Unit Planner.', 'scopeAndSequence.php', 'scopeAndSequence.php', 'N', 'Y', 'Y', 'N', 'N', 'N', 'Y', 'N', 'N', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Planner' AND gibbonAction.name='Scope & Sequence'));end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '2', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Planner' AND gibbonAction.name='Scope & Sequence'));end
UPDATE gibbonAction SET category='Outcomes' WHERE name LIKE '%outcome%' AND category='Curriculum Mapping' AND (SELECT gibbonModuleID FROM gibbonModule WHERE name='Planner');end
UPDATE gibbonAction SET category='Curriculum Overview' WHERE category='Curriculum Mapping' AND (SELECT gibbonModuleID FROM gibbonModule WHERE name='Planner');end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `entrySidebar`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Planner'), 'Concept Explorer', 0, 'Curriculum Overview', 'Allows users to browse and explore concepts and keywords, based on the Unit Planner.', 'conceptExplorer.php', 'conceptExplorer.php', 'N', 'Y', 'Y', 'N', 'N', 'N', 'Y', 'N', 'N', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Planner' AND gibbonAction.name='Concept Explorer'));end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '2', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Planner' AND gibbonAction.name='Concept Explorer'));end
ALTER TABLE `gibbonLibraryType` ADD FULLTEXT(`fields`);end
ALTER TABLE `gibbonLibraryItem` ADD FULLTEXT(`fields`);end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Attendance'), 'Attendance By Class', 0, 'Take Attendance', 'Take attendance, one class at a time', 'attendance_take_byCourseClass.php', 'attendance_take_byCourseClass.php', 'Y', 'Y', 'N', 'N', 'N', 'Y', 'N', 'N', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Attendance' AND gibbonAction.name='Attendance By Class'));end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '2', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Attendance' AND gibbonAction.name='Attendance By Class'));end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Attendance'), 'View Daily Attendance', 0, 'Take Attendance', 'View attendance, by roll group and class', 'attendance.php', 'attendance.php', 'Y', 'Y', 'N', 'N', 'N', 'Y', 'N', 'N', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Attendance' AND gibbonAction.name='View Daily Attendance'));end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '2', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Attendance' AND gibbonAction.name='View Daily Attendance'));end
UPDATE gibbonModule SET entryURL='attendance.php' WHERE name='Attendance';end
ALTER TABLE `gibbonAttendanceLogPerson` ADD `gibbonCourseClassID` int(8) unsigned zerofill NOT NULL AFTER `gibbonPersonIDTaker`;end
CREATE TABLE `gibbonAttendanceLogCourseClass` (`gibbonAttendanceLogCourseClassID` int(14) unsigned zerofill NOT NULL AUTO_INCREMENT,`gibbonCourseClassID` int(8) unsigned zerofill NOT NULL,`gibbonPersonIDTaker` int(10) unsigned zerofill NOT NULL,`date` date DEFAULT NULL,`timestampTaken` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`gibbonAttendanceLogCourseClassID`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;end
ALTER TABLE `gibbonAttendanceLogPerson` CHANGE `type` `type` VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '';end
ALTER TABLE `gibbonAttendanceLogPerson` CHANGE `reason` `reason` VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '';end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='School Admin'), 'Manage Attendance Settings', 0, 'People', 'Allows administrators to configure the attendance module.', 'attendanceSettings.php,attendanceSettings_manage_add.php,attendanceSettings_manage_edit.php,attendanceSettings_manage_delete.php', 'attendanceSettings.php', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='School Admin' AND gibbonAction.name='Manage Attendance Settings'));end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'Attendance', 'attendanceEnableByClass', 'Enable Attendance by Class', 'Should individual classes track student attendance?', 'N');end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'Attendance', 'attendanceReasons', 'Attendance Reasons', 'Comma-separated list of reasons which are available when taking attendance.', 'Pending,Education,Family,Medical,Other');end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'Attendance', 'attendanceMedicalReasons', 'Medical Reasons', 'Comma-separated list of allowable medical reasons.', 'Medical');end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'Attendance', 'attendanceEnableMedicalTracking', 'Enable Symptom Tracking', 'Attach a symptom report to attendance logs with a medical reason.', 'N');end
INSERT INTO `gibbonSetting` (`gibbonSystemSettingsID` ,`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES (NULL , 'Students', 'medicalIllnessSymptoms', 'Predefined Illness Symptoms', 'Comma-separated list of illness symptoms.', 'Fever,Cough,Cold,Vomiting,Diarrhea');end
CREATE TABLE `gibbonPersonMedicalSymptoms` ( `gibbonPersonMedicalSymptomsID` INT(14) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT , `gibbonPersonID` INT(10) NOT NULL , `symptoms` TEXT NOT NULL , `date` DATE NOT NULL , `timestampTaken` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `gibbonPersonIDTaker` INT NOT NULL, PRIMARY KEY (`gibbonPersonMedicalSymptomsID`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;end
ALTER TABLE `gibbonCourseClass` ADD `attendance` ENUM('Y','N') NOT NULL DEFAULT 'Y' AFTER `reportable`;end
CREATE TABLE `gibbonAttendanceCode` ( `gibbonAttendanceCodeID` INT(3) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT , `name` VARCHAR(30) NOT NULL , `nameShort` VARCHAR(4) NOT NULL , `type` ENUM('Core','Additional') NOT NULL , `direction` ENUM('In','Out') NOT NULL , `scope` ENUM('Onsite','Onsite - Late','Offsite','Offsite - Left') NOT NULL , `active` ENUM('Y','N') NOT NULL , `reportable` ENUM('Y','N') NOT NULL , `future` ENUM('Y','N') NOT NULL , `gibbonRoleIDAll` VARCHAR(90) NOT NULL , `sequenceNumber` INT(3) NOT NULL, PRIMARY KEY (`gibbonAttendanceCodeID`)) ENGINE = MyISAM DEFAULT CHARSET=utf8;end
INSERT INTO `gibbonAttendanceCode` (`gibbonAttendanceCodeID`, `name`, `nameShort`, `type`, `direction`, `scope`, `active`, `reportable`, `future`, `gibbonRoleIDAll`, `sequenceNumber`) VALUES (NULL, 'Present', 'P', 'Core', 'In', 'Onsite', 'Y', 'Y', 'N', '001,002,006', '1');end
INSERT INTO `gibbonAttendanceCode` (`gibbonAttendanceCodeID`, `name`, `nameShort`, `type`, `direction`, `scope`, `active`, `reportable`, `future`, `gibbonRoleIDAll`, `sequenceNumber`) VALUES (NULL, 'Present - Late', 'PL', 'Core', 'In', 'Onsite - Late', 'Y', 'Y', 'N', '001,002,006', '2');end
INSERT INTO `gibbonAttendanceCode` (`gibbonAttendanceCodeID`, `name`, `nameShort`, `type`, `direction`, `scope`, `active`, `reportable`, `future`, `gibbonRoleIDAll`, `sequenceNumber`) VALUES (NULL, 'Present - Offsite', 'PS', 'Core', 'In', 'Offsite', 'Y', 'Y', 'Y', '001,002,006', '3');end
INSERT INTO `gibbonAttendanceCode` (`gibbonAttendanceCodeID`, `name`, `nameShort`, `type`, `direction`, `scope`, `active`, `reportable`, `future`, `gibbonRoleIDAll`, `sequenceNumber`) VALUES (NULL, 'Absent', 'A', 'Core', 'Out', 'Offsite', 'Y', 'Y', 'Y', '001,002,006', '4');end
INSERT INTO `gibbonAttendanceCode` (`gibbonAttendanceCodeID`, `name`, `nameShort`, `type`, `direction`, `scope`, `active`, `reportable`, `future`, `gibbonRoleIDAll`, `sequenceNumber`) VALUES (NULL, 'Left', 'L', 'Core', 'Out', 'Offsite - Left', 'Y', 'Y', 'N', '001,002,006', '5');end
INSERT INTO `gibbonAttendanceCode` (`gibbonAttendanceCodeID`, `name`, `nameShort`, `type`, `direction`, `scope`, `active`, `reportable`, `future`, `gibbonRoleIDAll`, `sequenceNumber`) VALUES (NULL, 'Left - Early', 'LE', 'Core', 'Out', 'Offsite - Left', 'Y', 'Y', 'N', '001,002,006', '6');end
ALTER TABLE `gibbonRollGroup` ADD `attendance` ENUM('Y','N') NOT NULL DEFAULT 'Y' AFTER `gibbonRollGroupIDNext`;end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `entrySidebar`, `menuShow`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Attendance'), 'Classes Not Registered', '0', 'Reports', 'Print a report of classes who have not been registered on a given day', 'report_courseClassesNotRegistered_byDate.php,report_courseClassesNotRegistered_byDate_print.php', 'report_courseClassesNotRegistered_byDate.php', 'Y', 'Y', 'Y', 'Y', 'N', 'N', 'Y', 'Y', 'N', 'N', 'Y');end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Attendance' AND gibbonAction.name='Classes Not Registered'));end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '2', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Attendance' AND gibbonAction.name='Classes Not Registered'));end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '6', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Attendance' AND gibbonAction.name='Classes Not Registered'));end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `entrySidebar`, `menuShow`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Attendance'), 'Manage Attendance Logs', '0', 'Take Attendance', 'Edit student attendance logs.', 'attendance_take_byPerson_edit.php', 'attendance_take_byPerson_edit.php', 'Y', 'N', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'N');end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Attendance' AND gibbonAction.name='Manage Attendance Logs'));end
UPDATE `gibbonAction` SET defaultPermissionStudent='N', defaultPermissionParent='N', categoryPermissionStudent='N', categoryPermissionParent='N' WHERE gibbonModuleID = (SELECT gibbonModuleID FROM gibbonModule WHERE name='Attendance') AND (name='Students Not Onsite' OR name='Attendance By Roll Group' OR name='Attendance By Person' OR name='Set Future Absence' OR name='Students Not Present' OR name='Roll Groups Not Registered' OR name='Student History_all' OR name='Attendance By Class' OR name='View Daily Attendance' OR name='Classes Not Registered' OR name='Manage Attendance Logs');end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `entrySidebar`, `menuShow`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Attendance'), 'Attendance Summary by Date', '0', 'Reports', 'Print a report of student attendace in a given date range', 'report_summary_byDate.php,report_summary_byDate_print.php', 'report_summary_byDate.php', 'Y', 'Y', 'Y', 'Y', 'N', 'N', 'N', 'Y', 'N', 'N', 'Y');end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Attendance' AND gibbonAction.name='Attendance Summary by Date'));end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '2', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Attendance' AND gibbonAction.name='Attendance Summary by Date'));end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `entrySidebar`, `menuShow`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Attendance'), 'Attendance Trends', '0', 'Reports', 'Display a graph of student attendance types over time', 'report_graph_byType.php', 'report_graph_byType.php', 'Y', 'Y', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'Y');end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Attendance' AND gibbonAction.name='Attendance Trends'));end
ALTER TABLE `gibbonAttendanceLogPerson` ADD `gibbonAttendanceCodeID` INT(3) UNSIGNED ZEROFILL NOT NULL AFTER `gibbonAttendanceLogPersonID`;end
UPDATE gibbonResource SET tags = REPLACE (tags, '''', '');end
UPDATE gibbonResourceTag SET tag = REPLACE (tag, '''', '');end
ALTER TABLE `gibbonAttendanceCode` ADD UNIQUE(`name`), ADD UNIQUE(`nameShort`);end
DELETE FROM `gibbonSetting` WHERE `scope`='Attendance' AND `name`='attendanceEnableByClass';end
ALTER TABLE `gibbonSpace` DROP `gibbonPersonID1`, DROP `gibbonPersonID2`;end
CREATE TABLE `gibbonSpacePerson` (`gibbonSpacePersonID` int(12) unsigned zerofill NOT NULL AUTO_INCREMENT, `gibbonSpaceID` int(10) unsigned zerofill NOT NULL, `gibbonPersonID` int(10) unsigned zerofill NOT NULL, `usageType` enum('','Teaching','Office','Other') COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`gibbonSpacePersonID`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;end
UPDATE gibbonAction SET URLList='staff_manage.php, staff_manage_add.php, staff_manage_edit.php, staff_manage_delete.php, staff_manage_edit_contract_add.php, staff_manage_edit_contract_edit.php, staff_manage_edit_facility_add.php, staff_manage_edit_facility_delete.php' WHERE name='Manage Staff_confidential' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Staff');end
UPDATE gibbonAction SET URLList='staff_manage.php, staff_manage_add.php, staff_manage_edit.php, staff_manage_delete.php, staff_manage_edit_facility_add.php, staff_manage_edit_facility_delete.php' WHERE name='Manage Staff_general' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Staff');end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `entrySidebar`, `menuShow`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Messenger'), 'New Message_cannedResponse', '0', 'Manage Messages', 'Allows user to use pre-defined Canned Responses.', 'messenger_post.php', 'messenger_post.php', 'Y', 'Y', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'N');end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Messenger' AND gibbonAction.name='New Message_cannedResponse'));end
ALTER TABLE `gibbonSetting` CHANGE `gibbonSystemSettingsID` `gibbonSettingID` INT(5) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT;end
INSERT INTO `gibbonSetting` (`scope`, `name`, `nameDisplay`, `description`, `value`) VALUES ('Staff Application Form', 'staffApplicationFormPublicApplications', 'Public Applications?', 'If yes, members of the public can submit staff applications', 'Y');end
UPDATE gibbonAction SET name='Manage IN Settings', entryURL='inSettings.php', URLList='inSettings.php, inSettings_add.php, inSettings_edit.php, inSettings_delete.php' WHERE name='Manage IN Descriptors' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='School Admin');end
INSERT INTO `gibbonSetting` (`scope`, `name`, `nameDisplay`, `description`, `value`) VALUES ('Individual Needs', 'targetsTemplate', 'Targets Template', 'An HTML template to be used in the targets field.', '');end
INSERT INTO `gibbonSetting` (`scope`, `name`, `nameDisplay`, `description`, `value`) VALUES ('Individual Needs', 'teachingStrategiesTemplate', 'Teaching Strategies Template', 'An HTML template to be used in the teaching strategies field.', '');end
INSERT INTO `gibbonSetting` (`scope`, `name`, `nameDisplay`, `description`, `value`) VALUES ('Individual Needs', 'notesReviewTemplate', 'Notes & Review Template', 'An HTML template to be used in the notes and review field.', '');end
INSERT INTO `gibbonSetting` (`scope`, `name`, `nameDisplay`, `description`, `value`) VALUES ('Attendance', 'attendanceCLINotifyByRollGroup', 'Enable Notifications by Roll Group', '', 'Y');end
INSERT INTO `gibbonSetting` (`scope`, `name`, `nameDisplay`, `description`, `value`) VALUES ('Attendance', 'attendanceCLINotifyByClass', 'Enable Notifications by Class', '', 'Y');end
INSERT INTO `gibbonSetting` (`scope`, `name`, `nameDisplay`, `description`, `value`) VALUES ('Attendance', 'attendanceCLIAdditionalUsers', 'Additional Users to Notify', 'Send the school-wide daily attendance report to additional users. Restricted to roles with permission to access Roll Groups Not Registered or Classes Not Registered.', '');end
ALTER TABLE `gibbonMessenger` ADD `emailReceipt` ENUM('N','Y') NULL DEFAULT NULL AFTER `emailReport`, ADD `emailReceiptText` TEXT NULL DEFAULT NULL AFTER `emailReceipt`;end
CREATE TABLE `gibbonMessengerReceipt` (`gibbonMessengerReceiptID` int(14) unsigned zerofill NOT NULL AUTO_INCREMENT, `gibbonMessengerID` int(12) unsigned zerofill NOT NULL, `gibbonPersonID` int(10) unsigned zerofill DEFAULT NULL, `targetType` enum('Class','Course','Roll Group','Year Group','Activity','Role','Applicants','Individuals','Houses','Role Category','Transport','Attendance') COLLATE utf8_unicode_ci NOT NULL, `targetID` varchar(30) COLLATE utf8_unicode_ci NOT NULL, `contactType` enum('Email','SMS') COLLATE utf8_unicode_ci DEFAULT NULL, `contactDetail` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `key` varchar(40) COLLATE utf8_unicode_ci DEFAULT NULL, `confirmed` enum('N','Y') COLLATE utf8_unicode_ci DEFAULT NULL, `confirmedTimestamp` int(11) DEFAULT NULL, PRIMARY KEY (`gibbonMessengerReceiptID`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `entrySidebar`, `menuShow`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Messenger'), 'New Message_readReceipts', '0', 'Manage Messages', 'Allows users to include read receipts in emails.', 'messenger_post.php', 'messenger_post.php', 'Y', 'Y', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'N');end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Messenger' AND gibbonAction.name='New Message_readReceipts'));end
UPDATE gibbonAction SET URLList='messenger_manage.php,messenger_manage_delete.php,messenger_manage_edit.php,messenger_manage_report.php' WHERE name='Manage Messages_all' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Messenger');end
UPDATE gibbonAction SET URLList='messenger_manage.php,messenger_manage_delete.php,messenger_manage_edit.php,messenger_manage_report.php' WHERE name='Manage Messages_my' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Messenger');end
UPDATE gibbonAction SET gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Data Updater'), category='Manage Updates', URLList='data_family_manage.php,data_family_manage_edit.php,data_family_manage_delete.php', entryURL='data_family_manage.php' WHERE name='Family Data Updates' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='User Admin');end
UPDATE gibbonAction SET gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Data Updater'), category='Manage Updates', URLList='data_finance_manage.php,data_finance_manage_edit.php,data_finance_manage_delete.php', entryURL='data_finance_manage.php' WHERE name='Finance Data Updates' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='User Admin');end
UPDATE gibbonAction SET gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Data Updater'), category='Manage Updates', URLList='data_medical_manage.php, data_medical_manage_edit.php, data_medical_manage_delete.php', entryURL='data_medical_manage.php' WHERE name='Medical Form Updates' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='User Admin');end
UPDATE gibbonAction SET gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Data Updater'), category='Manage Updates', URLList='data_personal_manage.php, data_personal_manage_edit.php, data_personal_manage_delete.php', entryURL='data_personal_manage.php' WHERE name='Personal Data Updates' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='User Admin');end
UPDATE gibbonAction SET gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Data Updater'), category='Reports' WHERE name='Student Data Updater History' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Students');end
ALTER TABLE `gibbonMessengerReceipt` CHANGE `confirmedTimestamp` `confirmedTimestamp` TIMESTAMP NULL DEFAULT NULL;end
ALTER TABLE `gibbonFamilyAdult` ADD INDEX `gibbonFamilyID` (`gibbonFamilyID`, `contactPriority`);end
INSERT INTO `gibbonSetting` (`scope`, `name`, `nameDisplay`, `description`, `value`) VALUES ('Students', 'noteCreationNotification', 'Note Creation Notification', 'Determines who to notify when a new student note is created.', 'Tutors');end
CREATE TABLE `gibbonPersonReset` (`gibbonPersonResetID` int(12) unsigned zerofill NOT NULL AUTO_INCREMENT, `gibbonPersonID` int(10) unsigned zerofill NOT NULL, `key` varchar(40) COLLATE utf8_unicode_ci NOT NULL, `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`gibbonPersonResetID`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;end
INSERT INTO `gibbonSetting` (`scope`, `name`, `nameDisplay`, `description`, `value`) VALUES ('Finance', 'invoiceeNameStyle', 'Invoicee Name Style', 'Determines how invoicee name appears on invoices and receipts.', 'Surname, Preferred Name');end
ALTER TABLE `gibbonPerson` ADD `birthCertificateScan` VARCHAR(255) NOT NULL AFTER `countryOfBirth`;end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `entrySidebar`, `menuShow`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Students'), 'First Aid Record', '0', 'Medical', 'Allows user to record first aid visits and actions.', 'firstAidRecord.php, firstAidRecord_add.php, firstAidRecord_edit.php', 'firstAidRecord.php', 'Y', 'Y', 'Y', 'N', 'N', 'N', 'N', 'Y', 'Y', 'Y', 'Y');end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Students' AND gibbonAction.name='First Aid Record'));end
CREATE TABLE `gibbonFirstAid` ( `gibbonFirstAidID` int(10) unsigned zerofill NOT NULL AUTO_INCREMENT, `gibbonPersonIDPatient` int(10) unsigned zerofill NOT NULL,`gibbonCourseClassID` int(14) unsigned zerofill NOT NULL, `gibbonPersonIDFirstAider` int(10) unsigned zerofill NOT NULL, `gibbonSchoolYearID` int(3) unsigned zerofill NOT NULL, `actionTaken` text NOT NULL, `followUp` text NOT NULL, `date` date NOT NULL, `timeIn` time NOT NULL, `timeOut` time DEFAULT NULL, `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`gibbonFirstAidID`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;end
INSERT INTO `gibboni18n` (`code`, `name`, `active`, `systemDefault`, `maintainerName`, `maintainerWebsite`, `dateFormat`, `dateFormatRegEx`, `dateFormatPHP`,`rtl`) VALUES ('de_DE', 'Deutsch - Deutschland', 'N', 'N', 'Stefan Goßrau', '', 'dd-mm-yyyy', '/^(0[1-9]|[12][0-9]|3[01])[-](0[1-9]|1[012])[-](19|20)\\\d\\\d$/i', 'd-m-Y', 'N');end
ALTER TABLE `gibbonFirstAid` CHANGE `gibbonCourseClassID` `gibbonCourseClassID` INT(14) UNSIGNED ZEROFILL NULL DEFAULT NULL;end
UPDATE gibbonSetting SET value=(SELECT email FROM gibbonPerson WHERE gibbonPersonID=1) WHERE scope='System' AND name='organisationEmail' AND value='';end
ALTER TABLE `gibbonCourse` ADD `map` ENUM('Y','N') NOT NULL DEFAULT 'Y' COMMENT 'Should this course be included in curriculum maps and other summaries?' AFTER `description`;end
INSERT INTO `gibbonLanguage` (`gibbonLanguageID`, `name`) VALUES (NULL, 'Odia');end
INSERT INTO `gibboni18n` (`code`, `name`, `active`, `systemDefault`, `maintainerName`, `maintainerWebsite`, `dateFormat`, `dateFormatRegEx`, `dateFormatPHP`,`rtl`) VALUES ('in_OR', 'ଓଡ଼ିଆ - इंडिया', 'N', 'N', 'Saumya Kanta Swain', 'http://www.skswain.in', 'dd-mm-yyyy', '/^(0[1-9]|[12][0-9]|3[01])[-](0[1-9]|1[012])[-](19|20)\\\d\\\d$/i', 'd-m-Y', 'N');end
ALTER TABLE `gibbonFinanceInvoice` ADD `gibbonFinanceFeeCategoryIDList` TEXT NULL DEFAULT NULL AFTER `status`;end
ALTER TABLE `gibbonFirstAid` ADD `description` TEXT NOT NULL AFTER `gibbonSchoolYearID`;end
DELETE FROM gibbonAction WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Activities') AND name='Copy Activities';end
UPDATE gibbonAction SET category='Administration' WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Activities') AND (name='Manage Activities' OR name='Generate Invoices');end
UPDATE gibbonAction SET category='Activities' WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Activities') AND (name='My Activities' OR name LIKE'View Activities_%');end
UPDATE gibbonAction SET precedence=0 WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Students') AND (name='View Student Profile_myChildren');end
UPDATE gibbonAction SET precedence=3 WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Students') AND (name='View Student Profile_full');end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `entrySidebar`, `menuShow`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Students'), 'View Student Profile_fullNoNotes', '2', 'Profiles', 'View full profile of any student in the school, without access to Notes.', 'student_view.php,student_view_details.php', 'student_view.php', 'Y', 'Y', 'N', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'N');end
ALTER TABLE `gibbonApplicationForm` ADD `gibbonApplicationFormHash` VARCHAR(40) NULL AFTER `gibbonApplicationFormID`;end
CREATE TABLE `gibbonApplicationFormLink` ( `gibbonApplicationFormLinkID` INT(12) UNSIGNED NOT NULL AUTO_INCREMENT , `gibbonApplicationFormID1` INT(12) UNSIGNED ZEROFILL NOT NULL , `gibbonApplicationFormID2` INT(12) UNSIGNED ZEROFILL NOT NULL , `timestamp` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`gibbonApplicationFormLinkID`), UNIQUE `link` (`gibbonApplicationFormID1`, `gibbonApplicationFormID2`)) ENGINE=MyISAM DEFAULT CHARSET=utf8;end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='System Admin'), 'System Check', 0, 'Extend & Update', 'Check system versions and extensions installed.', 'systemCheck.php', 'systemCheck.php', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='System Admin' AND gibbonAction.name='System Check'));end
INSERT INTO `gibbonSetting` (`scope`, `name`, `nameDisplay`, `description`, `value`) VALUES ('Planner', 'shareUnitOverviews', 'Share Unit Overviews', 'Allow users who do not have access to the unit planner to see Unit Overviews via the lesson planner?', 'N');end
UPDATE gibbonSetting SET name='shareUnitOutline', nameDisplay='Share Unit Outline', `description`='Allow users who do not have access to the unit planner to see Unit Outlines via the lesson planner?' WHERE scope='Planner' AND name='shareUnitOverviews';end
INSERT INTO `gibboni18n` (`code`, `name`, `active`, `systemDefault`, `maintainerName`, `maintainerWebsite`, `dateFormat`, `dateFormatRegEx`, `dateFormatPHP`,`rtl`) VALUES ('no_NO', 'Norsk - Norge', 'N', 'N', 'Susanne Bergsmark', '', 'dd-mm-yyyy', '/^(0[1-9]|[12][0-9]|3[01])[-](0[1-9]|1[012])[-](19|20)\\\d\\\d$/i', 'd-m-Y', 'N');end
DELETE FROM gibbonPermission WHERE gibbonActionID=(SELECT gibbonActionID FROM gibbonAction WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Activities') AND name='Generate Invoices') AND gibbonRoleID=2;end
DELETE FROM gibbonPermission WHERE gibbonActionID=(SELECT gibbonActionID FROM gibbonAction WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Planner') AND name='Import Outcomes') AND gibbonRoleID=2;end
UPDATE gibbonAction SET entrySidebar='N' WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Students') AND (name='Students by Roll Group');end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '6', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Messenger' AND gibbonAction.name='View Message Wall'));end
INSERT INTO `gibboni18n` (`code`, `name`, `active`, `systemDefault`, `maintainerName`, `maintainerWebsite`, `dateFormat`, `dateFormatRegEx`, `dateFormatPHP`,`rtl`) VALUES ('vi_VN', 'Tiếng Việt - Việt Nam', 'N', 'N', 'Daniel Owens', '', 'dd-mm-yyyy', '/^(0[1-9]|[12][0-9]|3[01])[-](0[1-9]|1[012])[-](19|20)\\\d\\\d$/i', 'd-m-Y', 'N');end
";
//v13.0.01
++$count;
$sql[$count][0] = '13.0.01';
$sql[$count][1] = "";
//v13.0.02
++$count;
$sql[$count][0] = '13.0.02';
$sql[$count][1] = "";
//v14.0.00
++$count;
$sql[$count][0] = '14.0.00';
$sql[$count][1] = "
INSERT INTO `gibbonSetting` (`scope`, `name`, `nameDisplay`, `description`, `value`) VALUES ('Attendance', 'studentSelfRegistrationIPAddresses', 'Student Self Registration IP Addresses', 'Comma-separated list of IP addresses within which students can self register.', '');end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Attendance'), 'Student Self Registration', 0, 'Take Attendance', 'Allows students to self register as Present, provided they are within a certain range of IP addresses.', 'attendance_studentSelfRegister.php', 'attendance_studentSelfRegister.php', 'N', 'N', 'N', 'N', 'N', 'N', 'Y', 'N', 'N');end
ALTER TABLE `gibbonAttendanceLogPerson` CHANGE `gibbonCourseClassID` `gibbonCourseClassID` INT(8) UNSIGNED ZEROFILL NULL DEFAULT NULL;end
INSERT INTO `gibboni18n` (`code`, `name`, `active`, `systemDefault`, `maintainerName`, `maintainerWebsite`, `dateFormat`, `dateFormatRegEx`, `dateFormatPHP`,`rtl`) VALUES ('sq_AL', 'Shqip - Shqipëri', 'N', 'N', 'Jorida Shahinas', '', 'dd-mm-yyyy', '/^(0[1-9]|[12][0-9]|3[01])[-](0[1-9]|1[012])[-](19|20)\\\d\\\d$/i', 'd-m-Y', 'N');end
INSERT INTO `gibbonSetting` (`scope`, `name`, `nameDisplay`, `description`, `value`) VALUES ('Application Form', 'internalDocuments', 'Internal Documents', 'Comma-separated list of documents for internal upload and use.', '');end
ALTER TABLE `gibbonAttendanceLogPerson` ADD `context` ENUM('Roll Group','Class','Person','Future','Self Registration') NULL DEFAULT NULL AFTER `reason`;end
UPDATE gibbonAttendanceLogPerson SET context='Class' WHERE gibbonCourseClassID>0 OR NOT gibbonCourseClassID IS NULL;end
UPDATE gibbonAttendanceLogPerson SET reason='' WHERE type='Present' AND reason='Pending';end
DROP TABLE gibbonPlannerEntryAttendance;end
DROP TABLE gibbonPlannerEntryAttendanceLog;end
INSERT INTO `gibbonSetting` (`scope`, `name`, `nameDisplay`, `description`, `value`) VALUES ('Attendance', 'prefillRollGroup', 'Pre-Fill Roll Group Attendance', 'Should Roll Group attendance be pre-filled with data available from other contexts?', 'N');end
INSERT INTO `gibbonSetting` (`scope`, `name`, `nameDisplay`, `description`, `value`) VALUES ('Attendance', 'prefillClass', 'Pre-Fill Class Attendance', 'Should Class attendance be pre-filled with data available from other contexts?', 'N');end
INSERT INTO `gibbonSetting` (`scope`, `name`, `nameDisplay`, `description`, `value`) VALUES ('Attendance', 'prefillPerson', 'Pre-Fill Person Attendance', 'Should Person attendance be pre-filled with data available from other contexts?', 'N');end
INSERT INTO `gibbonSetting` (`scope`, `name`, `nameDisplay`, `description`, `value`) VALUES ('Attendance', 'defaultRollGroupAttendanceType', 'Default Roll Group Attendance Type', 'The default selection for attendance type when taking Roll Group attendance', 'Present');end
INSERT INTO `gibbonSetting` (`scope`, `name`, `nameDisplay`, `description`, `value`) VALUES ('Attendance', 'defaultClassAttendanceType', 'Default Class Attendance Type', 'The default selection for attendance type when taking Class attendance', 'Present');end
UPDATE gibbonSetting SET value='Y' WHERE scope='Attendance' AND name='prefillRollGroup';end
UPDATE gibbonSetting SET description='Should Attendance by Roll Group be pre-filled with data available from other contexts?' WHERE scope='Attendance' AND name='prefillRollGroup';end
UPDATE gibbonSetting SET description='Should Attendance by Class be pre-filled with data available from other contexts?' WHERE scope='Attendance' AND name='prefillClass';end
UPDATE gibbonSetting SET description='Should Attendance by Person be pre-filled with data available from other contexts?' WHERE scope='Attendance' AND name='prefillPerson';end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `entrySidebar`, `menuShow`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Activities'), 'My Activities_viewEditEnrolment', '0', 'Actions', 'Allows an activity organizer to manage enrolment for their activities.', 'activities_my.php,activities_my_full.php,activities_manage_enrolment.php,activities_manage_enrolment_add.php,activities_manage_enrolment_edit.php,activities_manage_enrolment_delete.php', 'activities_my.php', 'Y', 'Y', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'N');end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Activities' AND gibbonAction.name='My Activities_viewEditEnrolment'));end
UPDATE gibbonAction SET category='Activities' WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Activities') AND (name='My Activities_viewEditEnrolment');end
INSERT INTO `gibbonLibraryType` (`gibbonLibraryTypeID`, `name`, `active`, `fields`) VALUES (NULL, 'Audio/Visual', 'Y', 'a:8:{i:0;a:6:{s:4:\"name\";s:4:\"Type\";s:11:\"description\";s:29:\"What kind of product is this?\";s:4:\"type\";s:4:\"Text\";s:7:\"options\";s:2:\"50\";s:7:\"default\";s:0:\"\";s:8:\"required\";s:1:\"Y\";}i:1;a:6:{s:4:\"name\";s:13:\"Serial Number\";s:11:\"description\";s:0:\"\";s:4:\"type\";s:4:\"Text\";s:7:\"options\";s:2:\"50\";s:7:\"default\";s:0:\"\";s:8:\"required\";s:1:\"N\";}i:2;a:6:{s:4:\"name\";s:10:\"Model Name\";s:11:\"description\";s:0:\"\";s:4:\"type\";s:4:\"Text\";s:7:\"options\";s:2:\"50\";s:7:\"default\";s:0:\"\";s:8:\"required\";s:1:\"N\";}i:3;a:6:{s:4:\"name\";s:8:\"Model ID\";s:11:\"description\";s:0:\"\";s:4:\"type\";s:4:\"Text\";s:7:\"options\";s:2:\"50\";s:7:\"default\";s:0:\"\";s:8:\"required\";s:1:\"N\";}i:4;a:6:{s:4:\"name\";s:11:\"Accessories\";s:11:\"description\";s:36:\"Any chargers, remotes controls, etc?\";s:4:\"type\";s:4:\"Text\";s:7:\"options\";s:3:\"255\";s:7:\"default\";s:0:\"\";s:8:\"required\";s:1:\"N\";}i:5;a:6:{s:4:\"name\";s:15:\"Warranty Number\";s:11:\"description\";s:0:\"\";s:4:\"type\";s:4:\"Text\";s:7:\"options\";s:2:\"50\";s:7:\"default\";s:0:\"\";s:8:\"required\";s:1:\"N\";}i:6;a:6:{s:4:\"name\";s:15:\"Warranty Expiry\";s:11:\"description\";s:19:\"Format: dd/mm/yyyy.\";s:4:\"type\";s:4:\"Date\";s:7:\"options\";s:0:\"\";s:7:\"default\";s:0:\"\";s:8:\"required\";s:1:\"N\";}i:7;a:6:{s:4:\"name\";s:16:\"Repair Log/Notes\";s:11:\"description\";s:0:\"\";s:4:\"type\";s:8:\"Textarea\";s:7:\"options\";s:2:\"10\";s:7:\"default\";s:0:\"\";s:8:\"required\";s:1:\"N\";}}');end
INSERT INTO `gibbonSetting` (`scope`, `name`, `nameDisplay`, `description`, `value`) VALUES ('Students', 'academicAlertLowThreshold', 'Low Academic Alert Threshold', 'The number of Markbook concerns needed in the current year to raise a low level academic alert on a student.', '3');end
INSERT INTO `gibbonSetting` (`scope`, `name`, `nameDisplay`, `description`, `value`) VALUES ('Students', 'academicAlertMediumThreshold', 'Medium Academic Alert Threshold', 'The number of Markbook concerns needed in the current year to raise a medium level academic alert on a student.', '5');end
INSERT INTO `gibbonSetting` (`scope`, `name`, `nameDisplay`, `description`, `value`) VALUES ('Students', 'academicAlertHighThreshold', 'High Academic Alert Threshold', 'The number of Markbook concerns needed in the current year to raise a high level academic alert on a student.', '9');end
INSERT INTO `gibbonSetting` (`scope`, `name`, `nameDisplay`, `description`, `value`) VALUES ('Students', 'behaviourAlertLowThreshold', 'Low Behaviour Alert Threshold', 'The number of Behaviour concerns needed in the past 60 days to raise a low level alert on a student.', '3');end
INSERT INTO `gibbonSetting` (`scope`, `name`, `nameDisplay`, `description`, `value`) VALUES ('Students', 'behaviourAlertMediumThreshold', 'Medium Behaviour Alert Threshold', 'The number of Behaviour concerns needed in the past 60 days to raise a medium level alert on a student.', '5');end
INSERT INTO `gibbonSetting` (`scope`, `name`, `nameDisplay`, `description`, `value`) VALUES ('Students', 'behaviourAlertHighThreshold', 'High Behaviour Alert Threshold', 'The number of Behaviour concerns needed in the past 60 days to raise a high level alert on a student.', '9');end
INSERT INTO `gibboni18n` (`code`, `name`, `active`, `systemDefault`, `maintainerName`, `maintainerWebsite`, `dateFormat`, `dateFormatRegEx`, `dateFormatPHP`,`rtl`) VALUES ('th_TH', 'ภาษาไทย - ราชอาณาจักรไทย', 'N', 'N', 'Wattana Hinchaisri', '', 'dd-mm-yyyy', '/^(0[1-9]|[12][0-9]|3[01])[-](0[1-9]|1[012])[-](19|20)\\\d\\\d$/i', 'd-m-Y', 'N');end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Activities'), 'Enter Activity Attendance_leader', 0, 'Attendance', 'Record student attendance for activities you lead or assist in leading.', 'activities_attendance.php,activities_attendanceProcess.php', 'activities_attendance.php', 'Y', 'Y', 'N', 'N', 'N', 'Y', 'Y', 'N', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Activities' AND gibbonAction.name='Enter Activity Attendance_leader')), (NULL , '2', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Activities' AND gibbonAction.name='Enter Activity Attendance_leader'));end
UPDATE `gibbonAction` SET precedence = 1 WHERE name = 'Enter Activity Attendance' AND gibbonModuleID = (SELECT gibbonModuleID FROM gibbonModule WHERE name='Activities');end
UPDATE gibbonAction SET description='Record student attendance for activities you organise, coach or assist in.' WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Activities') AND (name='Enter Activity Attendance_leader');end
SELECT gibbonLogID FROM gibbonLog LIMIT 1;end
INSERT IGNORE INTO `gibbonLanguage` (`name`) VALUES ('Myanmar'), ('Burmese'), ('Filipino');end
UPDATE `gibbonLanguage` SET `name`='Croatian' WHERE `name`='Croation';end
UPDATE `gibbonLanguage` SET `name`='Ukrainian' WHERE `name`='Ukranian';end
UPDATE `gibbonLanguage` SET `name` = 'Swedish' WHERE `name`='Swedish ';end
UPDATE `gibbonCountry` SET iddCountryCode='95' WHERE `printable_name`='Myanmar';end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Activities'), 'Activity Attendance by Date', 0, 'Reports', 'Record student attendance for activities.', 'report_attendance_byDate.php,report_attendance_byDate_print.php', 'report_attendance_byDate.php', 'Y', 'Y', 'N', 'N', 'N', 'Y', 'N', 'N', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Activities' AND gibbonAction.name='Activity Attendance by Date'));end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '2', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Activities' AND gibbonAction.name='Activity Attendance by Date'));end
CREATE TABLE `gibbonNotificationEvent` ( `gibbonNotificationEventID` INT(6) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT , `event` VARCHAR(90) NOT NULL , `moduleName` VARCHAR(30) NOT NULL , `actionName` VARCHAR(50) NOT NULL , `type` ENUM('Core','Additional','CLI') NOT NULL DEFAULT 'Core' , `scopes` VARCHAR(255) NOT NULL DEFAULT 'All', `active` ENUM('Y','N') NOT NULL DEFAULT 'Y' , PRIMARY KEY (`gibbonNotificationEventID`), UNIQUE KEY `event` (`event`, `moduleName`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;end
CREATE TABLE `gibbonNotificationListener` ( `gibbonNotificationListenerID` INT(10) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT , `gibbonNotificationEventID` INT(6) UNSIGNED ZEROFILL NULL , `gibbonPersonID` INT(10) UNSIGNED ZEROFILL NULL , `scopeType` VARCHAR(30) NULL , `scopeID` INT(20) UNSIGNED NULL , PRIMARY KEY (`gibbonNotificationListenerID`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='System Admin'), 'Notification Settings', 0, 'Settings', 'Manage settings for system notifications.', 'notificationSettings.php,notificationSettings_manage_edit.php', 'notificationSettings.php', 'Y', 'Y', 'N', 'N', 'N', 'Y', 'N', 'N', 'N') ;end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='System Admin' AND gibbonAction.name='Notification Settings'));end
INSERT INTO `gibbonNotificationEvent` (`event`, `moduleName`, `actionName`, `type`, `scopes`, `active`) VALUES ('Daily Behaviour Summary', 'Behaviour', 'Find Behaviour Patterns', 'CLI', 'All', 'Y');end
INSERT INTO `gibbonNotificationEvent` (`event`, `moduleName`, `actionName`, `type`, `scopes`, `active`) VALUES ('New Negative Record', 'Behaviour', 'View Behaviour Records_all', 'Core', 'All,gibbonPersonIDStudent,gibbonYearGroupID', 'Y');end
UPDATE `gibbonAction` SET name = 'Manage Applications_editDelete', precedence = 1 WHERE name = 'Manage Applications' AND gibbonModuleID = (SELECT gibbonModuleID FROM gibbonModule WHERE name='Students');end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `entrySidebar`, `menuShow`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Students'), 'Manage Applications_edit', 0, 'Admissions', 'Allows admins to view and action applications, but not to delete them', 'applicationForm_manage.php, applicationForm_manage_edit.php, applicationForm_manage_accept.php, applicationForm_manage_reject.php', 'applicationForm_manage.php', 'Y', 'Y', 'N', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'N');end
ALTER TABLE `gibbonAttendanceLogPerson` CHANGE `gibbonAttendanceCodeID` `gibbonAttendanceCodeID` INT(3) UNSIGNED ZEROFILL NULL;end
ALTER TABLE `gibbonAttendanceLogPerson` ADD INDEX `dateAndPerson` (`date`, `gibbonPersonID`) USING BTREE;end
UPDATE `gibbonAttendanceLogPerson` SET `gibbonAttendanceCodeID`=NULL WHERE gibbonAttendanceCodeID='000';end
ALTER TABLE `gibbonMarkbookColumn` CHANGE `attainmentRawMax` `attainmentRawMax` DECIMAL(8,2) NULL DEFAULT NULL;end
INSERT INTO `gibbonNotificationEvent` (`event`, `moduleName`, `actionName`, `type`, `scopes`, `active`) VALUES ('New Positive Record', 'Behaviour', 'View Behaviour Records_all', 'Core', 'All,gibbonPersonIDStudent,gibbonYearGroupID', 'Y');end
ALTER TABLE `gibbonTT` ADD `nameShortDisplay` ENUM('Day Of The Week','Timetable Day Short Name','','') NOT NULL DEFAULT 'Day Of The Week' AFTER `nameShort`;end
DELETE FROM gibbonFileExtension WHERE extension='scpt';end
UPDATE gibbonAction SET name='Attendance By Roll Group_all', precedence=1 WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Attendance') AND name='Attendance By Roll Group';end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `entrySidebar`, `menuShow`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Attendance'), 'Attendance By Roll Group_myGroups', 0, 'Take Attendance', 'Take attendance for a teacher\'s own roll groups', 'attendance_take_byRollGroup.php', 'attendance_take_byRollGroup.php', 'Y', 'Y', 'N', 'N', 'N', 'N', 'Y', 'Y', 'N', 'N', 'Y');end
INSERT INTO `gibbonNotificationEvent` (`event`, `moduleName`, `actionName`, `type`, `scopes`, `active`) VALUES ('Family Data Updates', 'Data Updater', 'Family Data Updates', 'Core', 'All', 'Y');end
INSERT INTO `gibbonNotificationEvent` (`event`, `moduleName`, `actionName`, `type`, `scopes`, `active`) VALUES ('Finance Data Updates', 'Data Updater', 'Finance Data Updates', 'Core', 'All', 'Y');end
INSERT INTO `gibbonNotificationEvent` (`event`, `moduleName`, `actionName`, `type`, `scopes`, `active`) VALUES ('Medical Form Updates', 'Data Updater', 'Medical Form Updates', 'Core', 'All', 'Y');end
INSERT INTO `gibbonNotificationEvent` (`event`, `moduleName`, `actionName`, `type`, `scopes`, `active`) VALUES ('Personal Data Updates', 'Data Updater', 'Personal Data Updates', 'Core', 'All', 'Y');end
INSERT INTO `gibbonNotificationEvent` (`event`, `moduleName`, `actionName`, `type`, `scopes`, `active`) VALUES ('Login - Failed', 'User Admin', 'Manage Users', 'Core', 'All', 'Y');end
INSERT INTO `gibbonNotificationEvent` (`event`, `moduleName`, `actionName`, `type`, `scopes`, `active`) VALUES ('New Public Registration', 'User Admin', 'Manage Users', 'Core', 'All', 'Y');end
INSERT INTO `gibbonNotificationEvent` (`event`, `moduleName`, `actionName`, `type`, `scopes`, `active`) VALUES ('New Application Form', 'Students', 'Manage Applications_edit', 'Core', 'All', 'Y');end
INSERT INTO `gibbonNotificationEvent` (`event`, `moduleName`, `actionName`, `type`, `scopes`, `active`) VALUES ('New Application Form', 'Staff', 'Manage Applications', 'Core', 'All', 'Y');end
UPDATE gibbonSetting SET value='br[style],strong[style],em[style],span[style],p[style],address[style],pre[style],h1[style],h2[style],h3[style],h4[style],h5[style],h6[style],table[style],thead[style],tbody[style],tfoot[style],tr[style],td[style|colspan|rowspan],ol[style],ul[style],li[style],blockquote[style],a[style|target|href],img[style|class|src|width|height],video[style],source[style],hr[style],iframe[style|width|height|src|frameborder|allowfullscreen],embed[style],div[style],sup[style],sub[style]' WHERE name='allowableHTML' AND scope='System';end
INSERT INTO `gibbonNotificationEvent` (`event`, `moduleName`, `actionName`, `type`, `scopes`, `active`) VALUES ('Student Withdrawn', 'Activities', 'Manage Activities', 'Core', 'All,gibbonPersonIDStudent,gibbonYearGroupID', 'Y');end
INSERT INTO `gibbonNotificationEvent` (`event`, `moduleName`, `actionName`, `type`, `scopes`, `active`) VALUES ('New Activity Registration', 'Activities', 'Manage Activities', 'Core', 'All,gibbonPersonIDStudent,gibbonYearGroupID', 'Y');end
ALTER TABLE `gibbonRole` ADD `restriction` ENUM('None','Same Role','Admin Only') NOT NULL DEFAULT 'None' AFTER `pastYearsLogin`;end
UPDATE `gibbonRole` SET `restriction` = 'Admin Only' WHERE (`name` = 'Administrator' AND `type` = 'Core' );end
INSERT INTO `gibbonSetting` (`scope`, `name`, `nameDisplay`, `description`, `value`) VALUES ('Markbook', 'enableDisplayCumulativeMarks', 'Enable Display Cumulative Marks', 'Should cumulative marks be displayed on the View Markbook page for Students and Parents and in Student Profiles?', 'N');end
INSERT INTO `gibbonNotificationEvent` (`event`, `moduleName`, `actionName`, `type`, `scopes`, `active`) VALUES ('Updated Individual Needs', 'Individual Needs', 'Individual Needs Records_viewEdit', 'Core', 'All,gibbonPersonIDStudent,gibbonYearGroupID', 'Y');end
INSERT INTO `gibbonNotificationEvent` (`event`, `moduleName`, `actionName`, `type`, `scopes`, `active`) VALUES ('New Student Note', 'Students', 'View Student Profile_full', 'Core', 'All,gibbonPersonIDStudent,gibbonYearGroupID', 'Y');end
INSERT INTO `gibbonNotificationEvent` (`event`, `moduleName`, `actionName`, `type`, `scopes`, `active`) VALUES ('Updated Privacy Settings', 'Students', 'View Student Profile_full', 'Core', 'All,gibbonPersonIDStudent,gibbonYearGroupID', 'Y');end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Timetable'), 'View Timetable by Person_my', 1, 'View Timetables', 'Allows users to view their own timetable', 'tt.php, tt_view.php', 'tt.php', 'N', 'N', 'Y', 'N', 'N', 'Y', 'Y', 'N', 'Y');end
INSERT INTO `gibbonPermission` (`gibbonRoleID` ,`gibbonActionID`) VALUES ('003', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Timetable' AND gibbonAction.name='View Timetable by Person_my'));end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Timetable'), 'View Timetable by Person_myChildren', 0, 'View Timetables', 'Allows parents to view their children\'s timetable', 'tt.php, tt_view.php', 'tt.php', 'N', 'N', 'N', 'Y', 'N', 'N', 'N', 'Y', 'N');end
INSERT INTO `gibbonPermission` (`gibbonRoleID` ,`gibbonActionID`) VALUES ('004', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Timetable' AND gibbonAction.name='View Timetable by Person_myChildren'));end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Students'), 'View Student Profile_my', 0, 'Profiles', 'Allows students to view their own information', 'student_view.php, student_view_details.php', 'student_view.php', 'N', 'N', 'Y', 'N', 'N', 'N', 'Y', 'N', 'N');end
INSERT INTO `gibbonPermission` (`gibbonRoleID` ,`gibbonActionID`) VALUES ('003', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Students' AND gibbonAction.name='View Student Profile_my'));end
UPDATE gibbonAction SET precedence=3 WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Timetable') AND name='View Timetable by Person_allYears';end
UPDATE gibbonAction SET precedence=2 WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Timetable') AND name='View Timetable by Person';end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Markbook'), 'View Markbook_myClasses', 3, 'Profiles', 'Allows teachers to view their own markbook information', 'markbook_view.php, markbook_view_full.php', 'markbook_view.php', 'N', 'Y', 'N', 'N', 'N', 'Y', 'N', 'N', 'Y');end
SELECT `gibbonModuleID` FROM `gibbonModule` LIMIT 1;end
UPDATE gibbonAction SET precedence=4 WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Markbook') AND name='View Markbook_allClassesAllData';end
INSERT INTO `gibbonNotificationEvent` (`event`, `moduleName`, `actionName`, `type`, `scopes`, `active`) VALUES ('Daily Attendance Summary', 'Attendance', 'Roll Groups Not Registered', 'CLI', 'All', 'Y');end
INSERT INTO `gibbonNotificationEvent` (`event`, `moduleName`, `actionName`, `type`, `scopes`, `active`) VALUES ('User Status Check and Fix', 'User Admin', 'Manage Users', 'CLI', 'All', 'Y');end
INSERT INTO `gibbonNotificationEvent` (`event`, `moduleName`, `actionName`, `type`, `scopes`, `active`) VALUES ('Overdue Loan Items', 'Library', 'Lending & Activity Log', 'CLI', 'All', 'Y');end
INSERT INTO `gibbonNotificationEvent` (`event`, `moduleName`, `actionName`, `type`, `scopes`, `active`) VALUES ('Behaviour Letters', 'Behaviour', 'View Behaviour Records_all', 'CLI', 'All', 'Y');end
INSERT INTO `gibbonNotificationEvent` (`event`, `moduleName`, `actionName`, `type`, `scopes`, `active`) VALUES ('Parent Weekly Email Summary', 'Planner', 'Parent Weekly Email Summary', 'CLI', 'All', 'Y');end
DELETE FROM gibbonFileExtension WHERE extension LIKE 'svg';end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Students'), 'Student Enrolment Trends', 0, 'Visualise', 'Provides a visual graph of student enrolment over a range of time.', 'report_graph_studentEnrolment.php', 'report_graph_studentEnrolment.php', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'N');end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '1', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Students' AND gibbonAction.name='Student Enrolment Trends'));end
UPDATE `gibbonAction` SET `defaultPermissionTeacher`='N' WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='System Admin') AND name='Notification Settings';end
INSERT INTO `gibbonSetting` (`scope`, `name`, `nameDisplay`, `description`, `value`) VALUES ('Application Form', 'scholarshipOptionsActive', 'Scholarship Options Active', 'Should the Scholarship Options section be turned on?', 'Y');end
INSERT INTO `gibbonSetting` (`scope`, `name`, `nameDisplay`, `description`, `value`) VALUES ('Application Form', 'paymentOptionsActive', 'Payment Options Active', 'Should the Payment section be turned on?', 'Y');end
INSERT INTO `gibbonSetting` (`scope`, `name`, `nameDisplay`, `description`, `value`) VALUES ('Application Form', 'senOptionsActive', 'Special Education Needs Active', 'Should the Special Education Needs section be turned on?', 'Y');end
UPDATE gibboni18n SET maintainerName='Enrique Snitzes' WHERE code='es_ES';end
UPDATE gibboni18n SET active='Y' WHERE (code='sq_AL' OR code='vi_VN' OR code='th_TH');end
";