Changeset 89 for waeup_product


Ignore:
Timestamp:
26 Oct 2005, 11:54:25 (19 years ago)
Author:
joachim
Message:

=make workflows work

Location:
waeup_product/trunk
Files:
1 added
17 edited
1 moved

Legend:

Unmodified
Added
Removed
  • waeup_product/trunk/Extensions/install.py

    r87 r89  
    371371              },
    372372            )
    373     installer.verifyPortletContainer(self.portal.sections.waeup)
    374     installer.verifyPortlets(portlets, self.portal.sections.waeup)
     373    installer.verifyPortletContainer(waeup)
     374    installer.verifyPortlets(portlets,waeup)
    375375
    376376###)
  • waeup_product/trunk/Faculty.py

    r68 r89  
    4040    'allowed_content_types': ('Department',),
    4141    'allow_discussion': False,
    42     'actions': (
    43          {'id': 'view',
    44           'name': 'action_view',
    45           'action': 'string:${object_url}/faculty_index_html',
    46           #'action': 'string:${object_url}/cpsdocument_view',
    47           'condition': '',
    48           'permission': ('View',),
    49           'category': 'object',
    50           'visible': True,},
    51          {'id': 'new_content',
    52           'name': 'Add Data',
    53           'action': 'string:${object_url}/folder_factories',
    54           'condition': "python:1 or len(object.contentItems()) == 0 ",
    55           'permission': ('Modify portal content',),
    56           'category': 'object',
    57           'visible': True,},
    58          {'id': 'contents',
    59           'name': 'action_folder_contents',
    60           'action': 'string:${object_url}/folder_contents',
    61           'condition': "python:1 or object.getTypeInfo().cps_proxy_type != 'document'",
    62           'permission': ('Modify portal content',),
    63           'category': 'object',
    64           'visible': True,},
    65          {'id': 'edit',
    66           'name': 'action_edit',
    67           'action': 'string:${object_url}/cpsdocument_edit_form',
    68           'condition': '',
    69           'permission': ('Modify portal content',),
    70           'category': 'object',
    71           'visible': True,},
    72     )
     42##    'actions': (
     43##         {'id': 'view',
     44##          'name': 'action_view',
     45##          'action': 'string:${object_url}/faculty_index_html',
     46##          #'action': 'string:${object_url}/cpsdocument_view',
     47##          'condition': '',
     48##          'permission': ('View',),
     49##          'category': 'object',
     50##          'visible': True,},
     51##         {'id': 'new_content',
     52##          'name': 'Add Data',
     53##          'action': 'string:${object_url}/folder_factories',
     54##          'condition': "python:1 or len(object.contentItems()) == 0 ",
     55##          'permission': ('Modify portal content',),
     56##          'category': 'object',
     57##          'visible': True,},
     58##         {'id': 'contents',
     59##          'name': 'action_folder_contents',
     60##          'action': 'string:${object_url}/folder_contents',
     61##          'condition': "python:1 or object.getTypeInfo().cps_proxy_type != 'document'",
     62##          'permission': ('Modify portal content',),
     63##          'category': 'object',
     64##          'visible': True,},
     65##         {'id': 'edit',
     66##          'name': 'action_edit',
     67##          'action': 'string:${object_url}/cpsdocument_edit_form',
     68##          'condition': '',
     69##          'permission': ('Modify portal content',),
     70##          'category': 'object',
     71##          'visible': True,},
     72##    )
    7373}
    7474###)
     
    101101    'allowed_content_types': ('Course',),
    102102    'allow_discussion': False,
    103     'actions': (
    104          {'id': 'view',
    105           'name': 'action_view',
    106           'action': 'string:${object_url}/department_index_html',
    107           'condition': '',
    108           'permission': ('View',),
    109           'category': 'object',
    110           'visible': True,},
    111          {'id': 'new_content',
    112           'name': 'Add Data',
    113           'action': 'string:${object_url}/folder_factories',
    114           'condition': "python:1 or len(object.contentItems()) == 0 ",
    115           'permission': ('Modify portal content',),
    116           'category': 'object',
    117           'visible': True,},
    118          {'id': 'contents',
    119           'name': 'action_folder_contents',
    120           'action': 'string:${object_url}/folder_contents',
    121           'condition': "python:1 or object.getTypeInfo().cps_proxy_type != 'document'",
    122           'permission': ('Modify portal content',),
    123           'category': 'object',
    124           'visible': True,},
    125          {'id': 'edit',
    126           'name': 'action_edit',
    127           'action': 'string:${object_url}/cpsdocument_edit_form',
    128           'condition': '',
    129           'permission': ('Modify portal content',),
    130           'category': 'object',
    131           'visible': True,},
    132     )
     103##    'actions': (
     104##         {'id': 'view',
     105##          'name': 'action_view',
     106##          'action': 'string:${object_url}/department_index_html',
     107##          'condition': '',
     108##          'permission': ('View',),
     109##          'category': 'object',
     110##          'visible': True,},
     111##         {'id': 'new_content',
     112##          'name': 'Add Data',
     113##          'action': 'string:${object_url}/folder_factories',
     114##          'condition': "python:1 or len(object.contentItems()) == 0 ",
     115##          'permission': ('Modify portal content',),
     116##          'category': 'object',
     117##          'visible': True,},
     118##         {'id': 'contents',
     119##          'name': 'action_folder_contents',
     120##          'action': 'string:${object_url}/folder_contents',
     121##          'condition': "python:1 or object.getTypeInfo().cps_proxy_type != 'document'",
     122##          'permission': ('Modify portal content',),
     123##          'category': 'object',
     124##          'visible': True,},
     125##         {'id': 'edit',
     126##          'name': 'action_edit',
     127##          'action': 'string:${object_url}/cpsdocument_edit_form',
     128##          'condition': '',
     129##          'permission': ('Modify portal content',),
     130##          'category': 'object',
     131##          'visible': True,},
     132##    )
    133133}
    134134###)
     
    161161    'allowed_content_types': (),
    162162    'allow_discussion': False,
    163     'actions': (
    164          {'id': 'view',
    165           'name': 'action_view',
    166           'action': 'string:${object_url}/course_index_html',
    167           'condition': '',
    168           'permission': ('View',),
    169           'category': 'object',
    170           'visible': True,},
    171          {'id': 'new_content',
    172           'name': 'Add Data',
    173           'action': 'string:${object_url}/folder_factories',
    174           'condition': "python:1 or len(object.contentItems()) == 0 ",
    175           'permission': ('Modify portal content',),
    176           'category': 'object',
    177           'visible': True,},
    178          {'id': 'contents',
    179           'name': 'action_folder_contents',
    180           'action': 'string:${object_url}/folder_contents',
    181           'condition': "python:1 or object.getTypeInfo().cps_proxy_type != 'document'",
    182           'permission': ('Modify portal content',),
    183           'category': 'object',
    184           'visible': True,},
    185          {'id': 'edit',
    186           'name': 'action_edit',
    187           'action': 'string:${object_url}/cpsdocument_edit_form',
    188           'condition': '',
    189           'permission': ('Modify portal content',),
    190           'category': 'object',
    191           'visible': True,},
    192     )
     163##    'actions': (
     164##         {'id': 'view',
     165##          'name': 'action_view',
     166##          'action': 'string:${object_url}/course_index_html',
     167##          'condition': '',
     168##          'permission': ('View',),
     169##          'category': 'object',
     170##          'visible': True,},
     171##         {'id': 'new_content',
     172##          'name': 'Add Data',
     173##          'action': 'string:${object_url}/folder_factories',
     174##          'condition': "python:1 or len(object.contentItems()) == 0 ",
     175##          'permission': ('Modify portal content',),
     176##          'category': 'object',
     177##          'visible': True,},
     178##         {'id': 'contents',
     179##          'name': 'action_folder_contents',
     180##          'action': 'string:${object_url}/folder_contents',
     181##          'condition': "python:1 or object.getTypeInfo().cps_proxy_type != 'document'",
     182##          'permission': ('Modify portal content',),
     183##          'category': 'object',
     184##          'visible': True,},
     185##         {'id': 'edit',
     186##          'name': 'action_edit',
     187##          'action': 'string:${object_url}/cpsdocument_edit_form',
     188##          'condition': '',
     189##          'permission': ('Modify portal content',),
     190##          'category': 'object',
     191##          'visible': True,},
     192##    )
    193193}
    194194###)
  • waeup_product/trunk/Students.py

    r87 r89  
    3939    'allowed_content_types': ('Jamb','StudentPersonal'),
    4040    'allow_discussion': False,
    41     'actions': (
    42          {'id': 'view',
    43           'name': 'action_view',
    44           'action': 'string:${object_url}/student_index_html',
    45           #'action': 'string:${object_url}/cpsdocument_view',
    46           'condition': '',
    47           'permission': ('View',),
    48           'category': 'object',
    49           'visible': True,},
    50          {'id': 'new_content',
    51           'name': 'Add Data',
    52           'action': 'string:${object_url}/folder_factories',
    53           'condition': "python:1 or len(object.contentItems()) == 0 ",
    54           'permission': ('Modify portal content',),
    55           'category': 'object',
    56           'visible': True,},
    57          {'id': 'contents',
    58           'name': 'action_folder_contents',
    59           'action': 'string:${object_url}/folder_contents',
    60           'condition': "python:1 or object.getTypeInfo().cps_proxy_type != 'document'",
    61           'permission': ('Modify portal content',),
    62           'category': 'object',
    63           'visible': True,},
    64          {'id': 'edit',
    65           'name': 'action_edit',
    66           'action': 'string:${object_url}/cpsdocument_edit_form',
    67           'condition': '',
    68           'permission': ('Modify portal content',),
    69           'category': 'object',
    70           'visible': True,},
    71     )
     41##    'actions': (
     42##         {'id': 'view',
     43##          'name': 'action_view',
     44##          'action': 'string:${object_url}/student_index_html',
     45##          #'action': 'string:${object_url}/cpsdocument_view',
     46##          'condition': '',
     47##          'permission': ('View',),
     48##          'category': 'object',
     49##          'visible': True,},
     50##         {'id': 'new_content',
     51##          'name': 'Add Data',
     52##          'action': 'string:${object_url}/folder_factories',
     53##          'condition': "python:1 or len(object.contentItems()) == 0 ",
     54##          'permission': ('Modify portal content',),
     55##          'category': 'object',
     56##          'visible': True,},
     57##         {'id': 'contents',
     58##          'name': 'action_folder_contents',
     59##          'action': 'string:${object_url}/folder_contents',
     60##          'condition': "python:1 or object.getTypeInfo().cps_proxy_type != 'document'",
     61##          'permission': ('Modify portal content',),
     62##          'category': 'object',
     63##          'visible': True,},
     64##         {'id': 'edit',
     65##          'name': 'action_edit',
     66##          'action': 'string:${object_url}/cpsdocument_edit_form',
     67##          'condition': '',
     68##          'permission': ('Modify portal content',),
     69##          'category': 'object',
     70##          'visible': True,},
     71##    )
    7272}
    7373
     
    8181    portal_type = meta_type
    8282    security = ClassSecurityInfo()
    83    
    84     security.declarePublic("test")
    85     def test(self):
    86         """test"""
    87         return self.REQUEST
    8883   
    8984InitializeClass(Student)
     
    9590
    9691###)
     92studentpersonal_fti = { ###(
     93    'title': 'WAeUP StudentPersonal',
     94    'description': '',
     95    'content_icon': 'student.gif',
     96    'content_meta_type': 'StudentPersonal',
     97    'factory': 'addStudent',
     98    'immediate_view': 'student_personal_index_html',
     99    'global_allow': True,
     100    'filter_content_types': True,
     101    'allowed_content_types': (),
     102    'allow_discussion': False,
     103##    'actions': (
     104##         {'id': 'view',
     105##          'name': 'action_view',
     106##          'action': 'string:${object_url}/student_index_html',
     107##          #'action': 'string:${object_url}/cpsdocument_view',
     108##          'condition': '',
     109##          'permission': ('View',),
     110##          'category': 'object',
     111##          'visible': True,},
     112##         {'id': 'new_content',
     113##          'name': 'Add Data',
     114##          'action': 'string:${object_url}/folder_factories',
     115##          'condition': "python:1 or len(object.contentItems()) == 0 ",
     116##          'permission': ('Modify portal content',),
     117##          'category': 'object',
     118##          'visible': True,},
     119##         {'id': 'contents',
     120##          'name': 'action_folder_contents',
     121##          'action': 'string:${object_url}/folder_contents',
     122##          'condition': "python:1 or object.getTypeInfo().cps_proxy_type != 'document'",
     123##          'permission': ('Modify portal content',),
     124##          'category': 'object',
     125##          'visible': True,},
     126##         {'id': 'edit',
     127##          'name': 'action_edit',
     128##          'action': 'string:${object_url}/cpsdocument_edit_form',
     129##          'condition': '',
     130##          'permission': ('Modify portal content',),
     131##          'category': 'object',
     132##          'visible': True,},
     133##    )
     134}
     135
     136###)
     137
     138class StudentPersonal(CPSDocument): ###(
     139    """
     140    WAeUP Student container for the various student data
     141    """
     142    meta_type = 'StudentPersonal'
     143    portal_type = meta_type
     144    security = ClassSecurityInfo()
     145   
     146InitializeClass(StudentPersonal)
     147
     148def addStudentPersonal(container, id, REQUEST=None, **kw):
     149    """Add a Students personal data."""
     150    ob = StudentPersonal(id, **kw)
     151    return CPSBase_adder(container, ob, REQUEST=REQUEST)
     152
     153###)
     154
     155jamb_fti = { ###(
     156    'title': 'WAeUP Jamb',
     157    'description': '',
     158    'content_icon': '',
     159    'content_meta_type': 'Jamb',
     160    'factory': 'addJamb',
     161    'immediate_view': 'cpsdocument_view',
     162    'global_allow': True,
     163    'filter_content_types': True,
     164    'allowed_content_types': ('Course',),
     165    'allow_discussion': False,
     166##    'actions': (
     167##         {'id': 'view',
     168##          'name': 'action_view',
     169##          'action': 'string:${object_url}/jamb_index_html',
     170##          'condition': '',
     171##          'permission': ('View',),
     172##          'category': 'object',
     173##          'visible': True,},
     174##         {'id': 'new_content',
     175##          'name': 'Add Data',
     176##          'action': 'string:${object_url}/folder_factories',
     177##          'condition': "python:1 or len(object.contentItems()) == 0 ",
     178##          'permission': ('Modify portal content',),
     179##          'category': 'object',
     180##          'visible': True,},
     181##         {'id': 'contents',
     182##          'name': 'action_folder_contents',
     183##          'action': 'string:${object_url}/folder_contents',
     184##          'condition': "python:1 or object.getTypeInfo().cps_proxy_type != 'document'",
     185##          'permission': ('Modify portal content',),
     186##          'category': 'object',
     187##          'visible': True,},
     188##         {'id': 'edit',
     189##          'name': 'action_edit',
     190##          'action': 'string:${object_url}/cpsdocument_edit_form',
     191##          'condition': '',
     192##          'permission': ('Modify portal content',),
     193##          'category': 'object',
     194##          'visible': True,},
     195##    )
     196}
     197###)
     198
     199class Jamb(CPSDocument): ###(
     200    """
     201    WAeUP Jamb containing the courses and students
     202    """
     203    meta_type = 'Jamb'
     204    portal_type = meta_type
     205    security = ClassSecurityInfo()
     206   
     207InitializeClass(Jamb)
     208
     209def addJamb(container, id, REQUEST=None, **kw):
     210    """Add a Jamb."""
     211    ob = Jamb(id, **kw)
     212    return CPSBase_adder(container, ob, REQUEST=REQUEST)
     213###)
     214
  • waeup_product/trunk/Workflows/WAeUPWorkflow.py

    r27 r89  
    4141    for p in (View,
    4242              ModifyPortalContent,
     43             
    4344             ):
    4445        wf.addManagedPermission(p)
     
    116117                    actbox_name='', actbox_category='workflow', actbox_url='',
    117118                    props={'guard_permissions':'',
    118                            'guard_roles':'Manager; SectionManager',
     119                           'guard_roles':'Manager; StudentManager',
    119120                           'guard_expr':''},)
    120121
     
    134135                    actbox_url='',
    135136                    props={'guard_permissions':'',
    136                            'guard_roles':'Manager; SectionManager; SectionReviewer; SectionReader',
     137                           'guard_roles':'Manager; StudentManager',
    137138                           'guard_expr':''},)
    138139
     
    153154                    actbox_url='',
    154155                    props={'guard_permissions':'',
    155                            'guard_roles':'Manager; SectionManager',
     156                           'guard_roles':'Manager; StudentManager',
    156157                           'guard_expr':''},)
    157158
  • waeup_product/trunk/__init__.py

    r84 r89  
    1212
    1313fti = (Students.student_fti,
     14       Students.studentpersonal_fti,
     15       Students.jamb_fti,
    1416       Faculty.faculty_fti,
    1517       Faculty.department_fti,
     
    2022                  Students.StudentsFolder,
    2123                  Students.Student,
     24                  Students.StudentPersonal,
     25                  Students.Jamb,
    2226                  Faculty.Faculty,
    2327                  Faculty.Department,
     
    2832                       Students.addStudentsFolder,
    2933                       Students.addStudent,
     34                       Students.addStudentPersonal,
     35                       Students.addJamb,
    3036                       Faculty.addFaculty,
    3137                       Faculty.addDepartment,
  • waeup_product/trunk/skins/waeup_default/getWAeUPTypes.py

    r87 r89  
    3232                 'name': 'action_view',
    3333                 'action': 'university_view',
     34                 'condition': "python:'Manager' in member.getRoles()",
    3435                 'permissions': (View,)},
    3536                {'id': 'addFaculty',
     
    4041                 'name': 'action_folder_contents',
    4142                 'action': 'folder_contents',
     43                 'condition': "python:'Manager' in member.getRoles()",
    4244                 'permissions': (ModifyPortalContent,UniversityManage,)},
    4345                {'id': 'edit',
     
    4547                 'action': 'cpsdocument_edit_form',
    4648                 #'action': 'cpsdocument_edit_form',
     49                 'condition': "python:'Manager' in member.getRoles()",
    4750                 'permissions': (ModifyPortalContent,UniversityManage,)},
    4851                {'id': 'metadata',
    4952                 'name': 'action_metadata',
    5053                 'action': 'cpsdocument_metadata',
    51                  'condition': 'not:portal/portal_membership/isAnonymousUser',
     54                 'condition': "python:'Manager' in member.getRoles()",
    5255                 'permissions': (ModifyPortalContent,)},
    5356                {'id': 'localroles',
    5457                 'name': 'action_local_roles',
    5558                 'action': 'folder_localrole_form',
     59                 'condition': 'not:portal/portal_membership/isAnonymousUser',
    5660                 'permissions': (ChangePermissions,)},
    5761                 )
     
    8286                 'name': 'Students',
    8387                 'action': 'students_folder_view',
     88                 'condition': "python:'Manager' in member.getRoles()",
    8489                 'permissions': (View,)},
    8590                {
     
    8792                'name'      : 'Add Content',
    8893                'action'    : 'string:${object/absolute_url}/folder_factories',
     94                 'condition': "python:'Manager' in member.getRoles()",
    8995                'permissions': (StudentManage,)},
    9096                {
     
    134140    'cps_section_wf': 'waeup_section_wf',
    135141    'use_content_status_history': 0,
    136     'actions_add': (
     142    'actions': (
    137143         {'id': 'view',
    138144          'name': 'action_view',
     
    143149          'category': 'object',
    144150          'visible': True,},
     151         {'id': 'metadata',
     152          'name': 'action_metadata',
     153          'action': 'cpsdocument_metadata',
     154          'condition': "python:'Manager' in member.getRoles()",
     155          'permissions': (UniversityManage,)},
    145156          )
    146157}
     
    223234    'cps_workspace_wf': 'workspace_content_wf',
    224235    'cps_section_wf': 'section_content_wf',
    225     'actions_add': (
     236    'actions': (
    226237         {'id': 'view',
    227238          'name': 'action_view',
    228239          '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,},
     240          'condition': '',
     241          'permission': (View,),
     242          'visible': True,},
     243         {'id': 'edit',
     244          'name': 'action_edit',
     245          'action': 'string:${object_url}/waeup_edit_form',
     246          'condition': '',
     247          'permission': (ModifyPortalContent,StudentManage),
     248          },
     249          {
     250          'id'        : 'add_content',
     251          'name'      : 'Add Content',
     252          'action'    : 'string:${object/absolute_url}/folder_factories',
     253          'condition': "python:'Manager' in member.getRoles()",
     254          'permissions': (StudentManage,)},
     255         {'id': 'metadata',
     256          'name': 'action_metadata',
     257          'action': 'cpsdocument_metadata',
     258          'condition': "python:'Manager' in member.getRoles()",
     259          'permissions': (UniversityManage,)},
    234260          )
    235261}
     
    241267    'content_icon': '',
    242268    'content_meta_type': 'CPS Document',
    243     'product': 'CPSDocument',
    244     'factory': 'addCPSDocument',
    245     'immediate_view': 'cpsdocument_view',
     269    'product': 'WAeUP',
     270    'factory': 'addStudentPersonal',
     271    'immediate_view': 'student_personal_index_html',
    246272    'global_allow': True,
    247273    'filter_content_types': True,
     
    259285    'cps_workspace_wf': 'workspace_content_wf',
    260286    'cps_section_wf': 'section_content_wf',
    261     'actions_add': (
     287    'actions': (
    262288         {'id': 'view',
    263289          'name': 'action_view',
     
    275301          'category': 'object',
    276302          'visible': True,},
     303         {'id': 'metadata',
     304          'name': 'action_metadata',
     305          'action': 'cpsdocument_metadata',
     306          'condition': "python:'Manager' in member.getRoles()",
     307          'permissions': (UniversityManage,)},
    277308          )
    278309}
     
    300331    'cps_section_wf': 'waeup_section_wf',
    301332    'use_content_status_history': 0,
    302     'actions_add': (
     333    'actions': (
    303334         {'id': 'view',
    304335          'name': 'action_view',
     
    340371    'cps_section_wf': 'waeup_section_wf',
    341372    'use_content_status_history': 0,
    342     'actions_add': (
     373    'actions': (
    343374         {'id': 'view',
    344375          'name': 'action_view',
     
    380411    'cps_section_wf': 'waeup_section_wf',
    381412    'use_content_status_history': 0,
    382     'actions_add': (
     413    'actions': (
    383414         {'id': 'view',
    384415          'name': 'action_view',
  • waeup_product/trunk/skins/waeup_default/portlet_main_navigation.pt

    r84 r89  
    44                   folder_id python:str(user)"
    55                   >
    6   <tal:block condition="python: 'Students' in user.getGroups()">
     6  <tal:block condition="python: 0 and 'Students' in user.getGroups()">
    77    <a href="" i18n:translate=""
    88       tal:attributes="href string:${here/portal_url}/sections/waeup/students/${folder_id}"
    99       tal:content="string: Personal area for JAMB Registration ${folder_id}"></a>
    1010  </tal:block>
    11   <tal:block condition="python: 'StudentManager' in user.getGroups()">
     11  <tal:block condition="python: 1">
    1212    <a href="" i18n:translate=""
    1313       tal:attributes="href string:${here/portal_url}/sections/waeup/students"
  • waeup_product/trunk/skins/waeup_default/university_view.py

    r87 r89  
    66
    77member = context.portal_membership.getAuthenticatedMember()
    8 #return context.folder_view()
     8
    99if member:
    1010    if 'Manager' in member.getRoles():
    1111        return context.folder_view()
    12     elif 'Students' in member.getGroups():
    13         return context.students.students_folder_view_student(psm=psm,groups=groups)
    14     elif 'StudentManager' in member.getGroups():
    15         return context.waeup_view_manager(psm=psm,groups=groups)
    16 return context.students.students_folder_view_anon(psm=psm,groups=groups)
     12return context.university_view_all(psm=psm)
  • waeup_product/trunk/skins/waeup_faculty/course_index_html.py

    r80 r89  
    55"""Default view for the Student."""
    66member = context.portal_membership.getAuthenticatedMember()
     7if member:
     8    roles = member.getRoles()
     9    if 'Manager' in roles:
     10        return context.cpsdocument_view()
     11    elif 'StudentManager' in roles:
     12        return context.course_view_manager()
     13return context.course_view_student()
    714
    8 #return context.student_view_manager()
    9 if member:
    10     if 'Manager' in member.getRoles():
    11         return context.cpsdocument_view()
    12     elif 'StudentManager' in member.getGroups():
    13         return context.course_view_manager()
    14     elif 'Students' in member.getGroups():
    15         return context.course_view_student()
  • waeup_product/trunk/skins/waeup_faculty/department_index_html.py

    r84 r89  
    55"""Default view for a Faculty."""
    66member = context.portal_membership.getAuthenticatedMember()
    7 
    8 #return context.student_view_manager()
    97if member:
    10     if 'StudentManager' in member.getGroups():
    11     #if 'Manager' in member.getRoles():
     8    roles = member.getRoles()
     9    if 'Manager' in roles:
     10        return context.folder_view()
     11    elif 'StudentManager' in roles:
    1212        return context.department_view_manager()
    13     elif 'Students' in member.getGroups():
    14         return context.department_view_student()
     13return context.department_view_student()
  • waeup_product/trunk/skins/waeup_faculty/department_index_html.py~

    r84 r89  
    11##parameters=post_id=None, REQUEST=None
    22
    3 # $Id: department_index_html.py 80 2005-10-22 13:43:45Z joachim $
     3# $Id: department_index_html.py 84 2005-10-25 16:18:40Z joachim $
    44
    55"""Default view for a Faculty."""
     
    88#return context.student_view_manager()
    99if member:
    10     if 'Manager' in member.getRoles():
     10    if 'StudentManager' in member.getGroups():
     11    #if 'Manager' in member.getRoles():
    1112        return context.department_view_manager()
    1213    elif 'Students' in member.getGroups():
  • waeup_product/trunk/skins/waeup_faculty/faculty_index_html.py

    r84 r89  
    66member = context.portal_membership.getAuthenticatedMember()
    77
    8 #return context.student_view_manager()
    9 #if 'Manager' in member.getRoles():
    10 if 'StudentManager' in member.getGroups():
    11     return context.faculty_view_manager()
    12 elif 'Students' in member.getGroups():
    13     return context.faculty_view_student()
     8member = context.portal_membership.getAuthenticatedMember()
     9if member:
     10    roles = member.getRoles()
     11    if 'Manager' in roles:
     12        return context.folder_view()
     13    elif 'StudentManager' in roles:
     14        return context.faculty_view_manager()
     15return context.faculty_view_student()
  • waeup_product/trunk/skins/waeup_student/create_jamb.py

    r57 r89  
    5252    noCPSMember = False
    5353    try:
    54         pr.addMember(s_id, 'UnSeT',roles=('Member','CPSMember'))
     54        pr.addMember(s_id, 'UnSeT',roles=('Member','CPSMember','Student'))
    5555    except:
    5656        noCPSMember = True
    5757    if noCPSMember:
    5858        pr.addMember(s_id, 'UnSeT',roles=('Member',))
    59     groups = context.portal_directories.groups
    60     gm = list(groups.getEntry('Students')['members'])
    61     gm.extend((s_id,))
    62     groups.editEntry({'group': 'Students',
    63                       'members': gm}) 
     59##    groups = context.portal_directories.groups
     60##    gm = list(groups.getEntry('Students')['members'])
     61##    gm.extend((s_id,))
     62##    groups.editEntry({'group': 'Students',
     63##                      'members': gm}) 
    6464    return context.students_folder_view_manager(psm=psm)
    6565##    return context.create_jamb_form(rendered = res,
  • waeup_product/trunk/skins/waeup_student/jamb_index_html.py

    r66 r89  
    77
    88#return context.student_view_manager()
    9 if 'StudentManager' in member.getGroups():
    10     return context.jamb_view_manager()
    11 elif 'Students' in member.getGroups():
    12     return context.jamb_view_student()
     9if member:
     10    roles = member.getRoles()
     11    if 'Manager' in roles:
     12        return context.cpsdocument_view()
     13    elif 'StudentManager' in roles:
     14        return context.jamb_view_manager()
     15return context.jamb_view_student()
  • waeup_product/trunk/skins/waeup_student/student_index_html.py

    r79 r89  
    88#return context.student_view_manager()
    99if member:
    10     if 'Manager' in member.getRoles():
     10    roles = member.getRoles()
     11    if 'Manager' in roles:
    1112        return context.folder_view()
    12     elif 'StudentManager' in member.getGroups():
     13    elif 'StudentManager' in roles:
    1314        return context.student_view_manager()
    14     elif 'Students' in member.getGroups():
    15         return context.student_view_student()
     15return context.student_view_student()
  • waeup_product/trunk/skins/waeup_student/student_personal_index_html.py

    r67 r89  
    77
    88#return context.student_view_manager()
    9 if 'StudentManager' in member.getGroups():
    10     return context.student_personal_view_manager()
    11 elif 'Students' in member.getGroups():
    12     return context.student_personal_view_student()
     9if member:
     10    roles = member.getRoles()
     11    if 'Manager' in roles:
     12        return context.cpsdocument_view()
     13    elif 'StudentManager' in roles:
     14        return context.student_personal_view_manager()
     15return context.student_personal_view_student()
  • waeup_product/trunk/skins/waeup_student/students_folder_view.py

    r88 r89  
    99member = context.portal_membership.getAuthenticatedMember()
    1010if member:
    11     if 'Manager' in member.getRoles():
     11    roles = member.getRoles()
     12    if 'Manager' in roles:
    1213        return context.folder_view()
     14    elif 'StudentManager' in roles:
     15        return context.students_folder_view_manager(psm=psm)
     16    elif 'Student' in roles:
     17        return context.students_folder_view_student(psm=psm)
    1318return context.students_folder_view_all(psm=psm)
Note: See TracChangeset for help on using the changeset viewer.