source: WAeUP_SRP/branches/srpp_branch/skins/waeup_default/getWAeUPSchemas.py @ 6401

Last change on this file since 6401 was 190, checked in by joachim, 19 years ago

=fixed eligibility editing

  • Property svn:keywords set to Id
File size: 23.0 KB
Line 
1#-*- mode: python; mode: fold -*-
2# $Id: getWAeUPSchemas.py 190 2005-11-17 13:18:53Z joachim $
3
4sc_id = { ###(
5        'type': 'CPS String Field',
6        'data': {
7            'default_expr': 'string:',
8            'is_searchabletext': True,
9            'acl_read_permissions': '',
10            'acl_read_roles': '',
11            'acl_read_expr': '',
12            'acl_write_permissions': '',
13            'acl_write_roles': 'SectionReader',
14            'acl_write_expr': '',
15            'read_ignore_storage': False,
16            'read_process_expr': '',
17            'read_process_dependent_fields': (),
18            'write_ignore_storage': False,
19            'write_process_expr': '',
20            },
21        }
22###)
23
24sc_pin = { ###(
25        'type': 'CPS String Field',
26        'data': {
27            'default_expr': 'string:',
28            'is_searchabletext': True,
29            'acl_read_permissions': '',
30            'acl_read_roles': '',
31            'acl_read_expr': '',
32            'acl_write_permissions': '',
33            'acl_write_roles': 'SectionReader',
34            'acl_write_expr': '',
35            'read_ignore_storage': False,
36            'read_process_expr': '',
37            'read_process_dependent_fields': (),
38            'write_ignore_storage': False,
39            'write_process_expr': '',
40            },
41        }
42       
43###)
44
45sc_value = { ###(
46        'type': 'CPS Float Field',
47        'data': {
48            'default_expr': 'python:0.',
49            'is_searchabletext': True,
50            'acl_read_permissions': '',
51            'acl_read_roles': '',
52            'acl_read_expr': '',
53            'acl_write_permissions': '',
54            'acl_write_roles': '',
55            'acl_write_expr': '',
56            'read_ignore_storage': False,
57            'read_process_expr': '',
58            'read_process_dependent_fields': (),
59            'write_ignore_storage': False,
60            'write_process_expr': '',
61            },
62        }
63###)
64sc_date = { ###(
65        'type': 'CPS DateTime Field',
66        'data': {
67            'default_expr': 'python:500.',
68            'is_searchabletext': True,
69            'acl_read_permissions': '',
70            'acl_read_roles': '',
71            'acl_read_expr': '',
72            'acl_write_permissions': '',
73            'acl_write_roles': '',
74            'acl_write_expr': '',
75            'read_ignore_storage': False,
76            'read_process_expr': '',
77            'read_process_dependent_fields': (),
78            'write_ignore_storage': False,
79            'write_process_expr': '',
80            },
81        }
82###)
83
84university_schema = { ###(
85}
86###)
87
88students_folder_schema = { ###(
89}
90###)
91
92academics_folder_schema = { ###(
93}
94###)
95
96student_schema = { ###(
97     'jamb_is_admitted': {
98        'type': 'CPS Boolean Field',
99        'data': {
100            'default_expr': 'python:False',
101            'is_searchabletext': 0,
102            'acl_read_permissions': '',
103            'acl_read_roles': '',
104            'acl_read_expr': '',
105            'acl_write_permissions': '',
106            'acl_write_roles': '',
107            'acl_write_expr': '',
108            'read_ignore_storage': False,
109            'read_process_expr': '',
110            'read_process_dependent_fields': (),
111            'write_ignore_storage': False,
112            'write_process_expr': '',
113        },
114    },
115    'faculty': {
116        'type': 'CPS String Field',
117        'data': {
118            'default_expr': 'string:',
119            'is_searchabletext': True,
120            'acl_read_permissions': '',
121            'acl_read_roles': '',
122            'acl_read_expr': '',
123            'acl_write_permissions': '',
124            'acl_write_roles': '',
125            'acl_write_expr': '',
126            'read_ignore_storage': False,
127            'read_process_expr': '',
128            'read_process_dependent_fields': (),
129            'write_ignore_storage': False,
130            'write_process_expr': '',
131        },
132    },
133    'course': {
134        'type': 'CPS String Field',
135        'data': {
136            'default_expr': 'string:',
137            'is_searchabletext': True,
138            'acl_read_permissions': '',
139            'acl_read_roles': '',
140            'acl_read_expr': '',
141            'acl_write_permissions': '',
142            'acl_write_roles': '',
143            'acl_write_expr': '',
144            'read_ignore_storage': False,
145            'read_process_expr': '',
146            'read_process_dependent_fields': (),
147            'write_ignore_storage': False,
148            'write_process_expr': '',
149             },
150        },
151    'adm_check_sc_id' : sc_id,
152    'adm_check_sc_pin' : sc_pin,
153    'adm_check_sc_value' : sc_value,
154    'adm_check_date' : {
155        'type': 'CPS DateTime Field',
156        'data': {
157            'is_searchabletext': 0,
158        },
159    },
160    'clearance_sc_id' : sc_id,
161    'clearance_sc_pin' : sc_pin,
162    'clearance_sc_value' : sc_value,
163    'clearance_date' : {
164        'type': 'CPS DateTime Field',
165        'data': {
166            'is_searchabletext': 0,
167            'acl_write_roles': 'SectionReader',
168        },
169    },
170    'accommodation' : { ###(
171        'type': 'CPS String Field',
172        'data': {
173            'default_expr': 'string:',
174            'is_searchabletext': True,
175            'acl_read_permissions': '',
176            'acl_read_roles': '',
177            'acl_read_expr': '',
178            'acl_write_permissions': '',
179            'acl_write_roles': '',
180            'acl_write_expr': '',
181            'read_ignore_storage': False,
182            'read_process_expr': '',
183            'read_process_dependent_fields': (),
184            'write_ignore_storage': False,
185            'write_process_expr': '',
186             },
187        }, ###)
188    'accommodation_sc_id' : sc_id,
189    'accommodation_sc_pin' : sc_pin,
190    'accommodation_sc_value' : sc_value,
191    'accommodation_date' : {
192        'type': 'CPS DateTime Field',
193        'data': {
194            'is_searchabletext': 0,
195            'acl_write_roles': 'SectionReader',
196        },
197    },
198    'hostel_fee_sc_id' : sc_id,
199    'hostel_fee_sc_pin' : sc_pin,
200    'hostel_fee_sc_value' : sc_value,
201    'hostel_fee_date' : {
202        'type': 'CPS DateTime Field',
203        'data': {
204            'is_searchabletext': 0,
205            'acl_write_roles': 'SectionReader',
206        },
207    },
208}
209###)
210
211student_accommodation = { ###(
212    'sc_id': sc_id,
213    'sc_pin': sc_pin,
214    'sc_value': { ###(
215        'type': 'CPS Float Field',
216        'data': {
217            'default_expr': 'python:500.',
218            'is_searchabletext': True,
219            'acl_read_permissions': '',
220            'acl_read_roles': '',
221            'acl_read_expr': '',
222            'acl_write_permissions': '',
223            'acl_write_roles': '',
224            'acl_write_expr': '',
225            'read_ignore_storage': False,
226            'read_process_expr': '',
227            'read_process_dependent_fields': (),
228            'write_ignore_storage': False,
229            'write_process_expr': '',
230            },
231        },###)
232    'accommodation': {
233        'type': 'CPS String Field',
234        'data': {
235            'default_expr': 'string:',
236            'is_searchabletext': True,
237            'acl_read_permissions': '',
238            'acl_read_roles': '',
239            'acl_read_expr': '',
240            'acl_write_permissions': '',
241            'acl_write_roles': '',
242            'acl_write_expr': '',
243            'read_ignore_storage': False,
244            'read_process_expr': '',
245            'read_process_dependent_fields': (),
246            'write_ignore_storage': False,
247            'write_process_expr': '',
248             },
249        },
250}
251###)
252
253student_hostel_fee = { ###(
254    'sc_id': sc_id,
255    'sc_pin': sc_pin,
256    'sc_value': { ###(
257        'type': 'CPS Float Field',
258        'data': {
259            'default_expr': 'python:2500.',
260            'is_searchabletext': True,
261            'acl_read_permissions': '',
262            'acl_read_roles': '',
263            'acl_read_expr': '',
264            'acl_write_permissions': '',
265            'acl_write_roles': '',
266            'acl_write_expr': '',
267            'read_ignore_storage': False,
268            'read_process_expr': '',
269            'read_process_dependent_fields': (),
270            'write_ignore_storage': False,
271            'write_process_expr': '',
272            },
273        },###)
274    'accommodation': {
275        'type': 'CPS String Field',
276        'data': {
277            'default_expr': 'string:',
278            'is_searchabletext': True,
279            'acl_read_permissions': '',
280            'acl_read_roles': '',
281            'acl_read_expr': '',
282            'acl_write_permissions': '',
283            'acl_write_roles': '',
284            'acl_write_expr': '',
285            'read_ignore_storage': False,
286            'read_process_expr': '',
287            'read_process_dependent_fields': (),
288            'write_ignore_storage': False,
289            'write_process_expr': '',
290             },
291        },
292}
293###)
294
295student_admission = { ###(
296    'sc_id': sc_id,
297    'sc_pin': sc_pin,
298    'sc_value': { ###(
299        'type': 'CPS Float Field',
300        'data': {
301            'default_expr': 'python:300.',
302            'is_searchabletext': True,
303            'acl_read_permissions': '',
304            'acl_read_roles': '',
305            'acl_read_expr': '',
306            'acl_write_permissions': '',
307            'acl_write_roles': '',
308            'acl_write_expr': '',
309            'read_ignore_storage': False,
310            'read_process_expr': '',
311            'read_process_dependent_fields': (),
312            'write_ignore_storage': False,
313            'write_process_expr': '',
314            },
315        },###)
316    'reg_nr': {
317        'type': 'CPS String Field',
318        'data': {
319            'default_expr': 'string:',
320            'is_searchabletext': True,
321        },
322    },
323}
324###)
325
326student_clearance = { ###(
327    'sc_id': sc_id,
328    'sc_pin': sc_pin,
329    'sc_value': { ###(
330        'type': 'CPS Float Field',
331        'data': {
332            'default_expr': 'python:800.',
333            'is_searchabletext': True,
334            'acl_read_permissions': '',
335            'acl_read_roles': '',
336            'acl_read_expr': '',
337            'acl_write_permissions': '',
338            'acl_write_roles': '',
339            'acl_write_expr': '',
340            'read_ignore_storage': False,
341            'read_process_expr': '',
342            'read_process_dependent_fields': (),
343            'write_ignore_storage': False,
344            'write_process_expr': '',
345            },
346        },###)
347    'reg_nr': {
348        'type': 'CPS String Field',
349        'data': {
350            'default_expr': 'string:',
351            'is_searchabletext': True,
352        },
353    },
354    'lastname': {
355        'type': 'CPS String Field',
356        'data': {
357            'default_expr': 'string:',
358            'is_searchabletext': True,
359            'acl_read_permissions': '',
360            'acl_read_roles': '',
361            'acl_read_expr': '',
362            'acl_write_permissions': '',
363            'acl_write_roles': '',
364            'acl_write_expr': '',
365            'read_ignore_storage': False,
366            'read_process_expr': '',
367            'read_process_dependent_fields': (),
368            'write_ignore_storage': False,
369            'write_process_expr': '',
370             },
371        },
372}###)
373
374study_level = { ###(
375    'sc_id': sc_id,
376    'sc_pin': sc_pin,
377    'sc_value': { ###(
378        'type': 'CPS Float Field',
379        'data': {
380            'default_expr': 'python:1000.',
381            'is_searchabletext': True,
382            'acl_read_permissions': '',
383            'acl_read_roles': '',
384            'acl_read_expr': '',
385            'acl_write_permissions': '',
386            'acl_write_roles': '',
387            'acl_write_expr': '',
388            'read_ignore_storage': False,
389            'read_process_expr': '',
390            'read_process_dependent_fields': (),
391            'write_ignore_storage': False,
392            'write_process_expr': '',
393            },
394        },###)
395}
396###)
397
398student_personal_schema = { ###(
399     'firstname': {
400        'type': 'CPS String Field',
401        'data': {
402            'is_searchabletext': 1,
403        },
404    },
405    'middlename': {
406        'type': 'CPS String Field',
407        'data': {
408            'is_searchabletext': 1,
409        },
410    },
411     'lastname': {
412        'type': 'CPS String Field',
413        'data': {
414            'is_searchabletext': 1,
415        },
416    },
417     'username': {
418        'type': 'CPS String Field',
419        'data': {
420            'is_searchabletext': 1,
421        },
422    },
423     'email': {
424        'type': 'CPS String Field',
425        'data': {
426            'is_searchabletext': 1,
427        },
428    },
429     'sex': {
430        'type': 'CPS Boolean Field',
431        'default_expr': 'python:True',
432        'data': {
433            'is_searchabletext': 0,
434        },
435    },
436     'birthday': {
437        'type': 'CPS DateTime Field',
438        'data': {
439            'is_searchabletext': 0,
440        },
441    },
442     'age': {
443        'type': 'CPS DateTime Field',
444        'data': {
445            'is_searchabletext': 0,
446        },
447    },
448}
449###)
450
451student_eligibility = { ###(
452}###)
453
454student_documents = { ###(
455     'photo': {
456        'type': 'CPS Image Field',
457        'data': {
458            'is_searchabletext': 0,
459        },
460    },
461     'birth_certificate': {
462        'type': 'CPS Image Field',
463        'data': {
464            'is_searchabletext': 0,
465        },
466    },
467     'passport': {
468        'type': 'CPS Image Field',
469        'data': {
470            'is_searchabletext': 0,
471        },
472    },
473     'results_first': {
474        'type': 'CPS Image Field',
475        'data': {
476            'is_searchabletext': 0,
477        },
478    },
479     'results_second': {
480        'type': 'CPS Image Field',
481        'data': {
482            'is_searchabletext': 0,
483        },
484    },
485}
486###)
487
488student_eligibility = { ###(
489    'reg_nr': {
490        'type': 'CPS String Field',
491        'data': {
492            'default_expr': 'string:',
493            'is_searchabletext': True,
494        },
495    },
496    'jamb_results': {
497        'type': 'CPS String Field',
498        'data': {
499            'default_expr': 'string:',
500        },
501    },
502    'jamb_aggregate': {
503        'type': 'CPS String Field',
504        'data': {
505            'is_searchabletext': False,
506        },
507    },
508    'faculty': {
509        'type': 'CPS String Field',
510        'data': {
511            'default_expr': 'string:',
512            'is_searchabletext': False,
513        },
514    },
515    'course': {
516        'type': 'CPS String Field',
517        'data': {
518            'default_expr': 'string:',
519            'is_searchabletext': False,
520        },
521    },
522    'jamb_listing_date': {
523        'type': 'CPS DateTime Field',
524        'data': {
525            'is_searchabletext': False,
526        },
527    },
528    'schoolresults': { ###(
529        'type': 'CPS List List Field',
530        'data': {
531            'is_searchabletext': False,
532            },
533        },###)
534}
535###)
536
537jamb_schema = { ###(
538    'reg_nr': {
539        'type': 'CPS String Field',
540        'data': {
541            'default_expr': 'string:',
542            'is_searchabletext': True,
543        },
544    },
545    'admission_sc_id': {
546        'type': 'CPS String Field',
547        'data': {
548            'is_searchabletext': True,
549        },
550    },
551    'admission_sc_pin': {
552        'type': 'CPS String Field',
553        'data': {
554            'is_searchabletext': True,
555        },
556    },
557    'admission_sc_pin_usage': {
558        'type': 'CPS Int Field',
559        'data': {
560            'default_expr': 'python:0',
561            'is_searchabletext': False,
562            },
563    },
564     'firstname': {
565        'type': 'CPS String Field',
566        'data': {
567            'is_searchabletext': 1,
568        },
569    },
570    'middlename': {
571        'type': 'CPS String Field',
572        'data': {
573            'is_searchabletext': 1,
574        },
575    },
576     'lastname': {
577        'type': 'CPS String Field',
578        'data': {
579            'is_searchabletext': 1,
580        },
581    },
582    'age': {
583        'type': 'CPS Int Field',
584        'data': {
585            'default_expr': 'python:20',
586            'is_searchabletext': False,
587        },
588    },
589    'sex': {
590        'type': 'CPS Boolean Field',
591        'data': {
592            'default_expr': 'python:0',
593            'is_searchabletext': False,
594        },
595    },
596    'state': {
597        'type': 'CPS String Field',
598        'data': {
599            'default_expr': 'string:',
600            'is_searchabletext': False,
601        },
602    },
603    'exam_results': {
604        'type': 'CPS String Field',
605        'data': {
606            'default_expr': 'string:',
607        },
608    },
609    'aggregate': {
610        'type': 'CPS String Field',
611        'data': {
612            'default_expr': 'string:',
613            'is_searchabletext': False,
614        },
615    },
616    'faculty': {
617        'type': 'CPS String Field',
618        'data': {
619            'default_expr': 'string:',
620            'is_searchabletext': False,
621        },
622    },
623    'course': {
624        'type': 'CPS String Field',
625        'data': {
626            'default_expr': 'string:',
627            'is_searchabletext': False,
628        },
629    },
630    'listing_date': {
631        'type': 'CPS DateTime Field',
632        'data': {
633            'is_searchabletext': False,
634        },
635    },
636##    '2nd_choice': { ###(
637##        'type': 'CPS String Field',
638##        'data': {
639##            'default_expr': 'string:',
640##            'is_searchabletext': False,
641##            'acl_read_permissions': '',
642##            'acl_read_roles': '',
643##            'acl_read_expr': '',
644##            'acl_write_permissions': '',
645##            'acl_write_roles': '',
646##            'acl_write_expr': '',
647##            'read_ignore_storage': False,
648##            'read_process_expr': '',
649##            'read_process_dependent_fields': (),
650##            'write_ignore_storage': False,
651##            'write_process_expr': '',
652##        },
653##    },
654##    '3rd_choice': {
655##        'type': 'CPS String Field',
656##        'data': {
657##            'default_expr': 'string:',
658##            'is_searchabletext': True,
659##            'acl_read_permissions': '',
660##            'acl_read_roles': '',
661##            'acl_read_expr': '',
662##            'acl_write_permissions': '',
663##            'acl_write_roles': '',
664##            'acl_write_expr': '',
665##            'read_ignore_storage': False,
666##            'read_process_expr': '',
667##            'read_process_dependent_fields': (),
668##            'write_ignore_storage': False,
669##            'write_process_expr': '',
670##        },
671##    },
672###)
673}
674
675
676###)
677
678course_results_schema = { ###(
679     'points': {
680        'type': 'CPS Int Field',
681        'data': {
682            'is_searchabletext': 0,
683        },
684    },
685     'grade': {
686        'type': 'CPS String Field',
687        'data': {
688            'is_searchabletext': 0,
689        },
690    },
691}
692#
693###)
694
695faculty_schema = { ###(
696}###)
697
698department_schema = { ###(
699}###)
700
701course_schema = { ###(
702##    'Title': {
703##        'type': 'CPS String Field',
704##        'data': {
705##            'default_expr': '',
706##            'is_searchabletext': True,
707##        },
708##    },
709    'heading': {
710        'type': 'CPS String Field',
711        'data': {
712            'is_searchabletext': True,
713        },
714    },
715    'text': {
716        'type': 'CPS String Field',
717        'data': {
718            'is_searchabletext': True,
719        },
720    },
721    'level': {
722        'type': 'CPS String Field',
723        'data': {
724            'default_expr': 'string:',
725            'is_searchabletext': True,
726        },
727    },
728    'code': {
729        'type': 'CPS String Field',
730        'data': {
731            'default_expr': 'string:',
732            'is_searchabletext': True,
733        },
734    },
735    'semester': {
736        'type': 'CPS Boolean Field',
737        'data': {
738            'default_expr': 'python:True',
739            'is_searchabletext': False,
740        },
741    },
742    'credit': {
743        'type': 'CPS Int Field',
744        'data': {
745            'default_expr': 'string:',
746            'is_searchabletext': False,
747        },
748    },
749    'core_elective': {
750        'type': 'CPS Boolean Field',
751        'data': {
752            'default_expr': 'python:True',
753            'is_searchabletext': False,
754        },
755    },
756}###)
757
758accommodation = { ###(
759    'heading': {
760        'type': 'CPS String Field',
761        'data': {
762            'is_searchabletext': True,
763        },
764    },
765    'text': {
766        'type': 'CPS String Field',
767        'data': {
768            'is_searchabletext': True,
769        },
770    },
771    'which_sex': {
772        'type': 'CPS Boolean Field',
773        'data': {
774            'is_searchabletext': True,
775        },
776    },
777    'nr_of_blocks': {
778        'type': 'CPS Int Field',
779        'data': {
780            'is_searchabletext': False,
781        },
782    },
783    'nr_of_floors': {
784        'type': 'CPS Int Field',
785        'data': {
786            'is_searchabletext': False,
787        },
788    },
789    'rooms_per_floor': {
790        'type': 'CPS Int Field',
791        'data': {
792            'is_searchabletext': False,
793        },
794    },
795    'beds_per_room': {
796        'type': 'CPS Int Field',
797        'data': {
798            'is_searchabletext': False,
799        },
800    },
801    'beds_assigned': {
802        'type': 'CPS Int Field',
803        'data': {
804            'is_searchabletext': False,
805        },
806    },
807    'beds_assigned_list': {
808        'type': 'CPS String List Field',
809        'data': {
810            'is_searchabletext': False,
811        },
812    },
813}###)
814
815##scratch_card = { ###(
816####   'allow_discussion': {
817####        'type': 'CPS Int Field',
818####        'data': {
819####            'default_expr': 'python:0',
820####            'is_searchabletext': 0,
821####            },
822####        },
823##     'sc_id': {
824##        'type': 'CPS String Field',
825##        'data': {
826##            'default_expr': '',
827##            'is_searchabletext': 0,
828##            'acl_read_permissions': '',
829##            'acl_read_roles': '',
830##            'acl_read_expr': '',
831##            'acl_write_permissions': '',
832##            'acl_write_roles': '',
833##            'acl_write_expr': '',
834##            'read_ignore_storage': False,
835##            'read_process_expr': '',
836##            'read_process_dependent_fields': (),
837##            'write_ignore_storage': False,
838##            'write_process_expr': '',
839##        },
840##    },
841##     'sc_pin': {
842##        'type': 'CPS String Field',
843##        'data': {
844##            'default_expr': '',
845##            'is_searchabletext': 0,
846##            'acl_read_permissions': '',
847##            'acl_read_roles': '',
848##            'acl_read_expr': '',
849##            'acl_write_permissions': '',
850##            'acl_write_roles': '',
851##            'acl_write_expr': '',
852##            'read_ignore_storage': False,
853##            'read_process_expr': '',
854##            'read_process_dependent_fields': (),
855##            'write_ignore_storage': False,
856##            'write_process_expr': '',
857##        },
858##    },
859##}
860###)
861
862schemas = {}
863
864schemas['university'] = university_schema
865schemas['academics'] = academics_folder_schema
866schemas['students'] = students_folder_schema
867schemas['student'] = student_schema
868schemas['student_admission'] = student_admission
869schemas['student_clearance'] = student_clearance
870schemas['student_eligibility'] = student_eligibility
871schemas['student_documents'] = student_documents
872schemas['student_accommodation'] = student_accommodation
873schemas['student_hostel_fee'] = student_hostel_fee
874schemas['study_level'] = study_level
875schemas['course_results'] = course_results_schema
876schemas['student_personal'] = student_personal_schema
877schemas['accommodation'] = accommodation
878schemas['jamb'] = jamb_schema
879#schemas['scratch_card'] = scratch_card
880schemas['faculty'] = faculty_schema
881schemas['department'] = department_schema
882schemas['course'] = course_schema
883
884return schemas
Note: See TracBrowser for help on using the repository browser.