forked from GibbonEdu/core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCHANGEDB.php
910 lines (889 loc) · 214 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
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
<?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;
//v11.0.00 and earlier removed to reduce file size
//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
";
//v14.0.01
++$count;
$sql[$count][0] = '14.0.01';
$sql[$count][1] = "";
//v15.0.00
++$count;
$sql[$count][0] = '15.0.00';
$sql[$count][1] = "
UPDATE gibboni18n SET code='ka_GE' WHERE code='ke_GE';end
ALTER TABLE `gibbonTTDay` ADD `color` VARCHAR(6) NOT NULL AFTER `nameShort`;end
INSERT INTO `gibboni18n` (`code`, `name`, `active`, `systemDefault`, `maintainerName`, `maintainerWebsite`, `dateFormat`, `dateFormatRegEx`, `dateFormatPHP`,`rtl`) VALUES ('el_GR', 'ελληνικά - Ελλάδα', 'N', 'N', 'Konstantinos Chonias', '', '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 `gibbonTTDay` ADD `fontColor` VARCHAR(6) NOT NULL AFTER `color`;end
UPDATE gibbonSetting SET description='Allowable choices for positive behaviour' WHERE scope='Behaviour' AND name='positiveDescriptors';end
UPDATE gibbonSetting SET description='Allowable choices for negative behaviour' WHERE scope='Behaviour' AND name='negativeDescriptors';end
UPDATE gibbonSetting SET description='Allowable choices for severity level (from lowest to highest)' WHERE scope='Behaviour' AND name='levels';end
UPDATE gibbonLibraryType SET name='Audio/Visual Hardware' WHERE name='Audio/Visual';end
INSERT INTO gibbonLibraryType SET name='Optical Media', active='Y', fields='a:10:{i:0;a:6:{s:4:\"name\";s:4:\"Type\";s:11:\"description\";s:35:\"What type of optical media is this?\";s:4:\"type\";s:6:\"Select\";s:7:\"options\";s:14:\"CD,DVD,Blu-Ray\";s:7:\"default\";s:0:\"\";s:8:\"required\";s:1:\"Y\";}i:1;a:6:{s:4:\"name\";s:6:\"Format\";s:11:\"description\";s:38:\"Technical details of media formatting.\";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:8:\"Language\";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:3;a:6:{s:4:\"name\";s:9:\"Subtitles\";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:4;a:6:{s:4:\"name\";s:12:\"Aspect Ratio\";s:11:\"description\";s:0:\"\";s:4:\"type\";s:4:\"Text\";s:7:\"options\";s:2:\"20\";s:7:\"default\";s:0:\"\";s:8:\"required\";s:1:\"N\";}i:5;a:6:{s:4:\"name\";s:15:\"Number of Discs\";s:11:\"description\";s:0:\"\";s:4:\"type\";s:6:\"Select\";s:7:\"options\";s:10:\",1,2,3,4,5\";s:7:\"default\";s:0:\"\";s:8:\"required\";s:1:\"N\";}i:6;a:6:{s:4:\"name\";s:14:\"Content Rating\";s:11:\"description\";s:39:\"Details of age guidance or retrictions.\";s:4:\"type\";s:4:\"Text\";s:7:\"options\";s:3:\"255\";s:7:\"default\";s:0:\"\";s:8:\"required\";s:1:\"N\";}i:7;a:6:{s:4:\"name\";s:6:\"Studio\";s:11:\"description\";s:27:\"Name of originating studio.\";s:4:\"type\";s:4:\"Text\";s:7:\"options\";s:3:\"255\";s:7:\"default\";s:0:\"\";s:8:\"required\";s:1:\"N\";}i:8;a:6:{s:4:\"name\";s:12:\"Release 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:9;a:6:{s:4:\"name\";s:8:\"Run Time\";s:11:\"description\";s:11:\"In minutes.\";s:4:\"type\";s:4:\"Text\";s:7:\"options\";s:1:\"3\";s:7:\"default\";s:0:\"\";s:8:\"required\";s:1:\"N\";}}';end
CREATE TABLE `gibbonINAssistant` (`gibbonINAssistantID` int(10) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT, `gibbonPersonIDStudent` int(10) UNSIGNED ZEROFILL NOT NULL, `gibbonPersonIDAssistant` int(10) UNSIGNED ZEROFILL NOT NULL, `comment` text COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`gibbonINAssistantID`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;end
CREATE TABLE `gibbonUsernameFormat` (`gibbonUsernameFormatID` int(3) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT, `gibbonRoleIDList` varchar(255) NULL, `format` varchar(255) NULL, `isDefault` ENUM('Y','N') NOT NULL DEFAULT 'N', `isNumeric` ENUM('Y','N') NOT NULL DEFAULT 'N',`numericValue` int(12) UNSIGNED NOT NULL DEFAULT 0, `numericIncrement` int(3) UNSIGNED NOT NULL DEFAULT 1, `numericSize` int(3) UNSIGNED NOT NULL DEFAULT 4, PRIMARY KEY (`gibbonUsernameFormatID`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;end
INSERT INTO `gibbonUsernameFormat` SET gibbonRoleIDList='003', `format`=REPLACE((SELECT value FROM gibbonSetting WHERE scope='Application Form' AND name='usernameFormat'),'[preferredNameInitial]','[preferredName:1]'), `isDefault`='Y', `isNumeric`='N';end
INSERT INTO `gibbonUsernameFormat` SET gibbonRoleIDList='001,002,006', `format`=REPLACE((SELECT value FROM gibbonSetting WHERE scope='Staff' AND name='staffApplicationFormUsernameFormat'),'[preferredNameInitial]','[preferredName:1]'), `isDefault`='N', `isNumeric`='N';end
UPDATE gibbonAction SET URLList='house_manage.php,house_manage_edit.php,house_manage_add.php,house_manage_delete.php,house_manage_assign.php' WHERE name='Manage Houses' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='School 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='Students'), 'Students by House', 0, 'Reports', 'View a report of student houses by year group.', 'report_students_byHouse.php', 'report_students_byHouse.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='Students by House'));end
UPDATE gibbonAction SET URLList='applicationForm_manage.php, applicationForm_manage_edit.php, applicationForm_manage_accept.php, applicationForm_manage_reject.php, applicationForm_manage_add.php' WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Students') AND name='Manage Applications_edit';end
UPDATE gibbonAction SET URLList='applicationForm_manage.php, applicationForm_manage_edit.php, applicationForm_manage_delete.php, applicationForm_manage_accept.php, applicationForm_manage_reject.php, applicationForm_manage_add.php' WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Students') AND name='Manage Applications_editDelete';end
INSERT INTO `gibbonNotificationEvent` (`event`, `moduleName`, `actionName`, `type`, `scopes`, `active`) VALUES ('Application Form Accepted', 'Students', 'Manage Applications_edit', 'Core', 'All,gibbonYearGroupID', 'Y');end
ALTER TABLE `gibbonActivity` ADD `paymentType` ENUM('Entire Programme','Per Session','Per Week','Per Term') NULL DEFAULT 'Entire Programme' AFTER `payment`, ADD `paymentFirmness` ENUM('Finalised','Estimated') NULL DEFAULT 'Finalised' AFTER `paymentType`;end
INSERT INTO `gibboni18n` (`code`, `name`, `active`, `systemDefault`, `maintainerName`, `maintainerWebsite`, `dateFormat`, `dateFormatRegEx`, `dateFormatPHP`,`rtl`) VALUES ('am_ET','አማርኛ - ኢትዮጵያ', 'N', 'N', 'Bruce Banner', '', '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='Timetable Admin'), 'Sync Course Enrolment', 0, 'Courses & Classes', 'Allows users to map enrolments from homerooms to classes.', 'courseEnrolment_sync.php,courseEnrolment_sync_add.php,courseEnrolment_sync_edit.php,courseEnrolment_sync_delete.php,courseEnrolment_sync_run.php', 'courseEnrolment_sync.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='Sync Course Enrolment'));end
CREATE TABLE `gibbonCourseClassMap` (`gibbonCourseClassMapID` int(8) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT, `gibbonCourseClassID` int(8) UNSIGNED ZEROFILL NULL,`gibbonRollGroupID` int(5) UNSIGNED ZEROFILL NULL, `gibbonYearGroupID` int(3) UNSIGNED ZEROFILL NULL, UNIQUE KEY `gibbonCourseClassID` (gibbonCourseClassID), PRIMARY KEY (`gibbonCourseClassMapID`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;end
INSERT INTO `gibbonSetting` (`scope`, `name`, `nameDisplay`, `description`, `value`) VALUES ('Timetable Admin', 'autoEnrolCourses', 'Auto-Enrol Courses Default', 'Should auto-enrolment of new students into courses be turned on or off by default?', 'N');end
UPDATE `gibbonNotificationEvent` SET actionName='View Student Profile_full' WHERE (event='Application Form Accepted' OR event='New Application Form') AND moduleName='Students';end
INSERT INTO `gibbonSetting` (`scope`, `name`, `nameDisplay`, `description`, `value`) VALUES ('Application Form', 'availableYearsOfEntry', 'Available Years of Entry', 'Which school years should be available to apply to?', '');end
UPDATE gibbonAction SET gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Planner') WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Resources');end
DELETE FROM gibbonModule WHERE name='Resources';end
INSERT INTO `gibbonSetting` (`scope`, `name`, `nameDisplay`, `description`, `value`) VALUES ('Application Form', 'enableLimitedYearsOfEntry', 'Enable Limited Years of Entry', 'If yes, applicants choices for Year of Entry can be limited to specific school years.', 'N');end
ALTER TABLE `gibbonRubricCell` ADD INDEX(`gibbonRubricID`);end
ALTER TABLE `gibbonRubricCell` ADD INDEX(`gibbonRubricColumnID`);end
ALTER TABLE `gibbonRubricCell` ADD INDEX(`gibbonRubricRowID`);end
ALTER TABLE `gibbonRubricColumn` ADD INDEX(`gibbonRubricID`);end
ALTER TABLE `gibbonRubricEntry` ADD INDEX(`gibbonRubricID`);end
ALTER TABLE `gibbonRubricEntry` ADD INDEX(`gibbonPersonID`);end
ALTER TABLE `gibbonRubricEntry` ADD INDEX(`gibbonRubricCellID`);end
ALTER TABLE `gibbonRubricEntry` ADD INDEX(`contextDBTable`);end
ALTER TABLE `gibbonRubricEntry` ADD INDEX(`contextDBTableID`);end
ALTER TABLE `gibbonRubricRow` ADD INDEX(`gibbonRubricID`);end
INSERT INTO `gibbonNotificationEvent` (`event`, `moduleName`, `actionName`, `type`, `scopes`, `active`) VALUES ('Weekly Attendance Summary ', 'Attendance', 'Attendance Summary by Date', 'CLI', 'All,gibbonYearGroupID', 'Y');end
ALTER TABLE `gibbonActivityStaff` MODIFY `gibbonPersonID` INT(10) UNSIGNED ZEROFILL NOT NULL DEFAULT '0000000000';end
UPDATE gibbonSetting SET description='The number of Markbook concerns needed in the past 60 days to raise a low level academic alert on a student.' WHERE scope='Students' AND name='academicAlertLowThreshold';end
UPDATE gibbonSetting SET description='The number of Markbook concerns needed in the past 60 days to raise a medium level academic alert on a student.' WHERE scope='Students' AND name='academicAlertMediumThreshold';end
UPDATE gibbonSetting SET description='The number of Markbook concerns needed in the past 60 days to raise a high level academic alert on a student.' WHERE scope='Students' AND name='academicAlertHighThreshold';end
INSERT INTO `gibbonSetting` (`scope`, `name`, `nameDisplay`, `description`, `value`) VALUES ('User Admin', 'uniqueEmailAddress', 'Unique Email Address', 'Are primary email addresses required to be unique?', 'N');end
UPDATE gibbonRole SET nameShort='Adm' WHERE name='Administrator';end
UPDATE gibbonRole SET nameShort='Std' WHERE name='Student';end
UPDATE gibbonRole SET nameShort='Tcr' WHERE name='Teacher';end
UPDATE gibbonRole SET nameShort='Prt' WHERE name='Parent';end
UPDATE gibbonRole SET nameShort='SSt' WHERE name='Support Staff';end
UPDATE gibbonAction SET entryURL='staff_view.php' WHERE entryURL='staff_view' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Staff');end
INSERT INTO `gibbonSetting` (`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES ('Planner', 'parentWeeklyEmailSummaryIncludeMarkbook', 'Parent Weekly Email Summary Include Markbook', 'Should Markbook information be included in the weekly planner email summary that goes out to parents?', 'N');end
ALTER TABLE `gibbonMarkbookColumn` ADD INDEX(`completeDate`);end
ALTER TABLE `gibbonMarkbookColumn` ADD INDEX(`complete`);end
INSERT INTO `gibbonSetting` (`scope` ,`name` ,`nameDisplay` ,`description` ,`value`) VALUES ('System', 'nameFormatStaffFormal', 'Formal Name Format', '', '[title] [preferredName:1]. [surname]');end
INSERT INTO `gibbonSetting` (`scope` ,`name` ,`nameDisplay` ,`description` ,`value`) VALUES ('System', 'nameFormatStaffFormalReversed', 'Formal Name Reversed', '', '[title] [surname], [preferredName:1].');end
INSERT INTO `gibbonSetting` (`scope` ,`name` ,`nameDisplay` ,`description` ,`value`) VALUES ('System', 'nameFormatStaffInformal', 'Informal Name Format', '', '[preferredName] [surname]');end
INSERT INTO `gibbonSetting` (`scope` ,`name` ,`nameDisplay` ,`description` ,`value`) VALUES ('System', 'nameFormatStaffInformalReversed', 'Informal Name Reversed', '', '[surname], [preferredName]');end
UPDATE gibboni18n SET active='Y' WHERE code='pt_BR';end
";
//v15.0.01
++$count;
$sql[$count][0] = '15.0.01';
$sql[$count][1] = "
UPDATE gibbonAction SET precedence=0 WHERE name='View Student Profile_brief' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Students');end
UPDATE gibbonAction SET precedence=1 WHERE name='View Student Profile_myChildren' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Students');end
UPDATE gibbonAction SET precedence=1 WHERE name='View Student Profile_my' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Students');end
UPDATE gibbonAction SET precedence=2 WHERE name='View Student Profile_fullNoNotes' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Students');end
UPDATE gibbonAction SET precedence=3 WHERE name='View Student Profile_full' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Students');end
";
//v16.0.00
++$count;
$sql[$count][0] = '16.0.00';
$sql[$count][1] = "
INSERT INTO `gibbonSetting` (`scope` ,`name` ,`nameDisplay` ,`description` ,`value`) VALUES ('Attendance', 'selfRegistrationRedirect', 'Self Registration Redirect', 'Should self registration redirect to Message Wall?', 'N');end
ALTER TABLE `gibbonPersonMedical` ADD `comment` TEXT NOT NULL AFTER `tetanusWithin10Years`;end
ALTER TABLE `gibbonPersonMedicalUpdate` ADD `comment` TEXT NOT NULL AFTER `tetanusWithin10Years`;end
INSERT INTO `gibbonNotificationEvent` (`event`, `moduleName`, `actionName`, `type`, `scopes`, `active`) VALUES ('Student Bumped', 'Activities', 'Manage Activities', 'Core', 'All', 'Y');end
INSERT INTO `gibboni18n` (`code`, `name`, `active`, `systemDefault`, `maintainerName`, `maintainerWebsite`, `dateFormat`, `dateFormatRegEx`, `dateFormatPHP`,`rtl`) VALUES ('om_ET','Afaan Oromo - Ethiopia', 'N', 'N', 'Ararsa Chelkeba', '', '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`, `entrySidebar`, `menuShow`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Attendance'), 'Student History_my', 1, 'Reports', 'Allows a student to print a report of their attendance data in the current school year.', 'report_studentHistory.php', 'report_studentHistory.php', 'Y', 'Y', 'N', 'N', 'N', 'N', 'N', 'N', 'Y', 'N', 'N');end
UPDATE gibbonAction SET precedence=2 WHERE name='Student History_all' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Attendance');end
UPDATE gibboni18n SET active='Y' WHERE code='zh_CN';end
ALTER TABLE `gibboni18n` DROP `maintainerName`, DROP `maintainerWebsite`;end
UPDATE gibbonSetting SET description='Should department information be made available to the public, via the Gibbon homepage?' WHERE scope='Departments' AND name='makeDepartmentsPublic';end
UPDATE gibbonAction SET URLList='attendance_take_byPerson_edit.php,attendance_take_byPerson_delete.php' WHERE name='Manage Attendance Logs' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='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='User Admin'), 'Import Staff', 0, 'Import', 'Allows bulk import of staff records.', 'import_staff.php', 'import_staff.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 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='Activities'), 'Activity Choices by Roll Group', 0, 'Reports', 'View all student activity choices in the current year for a given roll group.', 'report_activityChoices_byRollGroup.php', 'report_activityChoices_byRollGroup.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 Choices by Roll Group'));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 Choices by Roll Group'));end
UPDATE gibboni18n SET active='Y' WHERE code='pl_PL';end
UPDATE gibbonSetting set description='The timezone where the school is located' WHERE name='timezone' AND scope='System';end
UPDATE gibbonSetting SET value=(SELECT value FROM (SELECT value FROM gibbonSetting WHERE scope='System' AND name='organisationEmail') as temp) WHERE scope='Finance' AND name='email' AND value='[email protected]';end
ALTER TABLE `gibbonHouse` CHANGE `name` `name` VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;end
INSERT INTO `gibboni18n` (`code`, `name`, `active`, `systemDefault`, `dateFormat`, `dateFormatRegEx`, `dateFormatPHP`,`rtl`) VALUES ('hr_HR','Hrvatski - Hrvatska', '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 gibbonSetting SET description='Explanatory text to include with Day-Type Options.' WHERE scope='User Admin' AND name='dayTypeText';end
ALTER TABLE `gibbonPayment` CHANGE `type` `type` ENUM('Online','Bank Transfer','Cash','Cheque','Other','Credit Card') NOT NULL DEFAULT 'Online';end
CREATE INDEX contextKeyNameValue ON gibbonLike (contextKeyName, contextKeyValue);end
UPDATE gibbonSetting SET value='Y' WHERE scope='System' AND name='cuttingEdgeCode' AND value='Yes';end
ALTER TABLE `gibbonTT` CHANGE `nameShortDisplay` `nameShortDisplay` ENUM('Day Of The Week','Timetable Day Short Name','') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'Day Of The Week';end
INSERT INTO `gibboni18n` (`code`, `name`, `active`, `systemDefault`, `dateFormat`, `dateFormatRegEx`, `dateFormatPHP`,`rtl`) VALUES ('et_EE','Eesti Keel - Eesti', '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
ALTER TABLE gibbonFamilyAdult MODIFY gibbonPersonID INT(10) UNSIGNED ZEROFILL NOT NULL;end
ALTER TABLE gibbonFamilyChild MODIFY gibbonPersonID INT(10) UNSIGNED ZEROFILL NOT NULL;end
ALTER TABLE gibbonLibraryItem DROP INDEX fields;end
ALTER TABLE gibbonLibraryType DROP INDEX fields;end
INSERT INTO `gibbonSetting` (`scope` ,`name` ,`nameDisplay` ,`description` ,`value`) VALUES ('Data Updater', 'cutoffDate', 'Cutoff Date', 'Earliest acceptable date when checking if data updates are required.', '');end
INSERT INTO `gibbonSetting` (`scope` ,`name` ,`nameDisplay` ,`description` ,`value`) VALUES ('Data Updater', 'redirectByRoleCategory', 'Data Updater Redirect', 'Which types of users should be redirected to the Data Updater if updates are required.', 'Parent');end
INSERT INTO `gibbonSetting` (`scope` ,`name` ,`nameDisplay` ,`description` ,`value`) VALUES ('Data Updater', 'requiredUpdates', 'Required Updates?', 'Should the data updater highlight updates that are required?', 'N');end
INSERT INTO `gibbonSetting` (`scope` ,`name` ,`nameDisplay` ,`description` ,`value`) VALUES ('Data Updater', 'requiredUpdatesByType', 'Required Update Types', 'Which type of data updates should be required.', 'Personal,Family');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='Data Updater'), 'My Data Updates', 0, 'Request Updates', 'Provides an overview of any required data updates for a user, including family data if applicable.', 'data_updates.php', 'data_updates.php', 'Y', 'Y', 'N', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y');end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '001', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Data Updater' AND gibbonAction.name='My Data Updates'));end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '002', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Data Updater' AND gibbonAction.name='My Data Updates'));end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '004', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Data Updater' AND gibbonAction.name='My Data Updates'));end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '006', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Data Updater' AND gibbonAction.name='My Data Updates'));end
UPDATE `gibbonModule` SET `entryURL`='data_updates.php' WHERE gibbonModule.name = 'Data Updater';end
ALTER TABLE `gibbonYearGroup` ADD `gibbonPersonIDHOY` INT(10) UNSIGNED ZEROFILL NULL DEFAULT NULL AFTER `sequenceNumber`;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'), 'Manage Groups_all', 1, 'Targets', 'Allows management of custom groups for message targetting', 'groups_manage.php,groups_manage_add.php,groups_manage_edit.php,groups_manage_delete.php', 'groups_manage.php', 'Y', 'N', 'N', 'N', 'N', 'Y', 'Y', 'Y', 'Y');end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '001', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Messenger' AND gibbonAction.name='Manage Groups_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='Messenger'), 'Manage Groups_my', 0, 'Targets', 'Allows management of custom groups for message targetting', 'groups_manage.php,groups_manage_add.php,groups_manage_edit.php,groups_manage_delete.php', 'groups_manage.php', 'N', 'Y', 'N', 'N', 'N', 'Y', 'Y', 'Y', 'Y');end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '002', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Messenger' AND gibbonAction.name='Manage Groups_my'));end
CREATE TABLE `gibbonGroup` (`gibbonGroupID` int(8) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT,`gibbonPersonIDOwner` int(10) UNSIGNED ZEROFILL NOT NULL,`name` varchar(30) NOT NULL,`timestampCreated` timestamp NULL,`timestampUpdated` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,PRIMARY KEY (`gibbonGroupID`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;end
CREATE TABLE `gibbonGroupPerson` (`gibbonGroupPersonID` int(10) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT,`gibbonGroupID` int(8) UNSIGNED ZEROFILL NOT NULL,`gibbonPersonID` int(10) UNSIGNED ZEROFILL NOT NULL,PRIMARY KEY (`gibbonGroupPersonID`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;end
ALTER TABLE `gibbonGroupPerson` ADD UNIQUE( `gibbonGroupID`, `gibbonPersonID`);end
ALTER TABLE `gibbonGroup` ADD `gibbonSchoolYearID` INT(3) UNSIGNED ZEROFILL NOT NULL AFTER `gibbonPersonIDOwner`;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_groups_any', 1, 'Manage Messages', 'Bulk email to any group', 'messenger_post.php', 'messenger_post.php', 'Y', 'N', 'N', 'N', 'N', 'Y', 'Y', 'Y', 'Y');end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '001', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Messenger' AND gibbonAction.name='New Message_groups_any'));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_groups_my', 0, 'Manage Messages', 'Bulk email to any group a user owns or is a member of', 'messenger_post.php', 'messenger_post.php', 'N', 'Y', 'N', 'N', 'N', 'Y', 'Y', 'Y', 'Y');end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '002', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Messenger' AND gibbonAction.name='New Message_groups_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='Messenger'), 'New Message_groups_parents', 1, 'Manage Messages', 'Include parents in messages posted to groups', 'messenger_post.php', 'messenger_post.php', 'Y', 'N', 'N', 'N', 'N', 'Y', 'Y', 'Y', 'Y');end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '001', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Messenger' AND gibbonAction.name='New Message_groups_parents'));end
UPDATE gibbonAction SET precedence=0 WHERE name='View Student Profile_brief' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Students');end
UPDATE gibbonAction SET precedence=1 WHERE name='View Student Profile_myChildren' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Students');end
UPDATE gibbonAction SET precedence=1 WHERE name='View Student Profile_my' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Students');end
UPDATE gibbonAction SET precedence=2 WHERE name='View Student Profile_fullNoNotes' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Students');end
UPDATE gibbonAction SET precedence=3 WHERE name='View Student Profile_full' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Students');end
ALTER TABLE `gibbonCourseClassPerson` ADD INDEX(`gibbonPersonID`);end
ALTER TABLE `gibbonCourseClassPerson` DROP INDEX `gibbonPersonID`;end
ALTER TABLE `gibbonCourseClassPerson` ADD INDEX(`gibbonPersonID`, `role`);end
ALTER TABLE `gibbonMessengerTarget` CHANGE `type` `type` ENUM('Class','Course','Roll Group','Year Group','Activity','Role','Applicants','Individuals','Houses','Role Category','Transport','Attendance','Group') CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;end
ALTER TABLE `gibbonActivityStudent` ADD INDEX(`gibbonActivityID`, `status`);end
";
//v16.0.01
++$count;
$sql[$count][0] = '16.0.01';
$sql[$count][1] = "";
//v17.0.00
++$count;
$sql[$count][0] = '17.0.00';
$sql[$count][1] = "
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='Data Updater'), 'Family Data Updater History', 0, 'Reports', 'Allows users to check, for active families, how recently they have been updated.', 'report_family_dataUpdaterHistory.php', 'report_family_dataUpdaterHistory.php', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'Y');end
INSERT INTO `gibbonPermission` (`gibbonRoleID` ,`gibbonActionID`) VALUES ('001', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Data Updater' AND gibbonAction.name='Family Data Updater History'));end
ALTER TABLE `gibbonRole` ADD `canLoginRole` ENUM('Y','N') NOT NULL DEFAULT 'Y' AFTER `type`;end
INSERT INTO `gibbonSetting` (`scope` ,`name` ,`nameDisplay` ,`description` ,`value`) VALUES ('Markbook', 'enableModifiedAssessment', 'Enable Modified Assessment', 'Allows teachers to specify \"Modified Assessment\" for students with individual needs.', 'N');end
ALTER TABLE `gibbonMarkbookEntry` ADD `modifiedAssessment` ENUM('N','Y') NULL DEFAULT NULL AFTER `gibbonPersonIDStudent`;end
DELETE FROM `gibbonSetting` WHERE `scope`='Markbook' AND `name`='wordpressCommentPush';end
INSERT INTO `gibboni18n` (`code`, `name`, `active`, `systemDefault`, `dateFormat`, `dateFormatRegEx`, `dateFormatPHP`,`rtl`) VALUES ('he_IL','Hebrew - Israel', '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', 'Y');end
UPDATE `gibboni18n` SET `name`='עברית - ישראל' WHERE `code`='he_IL';end
UPDATE gibbonPersonMedicalCondition SET gibbonPersonMedicalCondition.name=(SELECT name FROM gibbonMedicalCondition WHERE gibbonMedicalConditionID = gibbonPersonMedicalCondition.name) WHERE SUBSTRING(name, 1, 1) REGEXP '[[:digit:]]';end
UPDATE gibbonPersonMedicalConditionUpdate SET gibbonPersonMedicalConditionUpdate.name=(SELECT name FROM gibbonMedicalCondition WHERE gibbonMedicalConditionID = gibbonPersonMedicalConditionUpdate.name) WHERE SUBSTRING(name, 1, 1) REGEXP '[[:digit:]]';end
UPDATE gibbonCountry SET printable_name='Vietnam', iddCountryCode='84' WHERE printable_name='Viet Nam';end
ALTER TABLE `gibbonPersonField` ADD `activePublicRegistration` TINYINT(1) NOT NULL DEFAULT '0' AFTER `activeDataUpdater`;end
ALTER TABLE `gibbonMessengerReceipt` CHANGE `targetType` `targetType` ENUM('Class','Course','Roll Group','Year Group','Activity','Role','Applicants','Individuals','Houses','Role Category','Transport','Attendance','Group') CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL;end
UPDATE `gibbonAction` SET `category` = 'Extend & Update', `name` = 'Manage Languages' WHERE `name` = 'Language Settings' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='System Admin');end
UPDATE gibbonCountry SET printable_name='Russia', iddCountryCode='7' WHERE printable_name='Russian Federation';end
ALTER TABLE `gibboni18n` ADD `installed` ENUM('Y','N') NOT NULL DEFAULT 'N' AFTER `active`;end
ALTER TABLE `gibboni18n` ADD `version` VARCHAR(10) NULL AFTER `name`;end
UPDATE `gibbonAction` SET `name` = 'Manage Users_editDelete', `precedence` = 1 WHERE `name` = 'Manage Users' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='User 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='User Admin'), 'Manage Users_edit', 0, 'User Management', 'Allows admin to edit any user within the system, but not to delete them.', 'user_manage.php, user_manage_add.php, user_manage_edit.php, user_manage_password.php', 'user_manage.php', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'N');end
UPDATE gibbonStaff SET gibbonStaff.type=(SELECT name FROM gibbonRole WHERE gibbonRole.gibbonRoleID = gibbonStaff.type) WHERE SUBSTRING(gibbonStaff.type, 1, 1) REGEXP '[[:digit:]]';end
INSERT INTO `gibbonSetting` (`scope` ,`name` ,`nameDisplay` ,`description` ,`value`) VALUES ('Messenger', 'messageBcc', 'Message Bcc', 'Comma-separated list of recipients to bcc all messenger emails to.', '');end
ALTER TABLE `gibbonCourse` CHANGE `nameShort` `nameShort` VARCHAR(8) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '';end
ALTER TABLE `gibbonCourseClass` CHANGE `name` `name` VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '', CHANGE `nameShort` `nameShort` VARCHAR(8) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;end
ALTER TABLE `gibbonPerson` CHANGE `surname` `surname` VARCHAR(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '', CHANGE `firstName` `firstName` VARCHAR(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '', CHANGE `preferredName` `preferredName` VARCHAR(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '', CHANGE `nameInCharacters` `nameInCharacters` VARCHAR(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, CHANGE `profession` `profession` VARCHAR(90) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, CHANGE `employer` `employer` VARCHAR(90) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, CHANGE `jobTitle` `jobTitle` VARCHAR(90) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, CHANGE `emergency1Name` `emergency1Name` VARCHAR(90) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, CHANGE `emergency2Name` `emergency2Name` VARCHAR(90) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;end
ALTER TABLE `gibbonHouse` CHANGE `nameShort` `nameShort` VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;end
ALTER TABLE `gibbonCourse` CHANGE `name` `name` VARCHAR(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, CHANGE `nameShort` `nameShort` VARCHAR(12) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;end
ALTER TABLE `gibbonFamilyUpdate` ADD INDEX `gibbonFamilyIndex` (`gibbonFamilyID`,`gibbonSchoolYearID`);end
ALTER TABLE `gibbonPersonUpdate` ADD INDEX `gibbonPersonIndex` (`gibbonPersonID`,`gibbonSchoolYearID`);end
ALTER TABLE `gibbonPersonMedicalUpdate` ADD INDEX `gibbonMedicalIndex` (`gibbonPersonID`, `gibbonPersonMedicalID`,`gibbonSchoolYearID`);end
ALTER TABLE `gibbonFinanceInvoiceeUpdate` ADD INDEX `gibbonInvoiceeIndex` (`gibbonFinanceInvoiceeID`,`gibbonSchoolYearID`);end
ALTER TABLE `gibbonFamilyAdult` ADD INDEX `gibbonPersonIndex` (`gibbonPersonID`);end
ALTER TABLE `gibbonFamilyChild` ADD INDEX `gibbonPersonIndex` (`gibbonPersonID`);end
ALTER TABLE `gibbonFamilyChild` ADD INDEX `gibbonFamilyIndex` (`gibbonFamilyID`);end
ALTER TABLE `gibbonStudentEnrolment` ADD KEY `gibbonPersonIndex` (`gibbonPersonID`,`gibbonSchoolYearID`);end
UPDATE gibboni18n SET active='Y' WHERE code='he_IL';end
INSERT INTO `gibbonNotificationEvent` (`event`, `moduleName`, `actionName`, `type`, `scopes`, `active`) VALUES ('Updated Behaviour Record', 'Behaviour', 'View Behaviour Records_all', 'Core', 'All,gibbonPersonIDStudent,gibbonYearGroupID', 'Y');end
INSERT INTO `gibbonSetting` (`scope` ,`name` ,`nameDisplay` ,`description` ,`value`) VALUES ('System', 'organisationBackground', 'Background', 'Relative path to background image. Overrides theme background.', '');end
ALTER TABLE `gibbonApplicationForm` ADD `username` VARCHAR(20) NULL AFTER `gender`;end
ALTER TABLE `gibbonApplicationForm` ADD `studentID` VARCHAR(10) NULL AFTER `gibbonPaymentID`;end
ALTER TABLE `gibbonRubricColumn` ADD `visualise` ENUM('Y','N') NOT NULL DEFAULT 'Y' AFTER `gibbonScaleGradeID`;end
ALTER TABLE `gibbonPerson` CHANGE `email` `email` VARCHAR(75) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;end
ALTER TABLE `gibbonPerson` CHANGE `emailAlternate` `emailAlternate` VARCHAR(75) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;end
ALTER TABLE `gibbonPersonUpdate` CHANGE `email` `email` VARCHAR(75) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;end
ALTER TABLE `gibbonPersonUpdate` CHANGE `emailAlternate` `emailAlternate` VARCHAR(75) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;end
ALTER TABLE `gibbonStaffApplicationForm` CHANGE `email` `email` VARCHAR(75) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;end
ALTER TABLE `gibbonApplicationForm` CHANGE `email` `email` VARCHAR(75) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;end
ALTER TABLE `gibbonApplicationForm` CHANGE `parent1email` `parent1email` VARCHAR(75) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;end
ALTER TABLE `gibbonApplicationForm` CHANGE `parent2email` `parent2email` VARCHAR(75) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;end
ALTER TABLE `gibbonYearGroup` CHANGE `name` `name` VARCHAR(15) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;end
INSERT INTO `gibbonSetting` (`scope` ,`name` ,`nameDisplay` ,`description` ,`value`) SELECT 'Messenger', 'smsGateway', 'SMS Gateway', '', (CASE WHEN gibbonSetting.value <> '' THEN 'OneWaySMS' ELSE '' END) FROM `gibbonSetting` WHERE scope='Messenger' AND name='smsUsername';end
INSERT INTO `gibbonSetting` (`scope` ,`name` ,`nameDisplay` ,`description` ,`value`) SELECT 'Messenger', 'smsSenderID', 'SMS Sender ID', 'The sender name or phone number. Depends on the gateway used.', gibbonSetting.value FROM `gibbonSetting` WHERE scope='System' AND name='organisationNameShort';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'), 'Import From File', 0, 'Import & Export', 'Allows a user to view and run available imports.', 'import_manage.php,import_run.php,export_run.php,import_history.php,import_history_view.php', 'import_manage.php', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'N');end
INSERT INTO `gibbonPermission` (`gibbonRoleID` ,`gibbonActionID`) VALUES ('001', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='System Admin' AND gibbonAction.name='Import From File'));end
INSERT INTO `gibbonSetting` (`scope` ,`name` ,`nameDisplay` ,`description` ,`value`) VALUES ('System Admin', 'exportDefaultFileType', 'Default Export File Type', '', 'Excel2007');end
DELETE FROM gibbonAction WHERE name='Import Records' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Library');end
DELETE FROM gibbonAction WHERE name='Import Outcomes' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Planner');end
DELETE FROM gibbonAction WHERE name='Import External Assessments' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Formal Assessment');end
DELETE FROM gibbonAction WHERE name='Import Internal Assessments' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Formal Assessment');end
DELETE FROM gibbonAction WHERE name='Import Student Enrolment' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='User Admin');end
DELETE FROM gibbonAction WHERE name='Import Families' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='User Admin');end
DELETE FROM gibbonAction WHERE name='Import Staff' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='User Admin');end
DELETE FROM gibbonAction WHERE name='Import Users' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='User Admin');end
INSERT IGNORE INTO `gibbonLanguage` (`name`) VALUES ('Sinhala');end
INSERT INTO `gibboni18n` (`code`, `name`, `active`, `systemDefault`, `dateFormat`, `dateFormatRegEx`, `dateFormatPHP`,`rtl`) VALUES ('tr_TR','Türkçe - Türkiye', '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 gibboni18n SET active='Y' WHERE code='tr_TR';end
";
//v18.0.00
++$count;
$sql[$count][0] = '18.0.00';
$sql[$count][1] = "
DELETE FROM gibbonAction WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='Planner') AND name='Staff Likes';end
DROP TABLE gibbonLike;end
UPDATE gibboni18n SET active='Y' WHERE code='ur_IN';end
UPDATE gibboni18n SET code='ur_PK', name='پاکستان - اُردُو', active='Y' WHERE code='ur_IN';end
ALTER TABLE `gibbonActivityAttendance` CHANGE `gibbonPersonIDTaker` `gibbonPersonIDTaker` INT(10) UNSIGNED ZEROFILL NOT NULL;end
ALTER TABLE `gibbonActivityAttendance` CHANGE `gibbonPersonIDTaker` `gibbonPersonIDTaker` INT(10) UNSIGNED ZEROFILL NOT NULL;end
ALTER TABLE `gibbonApplicationForm` CHANGE `surname` `surname` VARCHAR(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '', CHANGE `firstName` `firstName` VARCHAR(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '', CHANGE `preferredName` `preferredName` VARCHAR(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '';end
ALTER TABLE `gibbonApplicationForm` CHANGE `parent1gender` `parent1gender` ENUM('M','F','Other','Unspecified') CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'Unspecified', CHANGE `parent2gender` `parent2gender` ENUM('M','F','Other','Unspecified') CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'Unspecified';end
ALTER TABLE `gibbonApplicationForm` CHANGE `parent1surname` `parent1surname` VARCHAR(60) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '', CHANGE `parent1firstName` `parent1firstName` VARCHAR(60) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '', CHANGE `parent1preferredName` `parent1preferredName` VARCHAR(60) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '', CHANGE `parent2surname` `parent2surname` VARCHAR(60) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '', CHANGE `parent2firstName` `parent2firstName` VARCHAR(60) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '', CHANGE `parent2preferredName` `parent2preferredName` VARCHAR(60) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '';end
ALTER TABLE `gibbonCountry` ADD PRIMARY KEY(`printable_name`);end
ALTER TABLE `gibbonFinanceBudgetCycleAllocation` CHANGE `gibbonFinanceBudgetID` `gibbonFinanceBudgetID` INT(4) UNSIGNED ZEROFILL NOT NULL;end
ALTER TABLE `gibbonFirstAid` CHANGE `gibbonCourseClassID` `gibbonCourseClassID` INT(8) UNSIGNED ZEROFILL NULL DEFAULT NULL;end
ALTER TABLE `gibbonMarkbookTarget` CHANGE `gibbonScaleGradeID` `gibbonScaleGradeID` INT(7) UNSIGNED ZEROFILL NULL DEFAULT NULL;end
ALTER TABLE `gibbonMessengerCannedResponse` CHANGE `gibbonPersonIDCreator` `gibbonPersonIDCreator` INT(10) UNSIGNED ZEROFILL NOT NULL;end
ALTER TABLE `gibbonOutcome` CHANGE `gibbonPersonIDCreator` `gibbonPersonIDCreator` INT(10) UNSIGNED ZEROFILL NOT NULL;end
ALTER TABLE `gibbonPersonMedicalSymptoms` CHANGE `gibbonPersonID` `gibbonPersonID` INT(10) UNSIGNED ZEROFILL NOT NULL, CHANGE `gibbonPersonIDTaker` `gibbonPersonIDTaker` INT(10) UNSIGNED ZEROFILL NOT NULL;end
ALTER TABLE `gibbonPersonUpdate` CHANGE `emergency1Name` `emergency1Name` VARCHAR(90) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, CHANGE `emergency2Name` `emergency2Name` VARCHAR(90) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, CHANGE `surname` `surname` VARCHAR(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '', CHANGE `firstName` `firstName` VARCHAR(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '', CHANGE `preferredName` `preferredName` VARCHAR(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '', CHANGE `nameInCharacters` `nameInCharacters` VARCHAR(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, CHANGE `profession` `profession` VARCHAR(90) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, CHANGE `employer` `employer` VARCHAR(90) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, CHANGE `jobTitle` `jobTitle` VARCHAR(90) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;end
ALTER TABLE `gibbonPlannerEntryStudentHomework` CHANGE `gibbonPersonID` `gibbonPersonID` INT(10) UNSIGNED ZEROFILL NOT NULL;end
ALTER TABLE `gibbonRubric` CHANGE `gibbonPersonIDCreator` `gibbonPersonIDCreator` INT(10) UNSIGNED ZEROFILL NOT NULL;end
ALTER TABLE `gibbonRubricEntry` CHANGE `gibbonRubricID` `gibbonRubricID` INT(8) UNSIGNED ZEROFILL NOT NULL;end
ALTER TABLE `gibbonStaffApplicationForm` CHANGE `surname` `surname` VARCHAR(60) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, CHANGE `firstName` `firstName` VARCHAR(60) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, CHANGE `preferredName` `preferredName` VARCHAR(60) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, CHANGE `nameInCharacters` `nameInCharacters` VARCHAR(60) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;end
ALTER TABLE `gibbonTTDayRowClass` CHANGE `gibbonSpaceID` `gibbonSpaceID` INT(10) UNSIGNED ZEROFILL NULL DEFAULT NULL;end
ALTER TABLE `gibbonTTSpaceChange` CHANGE `gibbonSpaceID` `gibbonSpaceID` INT(10) UNSIGNED ZEROFILL NULL DEFAULT NULL;end
ALTER TABLE `gibbonTTSpaceChange` CHANGE `gibbonPersonID` `gibbonPersonID` INT(10) UNSIGNED ZEROFILL NOT NULL;end
SELECT foreignKey FROM `gibbonTTSpaceBooking` LIMIT 0, 1;end
UPDATE gibboni18n SET active='Y' WHERE code='hr_HR';end
ALTER TABLE gibbonUnit DROP COLUMN embeddable;end
ALTER TABLE gibbonUnitBlock DROP COLUMN gibbonOutcomeIDList;end
ALTER TABLE gibbonUnitClassBlock DROP COLUMN gibbonOutcomeIDList;end
ALTER TABLE `gibbonTTSpaceBooking` CHANGE `foreignKey` `foreignKey` ENUM('gibbonSpaceID','gibbonLibraryItemID') NOT NULL DEFAULT 'gibbonSpaceID';end
UPDATE gibbonTTSpaceBooking SET foreignKey='gibbonSpaceID' WHERE foreignKey='';end
INSERT INTO `gibbonSetting` (`scope` ,`name` ,`nameDisplay` ,`description` ,`value`)VALUES ('System', 'mailerSMTPSecure', 'SMTP Encryption', 'Automatically sets the encryption based on the port, otherwise select one manually.', 'auto');end
UPDATE gibbonSetting SET description='Name of Google Project in Developers Console.' WHERE scope='System' AND name='googleClientName';end
INSERT INTO `gibboni18n` (`code`, `name`, `active`, `systemDefault`, `dateFormat`, `dateFormatRegEx`, `dateFormatPHP`,`rtl`) VALUES ('my_MM','မြန်မာ - မြန်မာ', '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
ALTER TABLE gibbonPlannerEntry DROP COLUMN gibbonHookID;end
ALTER TABLE `gibbonHook` CHANGE `type` `type` ENUM('Public Home Page','Student Profile','Parental Dashboard','Staff Dashboard','Student Dashboard') CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;end
DROP TABLE gibbonUnitBlockStar;end
ALTER TABLE `gibbonRollGroup` CHANGE `name` `name` VARCHAR(20) NOT NULL, CHANGE `nameShort` `nameShort` VARCHAR(8) NOT NULL;end
DELETE FROM gibbonSetting WHERE (name='prefillClass' OR name='prefillPerson') AND scope='Attendance';end
UPDATE gibbonSetting SET name='countClassAsSchool', nameDisplay='Count Class Attendance as School Attendance', description='Should attendance from the class context be used to prefill and inform school attendance?' WHERE name='prefillRollGroup' AND scope='Attendance';end
CREATE TABLE `gibbonStaffAbsenceType` (`gibbonStaffAbsenceTypeID` INT(6) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT, `name` VARCHAR(60) NULL, `nameShort` VARCHAR(10) NULL, `active` ENUM('N','Y') DEFAULT 'Y', `requiresApproval` ENUM('N','Y') DEFAULT 'N', `reasons` TEXT NULL, `sequenceNumber` INT(3) NOT NULL, PRIMARY KEY (`gibbonStaffAbsenceTypeID`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;end
CREATE TABLE `gibbonSubstitute` (`gibbonSubstituteID` INT(10) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT, `gibbonPersonID` int(10) UNSIGNED ZEROFILL NOT NULL, `active` ENUM('Y','N') DEFAULT 'Y', `type` VARCHAR(60) NULL, `details` VARCHAR(255) NULL, `priority` INT(2) NOT NULL DEFAULT '0', UNIQUE KEY `gibbonPersonID` (`gibbonPersonID`), PRIMARY KEY (`gibbonSubstituteID`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;end
CREATE TABLE `gibbonStaffAbsence` (`gibbonStaffAbsenceID` INT(14) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT, `gibbonStaffAbsenceTypeID` INT(6) UNSIGNED ZEROFILL NOT NULL, `gibbonSchoolYearID` INT(3) UNSIGNED ZEROFILL NOT NULL, `gibbonPersonID` int(10) UNSIGNED ZEROFILL NOT NULL, `reason` VARCHAR(60) NULL, `comment` TEXT NULL, `commentConfidential` TEXT NULL, `status` ENUM('Pending Approval','Approved','Declined') DEFAULT 'Approved', `coverageRequired` ENUM('N','Y') DEFAULT 'N', `gibbonPersonIDApproval` int(10) UNSIGNED ZEROFILL NULL, `timestampApproval` timestamp NULL, `notesApproval` TEXT NULL, `gibbonPersonIDCreator` int(10) UNSIGNED ZEROFILL NOT NULL, `timestampCreator` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `notificationSent` ENUM('N','Y') DEFAULT 'N', `notificationList` TEXT NULL, `gibbonGroupID` INT(8) UNSIGNED ZEROFILL NULL, `googleCalendarEventID` TEXT NULL, PRIMARY KEY (`gibbonStaffAbsenceID`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;end
CREATE TABLE `gibbonStaffAbsenceDate` (`gibbonStaffAbsenceDateID` INT(14) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT, `gibbonStaffAbsenceID` INT(14) UNSIGNED ZEROFILL NULL, `date` DATE NULL, `allDay` ENUM('N','Y') DEFAULT 'Y', `timeStart` time NULL DEFAULT NULL, `timeEnd` time NULL DEFAULT NULL, `value` DECIMAL(2,1) NOT NULL DEFAULT '1.0', PRIMARY KEY (`gibbonStaffAbsenceDateID`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;end
CREATE TABLE `gibbonStaffCoverage` (`gibbonStaffCoverageID` INT(14) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT, `gibbonStaffAbsenceID` INT(14) UNSIGNED ZEROFILL NULL, `gibbonSchoolYearID` INT(3) UNSIGNED ZEROFILL NOT NULL, `gibbonPersonID` int(10) UNSIGNED ZEROFILL NOT NULL, `status` ENUM('Requested','Accepted','Declined','Cancelled') DEFAULT 'Requested', `requestType` ENUM('Individual','Broadcast','Assigned') DEFAULT 'Broadcast', `substituteTypes` VARCHAR(255) NULL, `gibbonPersonIDStatus` int(10) UNSIGNED ZEROFILL NOT NULL, `timestampStatus` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `notesStatus` TEXT NULL, `gibbonPersonIDCoverage` int(10) UNSIGNED ZEROFILL NULL, `timestampCoverage` timestamp NULL, `notesCoverage` TEXT NULL, `attachmentType` enum('File','HTML','Link') NULL, `attachmentContent` TEXT NULL, `notificationSent` ENUM('N','Y') DEFAULT 'N', `notificationList` TEXT NULL, PRIMARY KEY (`gibbonStaffCoverageID`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;end
CREATE TABLE `gibbonStaffCoverageDate` (`gibbonStaffCoverageDateID` INT(14) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT, `gibbonStaffCoverageID` INT(14) UNSIGNED ZEROFILL NULL, `gibbonStaffAbsenceDateID` INT(14) UNSIGNED ZEROFILL NULL, `date` DATE NULL, `allDay` ENUM('N','Y') DEFAULT 'Y', `timeStart` time NULL DEFAULT NULL, `timeEnd` time NULL DEFAULT NULL, `value` DECIMAL(2,1) NOT NULL DEFAULT '1.0', `gibbonPersonIDUnavailable` INT(10) UNSIGNED ZEROFILL NULL, `reason` VARCHAR(255) NULL, PRIMARY KEY (`gibbonStaffCoverageDateID`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;end
INSERT INTO `gibbonStaffAbsenceType` (`gibbonStaffAbsenceTypeID`, `name`, `nameShort`, `active`, `requiresApproval`, `reasons`, `sequenceNumber`) VALUES (000001, 'Sick Leave', 'S', 'Y', 'N', '', 1), (000002, 'Personal Leave', 'P', 'Y', 'N', '', 2), (000003, 'Non-paid Leave', 'NP', 'Y', 'N', '', 3), (000004, 'School Related', 'D', 'Y', 'N', 'PD,Sports Trip,Offsite Event,Other', 4);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 Staff Settings', 0, 'People', 'Manage settings for the Staff module', 'staffSettings.php,staffSettings_manage_add.php,staffSettings_manage_edit.php,staffSettings_manage_delete.php', 'staffSettings.php', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'N');end
INSERT INTO `gibbonPermission` (`gibbonRoleID` ,`gibbonActionID`) VALUES ('001', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='School Admin' AND gibbonAction.name='Manage Staff Settings'));end
INSERT INTO `gibbonSetting` (`scope` ,`name` ,`nameDisplay` ,`description` ,`value`) VALUES ('Staff', 'substituteTypes', 'Substitute Types', 'A comma-separated list.', 'Internal Substitute,External Substitute');end
INSERT INTO `gibbonSetting` (`scope` ,`name` ,`nameDisplay` ,`description` ,`value`) VALUES ('Staff', 'urgencyThreshold', 'Urgency Threshold', 'Notifications in this time-span are sent immediately, day or night.', '3');end
INSERT INTO `gibbonSetting` (`scope` ,`name` ,`nameDisplay` ,`description` ,`value`) VALUES ('Staff', 'urgentNotifications', 'Urgent Notifications', 'If enabled, urgent notifications will be sent by SMS as well as email.', 'N');end
INSERT INTO `gibbonSetting` (`scope` ,`name` ,`nameDisplay` ,`description` ,`value`) VALUES ('Staff', 'absenceApprovers', 'Absence Approvers', 'Users who can approve staff absences. Leave this blank if approval is not used.', '');end
INSERT INTO `gibbonSetting` (`scope` ,`name` ,`nameDisplay` ,`description` ,`value`) VALUES ('Staff', 'absenceFullDayThreshold', 'Full Day Absence', 'The minumum number of hours for an absence to count as a full day (1.0)', '6.0');end
INSERT INTO `gibbonSetting` (`scope` ,`name` ,`nameDisplay` ,`description` ,`value`) VALUES ('Staff', 'absenceHalfDayThreshold', 'Half Day Absence', 'The minumum number of hours for an absence to count as a half day (0.5). Absences less than this count as 0', '2.0');end
INSERT INTO `gibbonSetting` (`scope` ,`name` ,`nameDisplay` ,`description` ,`value`) VALUES ('Staff', 'absenceNotificationGroups', 'Notification Groups', 'Which messenger groups can staff members send absence notifications to?', '');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 Substitutes', 0, 'Staff Management', 'Edit information for users who can provide staff coverage.', 'substitutes_manage.php,substitutes_manage_add.php,substitutes_manage_edit.php,substitutes_manage_delete.php,coverage_availability.php', 'substitutes_manage.php', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'Y');end
INSERT INTO `gibbonPermission` (`gibbonRoleID` ,`gibbonActionID`) VALUES ('001', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Staff' AND gibbonAction.name='Manage Substitutes'));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'), 'New Absence_mine', 0, 'Absences', 'Allows a user to submit their own staff absences.', 'absences_add.php', 'absences_add.php', 'Y', 'Y', 'N', 'N', 'Y', 'Y', 'N', 'N', '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='Staff'), 'New Absence_any', 2, 'Absences', 'Submit staff absences for any user.', 'absences_add.php', 'absences_add.php', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'N');end
INSERT INTO `gibbonPermission` (`gibbonRoleID` ,`gibbonActionID`) VALUES ('001', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Staff' AND gibbonAction.name='New Absence_any'));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'), 'View Absences_mine', 0, 'Absences', 'Provides an overview of staff absences for the selected user.', 'absences_view_byPerson.php,absences_view_details.php', 'absences_view_byPerson.php', 'Y', 'Y', 'N', 'N', 'Y', 'Y', 'N', 'N', '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='Staff'), 'View Absences_any', 2, 'Absences', 'Provides an overview of staff absences for the selected user.', 'absences_view_byPerson.php,absences_view_details.php', 'absences_view_byPerson.php', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'Y');end
INSERT INTO `gibbonPermission` (`gibbonRoleID` ,`gibbonActionID`) VALUES ('001', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Staff' AND gibbonAction.name='View Absences_any'));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'), 'Approve Staff Absences', 0, 'Absences', 'Allows users to approve or decline staff absences.', 'absences_approval.php,absences_approval_action.php', 'absences_approval.php', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'Y');end
INSERT INTO `gibbonPermission` (`gibbonRoleID` ,`gibbonActionID`) VALUES ('001', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Staff' AND gibbonAction.name='Approve Staff Absences'));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 Absences', 0, 'Absences', 'Allows administrators to edit and delete staff absences.', 'absences_manage.php,absences_manage_edit.php,absences_manage_edit_edit.php,absences_manage_delete.php', 'absences_manage.php', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'N');end
INSERT INTO `gibbonPermission` (`gibbonRoleID` ,`gibbonActionID`) VALUES ('001', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Staff' AND gibbonAction.name='Manage Staff Absences'));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'), 'Individual Needs Overview', 1, 'Reports', 'Provides a visual graph of individual needs school-wide.', 'report_graph_overview.php', 'report_graph_overview.php', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'Y');end
INSERT INTO `gibbonPermission` (`permissionID` ,`gibbonRoleID` ,`gibbonActionID`) VALUES (NULL , '001', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Individual Needs' AND gibbonAction.name='Individual Needs Overview'));end
INSERT INTO `gibbonAction` (`gibbonModuleID`, `name`, `precedence`, `category`, `description`, `URLList`, `entryURL`, `menuShow`, `defaultPermissionAdmin`, `defaultPermissionTeacher`, `defaultPermissionStudent`, `defaultPermissionParent`, `defaultPermissionSupport`, `categoryPermissionStaff`, `categoryPermissionStudent`, `categoryPermissionParent`, `categoryPermissionOther`) VALUES ((SELECT gibbonModuleID FROM gibbonModule WHERE name='Staff'), 'Request Coverage', 0, 'Coverage', 'Allows a staff member to request coverage for their absences.', 'coverage_request.php,coverage_view_details.php', 'coverage_request.php', 'N', 'Y', 'Y', 'N', 'N', 'Y', 'Y', 'N', 'N', 'Y');end
INSERT INTO `gibbonPermission` (`gibbonRoleID` ,`gibbonActionID`) VALUES ('001', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Staff' AND gibbonAction.name='Request Coverage'));end
INSERT INTO `gibbonSetting` (`scope`, `name`, `nameDisplay`, `description`, `value`) VALUES ('Attendance', 'crossFillClasses', 'Cross-Fill Classes', 'Should classes prefill with data from other classes?', '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='Staff'), 'My Coverage', 0, 'Coverage', 'Provides an overview of coverage for staff absences.', 'coverage_my.php,coverage_view_details.php,coverage_availability.php,coverage_view_cancel.php,coverage_view_edit.php', 'coverage_my.php', 'Y', 'Y', 'N', 'N', 'Y', 'Y', 'N', 'N', 'Y');end
INSERT INTO `gibbonPermission` (`gibbonRoleID` ,`gibbonActionID`) VALUES ('001', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Staff' AND gibbonAction.name='My Coverage'));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'), 'Open Requests', 0, 'Coverage', 'Users can view and accept any available coverage requests.', 'coverage_view.php,coverage_view_accept.php,coverage_view_decline.php', 'coverage_view.php', 'Y', 'N', 'N', 'N', 'Y', 'Y', 'N', 'N', 'Y');end
INSERT INTO `gibbonPermission` (`gibbonRoleID` ,`gibbonActionID`) VALUES ('001', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Staff' AND gibbonAction.name='Open Requests'));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 Coverage', 0, 'Coverage', 'Allows administrators to manage coverage requests.', 'coverage_manage.php,coverage_manage_add.php,coverage_manage_edit.php,coverage_manage_delete.php,coverage_view_details.php', 'coverage_manage.php', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'Y');end
INSERT INTO `gibbonPermission` (`gibbonRoleID` ,`gibbonActionID`) VALUES ('001', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Staff' AND gibbonAction.name='Manage Staff Coverage'));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'), 'Staff Absence Summary', 0, 'Reports', 'Provides an overview of staff absences for the school year.', 'report_absences_summary.php', 'report_absences_summary.php', 'Y', 'N', 'N', 'N', 'N', 'Y', 'N', 'N', 'Y');end
INSERT INTO `gibbonPermission` (`gibbonRoleID` ,`gibbonActionID`) VALUES ('001', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Staff' AND gibbonAction.name='Staff Absence Summary'));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'), 'Weekly Absences', 0, 'Reports', 'A week-by-week overview of staff absences.', 'report_absences_weekly.php', 'report_absences_weekly.php', 'Y', 'Y', 'N', 'N', 'N', 'Y', 'N', 'N', 'Y');end
INSERT INTO `gibbonPermission` (`gibbonRoleID` ,`gibbonActionID`) VALUES ('001', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Staff' AND gibbonAction.name='Weekly Absences'));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'), 'Substitute Availability', 0, 'Coverage', 'Allows users to view the availability of subs by date.', 'report_subs_availability.php', 'report_subs_availability.php', 'Y', 'Y', 'N', 'N', 'N', 'Y', 'N', 'N', 'Y');end
INSERT INTO `gibbonPermission` (`gibbonRoleID` ,`gibbonActionID`) VALUES ('001', (SELECT gibbonActionID FROM gibbonAction JOIN gibbonModule ON (gibbonAction.gibbonModuleID=gibbonModule.gibbonModuleID) WHERE gibbonModule.name='Staff' AND gibbonAction.name='Substitute Availability'));end
UPDATE gibbonAction SET category='Learn' WHERE category='Teaching & Learning' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='School Admin');end
UPDATE gibbonAction SET category='Assess' WHERE category='Assessment' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='School Admin');end
UPDATE gibbonAction SET gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='User Admin'), category='User Settings' WHERE name='Manage Students Settings' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='School Admin');end
DELETE FROM `gibbonAction` WHERE name='Manage Staff Settings' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='School Admin');end
UPDATE `gibbonAction` SET category='User Settings', URLList='staffSettings.php,staffSettings_manage_add.php,staffSettings_manage_edit.php,staffSettings_manage_delete.php' WHERE name='Manage Staff Settings' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='User Admin');end
UPDATE `gibbonAction` SET category='User Settings' WHERE name='Manage User Settings' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='User Admin');end
UPDATE `gibbonAction` SET category='User Settings' WHERE name='Data Updater Settings' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='User Admin');end
UPDATE `gibbonAction` SET name='Manage Custom Fields' WHERE name='Manage User Custom Fields' AND gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name='User Admin');end
";
//v18.0.01
++$count;
$sql[$count][0] = '18.0.01';
$sql[$count][1] = "";