Ignore:
Timestamp:
19 Oct 2005, 09:42:03 (19 years ago)
Author:
joachim
Message:

=more

Location:
waeup_product/trunk/skins/waeup_student
Files:
2 edited
2 copied
1 moved

Legend:

Unmodified
Added
Removed
  • waeup_product/trunk/skins/waeup_student/create_jamb.py

    r53 r57  
    5050    context.notifyCPSDocumentCreation(ob=jamb)
    5151    psm = 'Student created'
    52     pr.addMember(s_id, 'UnSeT',roles=('Member','CPSMember'))
     52    noCPSMember = False
     53    try:
     54        pr.addMember(s_id, 'UnSeT',roles=('Member','CPSMember'))
     55    except:
     56        noCPSMember = True
     57    if noCPSMember:
     58        pr.addMember(s_id, 'UnSeT',roles=('Member',))
    5359    groups = context.portal_directories.groups
    5460    gm = list(groups.getEntry('Students')['members'])
     
    5662    groups.editEntry({'group': 'Students',
    5763                      'members': gm}) 
    58     return context.student_folder_view(psm=psm)
     64    return context.students_folder_view_manager(psm=psm)
    5965##    return context.create_jamb_form(rendered = res,
    6066##                                 psm = psm,
  • waeup_product/trunk/skins/waeup_student/process_waeup_login.py

    r54 r57  
    2727pkw = {}
    2828pkw['sex'] = getattr(jamb,'sex')
    29 pkw['lastname'] = getattr(jamb,'name')
     29pkw['firstname'] = getattr(jamb,'firstname')
     30pkw['middlename'] = getattr(jamb,'middlename')
     31pkw['lastname'] = getattr(jamb,'lastname')
     32pkw['aggregate'] = getattr(jamb,'aggregate')
     33pkw['faculty'] = getattr(jamb,'faculty')
     34pkw['age'] = getattr(jamb,'age')
     35pkw['state'] = getattr(jamb,'state')
     36
    3037pd.edit(mapping=pkw)
    3138context.notifyCPSDocumentCreation(ob=pd)
  • waeup_product/trunk/skins/waeup_student/students_folder_view.py

    r48 r57  
    66will be displayed, otherwise first post will be displayed."""
    77
    8 admin = "SectionManager" in context.portal_membership.getAuthenticatedMember().getRolesInContext(context)
    98
    10 return context.student_folder_view_main(admin = admin,psm=psm,groups=groups)
     9member = context.portal_membership.getAuthenticatedMember()
     10if member:
     11    if 'Student' in member.getGroups():
     12        return context.students_folder_view_students(psm=psm,groups=groups)
     13    if 'StudentsManager' in member.getGroups():
     14        return context.students_folder_view_manager(psm=psm,groups=groups)
     15return context.students_folder_view_anon(psm=psm,groups=groups)
Note: See TracChangeset for help on using the changeset viewer.