Changeset 2977


Ignore:
Timestamp:
3 Jan 2008, 18:47:51 (17 years ago)
Author:
joachim
Message:

fix for #437 please test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/skins/waeup_student/create_level.py

    r2794 r2977  
    2525redirect = response.redirect
    2626logger = logging.getLogger('Skins.create_level')
    27 mtool = context.portal_membership
    28 member = mtool.getAuthenticatedMember()
    29 member_id = str(member)
    30 requested_id = context.getStudentId()
    31 #set_trace()
    32 create_level =  request.form.get('create_level',None)
    33 if not create_level or not requested_id or\
    34    (not context.isStaff() and member_id != requested_id):
    35     logger.info('%s tried to access %s' % (member_id,requested_id))
    36     return redirect("%s/srp_anonymous_view" % context.portal_url())
    37 student_id = context.getStudentId()
     27# mtool = context.portal_membership
     28# member = mtool.getAuthenticatedMember()
     29# member_id = str(member)
     30# requested_id = context.getStudentId()
     31# #set_trace()
     32# create_level =  request.form.get('create_level',None)
     33# if not create_level or not requested_id or\
     34#    (not context.isStaff() and member_id != requested_id):
     35#     logger.info('%s tried to access %s' % (member_id,requested_id))
     36#     return redirect("%s/srp_anonymous_view" % context.portal_url())
     37# student_id = context.getStudentId()
     38info = context.waeup_tool.getAccessInfo(context)
     39student_id = info['student_id']
     40if student_id is None:
     41    return None
    3842
    39 lt = context.portal_layouts
    40 wt = context.waeup_tool
     43#lt = context.portal_layouts
     44#wt = context.waeup_tool
    4145student = context.students_catalog.getRecordByKey(student_id)
    4246cert_id = student.course
     
    6064    #context.portal_workflow.doActionFor(level,'close_for_edit')
    6165level_id = level.getId()
     66onprobation = context.getContent().previous_verdict in ('C',)
    6267session_id = context.getLevelSession(level.getContent(),student_id,level_id)
    6368results = []
     
    110115        records.append(d)
    111116# fetch carry_over courses from the course_results catalog
    112 else:
     117elif not onprobation:
    113118    res = aq_results(Eq('student_id',student_id),
    114119                             sortSpecs=('level_id',))
Note: See TracChangeset for help on using the changeset viewer.