Changeset 68 for waeup_product/trunk
- Timestamp:
- 21 Oct 2005, 11:40:21 (19 years ago)
- Location:
- waeup_product/trunk
- Files:
-
- 3 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup_product/trunk/Extensions/install.py
r60 r68 225 225 'Jamb': 'waeup_section_wf', 226 226 'ScratchCard': 'waeup_section_wf', 227 'Faculty': 'waeup_section_wf', 228 'Department': 'waeup_section_wf', 229 'Course': 'waeup_section_wf', 227 230 } 228 231 -
waeup_product/trunk/University.py
r46 r68 20 20 portal_type = meta_type 21 21 security = ClassSecurityInfo() 22 23 security.declarePublic('getStudentFolder')24 def getStudentsFolder(self):25 "return the studentsfolder"26 ## data = self._data27 ## print data.items()28 print self.contentItems()29 print self.contentValues()30 print self.contentIds()31 print self.listFolderContents()32 print self.getContent().objectItems()33 22 34 23 InitializeClass(University) -
waeup_product/trunk/__init__.py
r59 r68 7 7 import University 8 8 import Students 9 import Faculty 9 10 import Widgets 10 11 11 12 fti = (Students.student_fti, 12 ) 13 Faculty.faculty_fti, 14 Faculty.department_fti, 15 Faculty.course_fti, 16 ) 13 17 contentClasses = (University.University, 14 18 Students.StudentsFolder, 15 19 Students.Student, 20 Faculty.Faculty, 21 Faculty.Department, 22 Faculty.Course, 16 23 ) 17 24 … … 19 26 Students.addStudentsFolder, 20 27 Students.addStudent, 28 Faculty.addFaculty, 29 Faculty.addDepartment, 30 Faculty.addCourse, 21 31 ) 22 32 -
waeup_product/trunk/skins/waeup_default/getWAeUPLayouts.py
r57 r68 390 390 }, 391 391 } 392 393 394 ###) 392 ###) 393 394 jamb_id = { 395 'type': 'StudentId Widget', 396 'data': { 397 'title': 'Registration Number', 398 'fields': ('reg_nr'), 399 'is_required': True, 400 'label': 'Registration Number', 401 'label_edit': 'Registration Number', 402 'description': '', 403 'help': 'This is the combination of 8 digits and 2 letters you are assigned when you purchase an examination form.', 404 'is_i18n': False, 405 'readonly_layout_modes': (), 406 'hidden_layout_modes': (), 407 'hidden_readonly_layout_modes': (), 408 'hidden_empty': False, 409 'hidden_if_expr': '', 410 'css_class': '', 411 'widget_mode_expr': '', 412 'display_width': 10, 413 'size_max': 10, 414 }, 415 } 395 416 396 417 admission = { ###( … … 440 461 }, 441 462 }, 442 'jamb_id': { 443 'type': 'StudentId Widget', 444 'data': { 445 'title': 'Registration Number', 446 'fields': ('reg_nr'), 447 'is_required': True, 448 'label': 'Registration Number', 449 'label_edit': 'Registration Number', 450 'description': '', 451 'help': 'This is the combination of 8 digits and 2 letters you are assigned when you purchase an examination form.', 452 'is_i18n': False, 453 'readonly_layout_modes': (), 454 'hidden_layout_modes': (), 455 'hidden_readonly_layout_modes': (), 456 'hidden_empty': False, 457 'hidden_if_expr': '', 458 'css_class': '', 459 'widget_mode_expr': '', 460 'display_width': 10, 461 'size_max': 10, 462 }, 463 }, 463 'jamb_id' : jamb_id, 464 464 }, 465 465 'layout': { … … 474 474 }, 475 475 } 476 476 ###) 477 478 admission_status = { ###( 479 'widgets': { 480 'quick_search': { 481 'type': 'String Widget', 482 'data': { 483 'title': 'A search string', 484 'fields': ('admission_sc_id',), 485 'is_required': False, 486 'label': 'Quick Search', 487 'label_edit': 'Quick Search', 488 'description': 'Search', 489 'help': '', 490 'is_i18n': False, 491 'readonly_layout_modes': (), 492 'hidden_layout_modes': (), 493 'hidden_readonly_layout_modes': (), 494 'hidden_empty': False, 495 'hidden_if_expr': 'python:0', 496 'css_class': '', 497 'widget_mode_expr': '', 498 'display_width': 20, 499 'size_max': 0, 500 }, 501 }, 502 503 }, 504 'layout': { 505 'style_prefix': 'layout_admission_status_', 506 'flexible_widgets': (), 507 'ncols': 2, 508 'rows': [ 509 [{'widget_id': 'quick_search', 'ncols': 2},], 510 ] 511 }, 512 } 477 513 ###) 478 514 … … 830 866 ###) 831 867 868 course = { ###( 869 'widgets': { 870 'title': { 871 'type': 'String Widget', 872 'data': { 873 'title': '', 874 'fields': ('title',), 875 'is_required': True, 876 'label': 'Title', 877 'label_edit': 'Title', 878 'description': '', 879 'help': '', 880 'is_i18n': False, 881 'display_width': 10, 882 'size_max': 0, 883 }, 884 }, 885 'level': { 886 'type': 'String Widget', 887 'data': { 888 'title': '', 889 'fields': ('level',), 890 'is_required': True, 891 'label': 'Level', 892 'label_edit': 'Level', 893 'description': '', 894 'help': '', 895 'is_i18n': False, 896 'display_width': 10, 897 'size_max': 0, 898 }, 899 }, 900 'code': { 901 'type': 'String Widget', 902 'data': { 903 'title': 'Code', 904 'fields': ('code',), 905 'is_required': True, 906 'label': 'Code', 907 'label_edit': 'Code', 908 'description': '', 909 'help': '', 910 'is_i18n': False, 911 'display_width': 10, 912 'size_max': 0, 913 }, 914 }, 915 'semester': { 916 'type': 'Boolean Widget', 917 'data': { 918 'title': '', 919 'fields': ('semester',), 920 'is_required': True, 921 'label': 'Semester', 922 'label_edit': 'Semester', 923 'label_false': 'Second Semester', 924 'label_true': 'First Semester', 925 'description': '', 926 'help': '', 927 'is_i18n': False, 928 'display_width': 10, 929 'size_max': 0, 930 }, 931 }, 932 'credit': { 933 'type': 'Int Widget', 934 'data': { 935 'title': '', 936 'fields': ('credit',), 937 'is_required': True, 938 'label': 'Credit', 939 'label_edit': 'Credit', 940 'description': '', 941 'help': '', 942 'is_i18n': False, 943 'display_width': 10, 944 'size_max': 0, 945 }, 946 }, 947 'core_elective': { 948 'type': 'Boolean Widget', 949 'data': { 950 'title': '', 951 'fields': ('core_elective',), 952 'is_required': True, 953 'label': 'Core or elective', 954 'label_edit': 'Core or elective', 955 'label_true': 'Core Course', 956 'label_false': 'Elective Course', 957 'description': '', 958 'help': '', 959 'is_i18n': False, 960 'display_width': 10, 961 'size_max': 0, 962 }, 963 }, 964 }, 965 'layout': { 966 'style_prefix': 'layout_default_', 967 'flexible_widgets': (), 968 'ncols': 1, 969 'rows': [ 970 [{'widget_id': 'title', 'ncols': 1},], 971 [{'widget_id': 'level', 'ncols': 1},], 972 [{'widget_id': 'code', 'ncols': 1},], 973 [{'widget_id': 'semester', 'ncols': 1},], 974 [{'widget_id': 'credit', 'ncols': 1},], 975 [{'widget_id': 'core_elective', 'ncols': 1},], 976 ] 977 }, 978 } 979 ###) 980 832 981 layouts = {} 833 982 layouts['waeup_common'] = common_layout … … 838 987 layouts['jambcreate'] = jamb_layoutcreate 839 988 layouts['jamb'] = jamb_layout 989 layouts['course'] = course 990 layouts['admission_status'] = admission_status 840 991 return layouts -
waeup_product/trunk/skins/waeup_default/getWAeUPSchemas.py
r57 r68 3 3 4 4 university_schema = { ###( 5 ## 'allow_discussion': { 6 ## 'type': 'CPS Int Field', 7 ## 'data': { 8 ## 'default_expr': 'python:0', 9 ## 'is_searchabletext': 0, 10 ## }, 11 ## }, 12 } 13 5 } 14 6 ###) 15 7 16 8 students_folder_schema = { ###( 17 ## 'allow_discussion': { 18 ## 'type': 'CPS Int Field', 19 ## 'data': { 20 ## 'default_expr': 'python:0', 21 ## 'is_searchabletext': 0, 22 ## }, 23 ## }, 24 } 25 9 } 26 10 ###) 27 11 28 12 student_schema = { ###( 29 ## 'allow_discussion': {30 ## 'type': 'CPS Int Field',31 ## 'data': {32 ## 'default_expr': 'python:0',33 ## 'is_searchabletext': 0,34 ## },35 ## },36 13 'jamb_is_admitted': { 37 14 'type': 'CPS Boolean Field', … … 75 52 76 53 student_personal_schema = { ###( 77 ## 'allow_discussion': {78 ## 'type': 'CPS Int Field',79 ## 'data': {80 ## 'default_expr': 'python:0',81 ## 'is_searchabletext': 0,82 ## },83 ## },84 54 'firstname': { 85 55 'type': 'CPS String Field', … … 102 72 'sex': { 103 73 'type': 'CPS Boolean Field', 74 'default_expr': 'python:True', 104 75 'data': { 105 76 'is_searchabletext': 1, … … 128 99 129 100 jamb_schema = { ###( 130 'allow_discussion': {131 'type': 'CPS Int Field',132 'data': {133 'default_expr': 'python:0',134 'is_searchabletext': 0,135 },136 },137 101 'reg_nr': { 138 102 'type': 'CPS String Field', … … 267 231 268 232 ###) 233 234 faculty_schema = { ###( 235 }###) 236 237 department_schema = { ###( 238 }###) 239 240 course_schema = { ###( 241 'level': { 242 'type': 'CPS String Field', 243 'data': { 244 'default_expr': 'string:', 245 'is_searchabletext': True, 246 }, 247 }, 248 'code': { 249 'type': 'CPS String Field', 250 'data': { 251 'default_expr': 'string:', 252 'is_searchabletext': True, 253 }, 254 }, 255 'semester': { 256 'type': 'CPS Boolean Field', 257 'data': { 258 'default_expr': 'python:True', 259 'is_searchabletext': False, 260 }, 261 }, 262 'credit': { 263 'type': 'CPS Int Field', 264 'data': { 265 'default_expr': 'string:', 266 'is_searchabletext': False, 267 }, 268 }, 269 'core_elective': { 270 'type': 'CPS Boolean Field', 271 'data': { 272 'default_expr': 'python:True', 273 'is_searchabletext': False, 274 }, 275 }, 276 }###) 269 277 270 278 ##scratch_card = { ###( … … 321 329 schemas['student_personal'] = student_personal_schema 322 330 schemas['jamb'] = jamb_schema 331 schemas['course'] = course_schema 323 332 #schemas['scratch_card'] = scratch_card 324 333 -
waeup_product/trunk/skins/waeup_default/getWAeUPTypes.py
r57 r68 19 19 'global_allow': 1, 20 20 'filter_content_types': 1, 21 'allowed_content_types': ('StudentsFolder' ),21 'allowed_content_types': ('StudentsFolder','Faculty'), 22 22 'allow_discussion': 0, 23 23 'cps_is_searchable': 1, … … 111 111 ) 112 112 } 113 114 113 ###) 115 114 … … 146 145 ) 147 146 } 148 149 147 ###) 150 148 … … 225 223 'cps_workspace_wf': 'workspace_content_wf', 226 224 'cps_section_wf': 'section_content_wf', 227 } 228 225 'actions_add': ( 226 {'id': 'view', 227 'name': 'action_view', 228 'action': 'string:${object_url}/jamb_index_html', 229 #'action': 'string:${object_url}/cpsdocument_view', 230 'condition': '', 231 'permission': ('View',), 232 'category': 'object', 233 'visible': True,}, 234 ) 235 } 229 236 ###) 230 237 … … 252 259 'cps_workspace_wf': 'workspace_content_wf', 253 260 'cps_section_wf': 'section_content_wf', 254 } 255 ###) 256 257 faculty_folder_type = { ###( 258 'title': 'WAeUP Folder for faculties', 259 'description': 'The WAeUP Faculties Folder', 261 'actions_add': ( 262 {'id': 'view', 263 'name': 'action_view', 264 'action': 'string:${object_url}/jamb_index_html', 265 #'action': 'string:${object_url}/cpsdocument_view', 266 'condition': '', 267 'permission': ('View',), 268 'category': 'object', 269 'visible': True,}, 270 ) 271 } 272 ###) 273 274 faculty_type = { ###( 275 'title': 'WAeUP Faculty', 276 'description': '', 260 277 'content_icon': '', 261 'content_meta_type': 'FacultiesFolder', 262 'product': 'CPSDefault', 263 'factory': 'addFolder', 264 'immediate_view': 'folder_view', 265 'global_allow': 1, 266 'filter_content_types': 1, 267 'allowed_content_types': ('Faculty'), 268 'allow_discussion': 0, 269 'cps_is_searchable': 1, 270 'cps_display_as_document_in_listing': 1, 271 'cps_proxy_type': 'folder', 272 'schemas': ['metadata', 'common', 'folder'], 273 'layouts': ['waeup_common','folder'], 274 'layout_clusters': ['metadata:metadata'], 275 'cps_section_wf': 'waeup_section_wf', 276 'actions': ({'id': 'view', 277 'name': 'action_view', 278 'action': 'folder_view', 279 'permissions': (View,)}, 280 {'id': 'new_content', 281 'name': 'action_new_content', 282 'action': 'folder_factories', 283 'permissions': (AddPortalContent,)}, 284 {'id': 'contents', 285 'name': 'action_folder_contents', 286 'action': 'folder_contents', 287 'permissions': (ModifyPortalContent,)}, 288 {'id': 'edit', 289 'name': 'action_edit', 290 'action': 'cpsdocument_edit_form', 291 'permissions': (ModifyPortalContent,)}, 292 {'id': 'metadata', 293 'name': 'action_metadata', 294 'action': 'cpsdocument_metadata', 295 'condition': 'not:portal/portal_membership/isAnonymousUser', 296 'permissions': (View,)}, 297 {'id': 'localroles', 298 'name': 'action_local_roles', 299 'action': 'folder_localrole_form', 300 'permissions': (ChangePermissions,)}, 301 ) 278 'content_meta_type': 'Student', 279 'product': 'WAeUP', 280 'factory': 'addFaculty', 281 'immediate_view': 'cpsdocument_view', 282 'global_allow': True, 283 'filter_content_types': True, 284 'allowed_content_types': ('Department'), 285 'allow_discussion': False, 286 'cps_is_searchable': True, 287 'cps_proxy_type': 'document', 288 'cps_display_as_document_in_listing': True, 289 'schemas': ['metadata','common','faculty'], 290 'layouts': ['waeup_common','faculty'], 291 'flexible_layouts': (), 292 'layout_clusters': ['metadata:metadata'], 293 'cps_section_wf': 'waeup_section_wf', 294 'use_content_status_history': 0, 295 'actions_add': ( 296 {'id': 'view', 297 'name': 'action_view', 298 'action': 'string:${object_url}/faculty_index_html', 299 'condition': '', 300 'permission': ('View',), 301 'category': 'object', 302 'visible': True,}, 303 ) 304 } 305 ###) 306 307 department_type = { ###( 308 'title': 'WAeUP Department', 309 'description': '', 310 'content_icon': 'student.gif', 311 'content_meta_type': 'Department', 312 'product': 'WAeUP', 313 'factory': 'addDepartment', 314 'immediate_view': 'cpsdocument_view', 315 'global_allow': True, 316 'filter_content_types': True, 317 'allowed_content_types': ('Student','Course'), 318 'allow_discussion': False, 319 'cps_is_searchable': True, 320 'cps_proxy_type': 'document', 321 'cps_display_as_document_in_listing': True, 322 'schemas': ['metadata','common','department'], 323 'layouts': ['waeup_common','department'], 324 'flexible_layouts': (), 325 'layout_clusters': ['metadata:metadata'], 326 'cps_section_wf': 'waeup_section_wf', 327 'use_content_status_history': 0, 328 'actions_add': ( 329 {'id': 'view', 330 'name': 'action_view', 331 'action': 'string:${object_url}/deparment_index_html', 332 'condition': '', 333 'permission': ('View',), 334 'category': 'object', 335 'visible': True,}, 336 ) 337 } 338 ###) 339 340 course_type = { ###( 341 'title': 'WAeUP Course', 342 'description': '', 343 'content_icon': 'student.gif', 344 'content_meta_type': 'Course', 345 'product': 'WAeUP', 346 'factory': 'addCourse', 347 'immediate_view': 'cpsdocument_view', 348 'global_allow': True, 349 'filter_content_types': True, 350 'allowed_content_types': (), 351 'allow_discussion': False, 352 'cps_is_searchable': True, 353 'cps_proxy_type': 'document', 354 'cps_display_as_document_in_listing': True, 355 'schemas': ['metadata','common','student'], 356 'layouts': ['waeup_common','student'], 357 'flexible_layouts': (), 358 'layout_clusters': ['metadata:metadata'], 359 'cps_section_wf': 'waeup_section_wf', 360 'use_content_status_history': 0, 361 'actions_add': ( 362 {'id': 'view', 363 'name': 'action_view', 364 'action': 'string:${object_url}/course_index_html', 365 'condition': '', 366 'permission': ('View',), 367 'category': 'object', 368 'visible': True,}, 369 ) 302 370 } 303 371 ###) … … 310 378 types['ScratchCard'] = scratch_card 311 379 types['Jamb'] = jamb_type 380 types['Faculty'] = faculty_type 381 types['Department'] = department_type 382 types['Course'] = course_type 312 383 313 384 return types -
waeup_product/trunk/skins/waeup_default/portlet_studentnavigation.pt
r65 r68 15 15 </tal:block> 16 16 <tal:block condition="anonymous"> 17 <span> </span>18 17 </tal:block> 19 18 </tal:block> -
waeup_product/trunk/skins/waeup_student/students_folder_view.py
r57 r68 9 9 member = context.portal_membership.getAuthenticatedMember() 10 10 if member: 11 if 'Student ' in member.getGroups():11 if 'Students' in member.getGroups(): 12 12 return context.students_folder_view_students(psm=psm,groups=groups) 13 if 'Student sManager' in member.getGroups():13 if 'StudentManager' in member.getGroups(): 14 14 return context.students_folder_view_manager(psm=psm,groups=groups) 15 15 return context.students_folder_view_anon(psm=psm,groups=groups) -
waeup_product/trunk/skins/waeup_student/students_folder_view_anon.pt
r57 r68 17 17 items here/contentValues" 18 18 > 19 <span tal:condition="python: mtool.isAnonymousUser()"> 20 Please login or <a href="" tal:attributes="href string:${context/absolute_url}/check_admission">check you Jambadmission</a>. 21 </span> 22 <span tal:condition="python: member and 'StudentManager' in member.getGroups()"> 23 <table cellspacing="0" cellpadding="0"> 24 <tal:block condition="python: len(items)"> 25 <tr tal:repeat="item items"> 26 <td colspan="1"> 27 <a href="student" tal:attributes="href item/absolute_url" tal:content="item/title_or_id"></a> 28 </td> 29 </tr> 30 </tal:block> 31 <tr tal:condition="python:not len(items)"> 32 <td> 33 no Students yet ! 34 </td> 35 </tr> 36 </table> 37 </span> 19 <a href="" tal:attributes="href string:${context/absolute_url}/admission_status">Admission List UME</a>.<br /> 20 <a href="" tal:attributes="href string:${context/absolute_url}/check_admission">Admission Request (JAMB) canditates only</a>. 38 21 </metal:block> 39 22 <metal:block fill-slot="sub">
Note: See TracChangeset for help on using the changeset viewer.