Changeset 648


Ignore:
Timestamp:
10 Oct 2006, 23:42:08 (18 years ago)
Author:
joachim
Message:

fixed bug in getStudentInfo isManager() instead of isManager
fixed s_id bug

Location:
WAeUP_SRP/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/Students.py

    r639 r648  
    351351            app_doc = app.getContent()
    352352            app_doc.edit(mapping=da)
    353             #wftool.doActionFor(app,'open',dest_container=app)
     353            wftool.doActionFor(app,'open',dest_container=app)
    354354            app.manage_setLocalRoles(sid, ['Owner',])
    355355            student.getContent().createSubObjects()
  • WAeUP_SRP/trunk/Widgets.py

    r637 r648  
    368368                    err = "Student not Found in validate SC"
    369369                    break
     370                s_id = student.getId()
    370371                if ok == 2:
    371372                    break
  • WAeUP_SRP/trunk/skins/waeup_custom/logged_in.py

    r603 r648  
    5151            info = context.getStudentInfo()
    5252            student = info['student']
    53 ##            member_id = str(member)
    54 ##            student = getattr(context.campus.students,member_id,)
    55 ##            if context.portal_workflow.getInfoFor(student,
    56 ##                                               'review_state',
    57 ##                                               None) == "created":
    5853            if info['review_state'] == "created":
    5954                student.content_status_modify(workflow_action="enter_application_pin")
  • WAeUP_SRP/trunk/skins/waeup_student/getStudentInfo.py

    r646 r648  
    2424member_id = str(member)
    2525if student is None:
    26     if context.isManager:
     26    if context.isManager():
    2727        if context.portal_type == 'Student':
    2828            student_id = context.getId()
     
    3333else:
    3434    student_id = student.getId()
    35 res = context.portal_catalog(portal_type='Student',id=student_id)
    36 if not res:
     35res = context.portal_catalog(id = student_id,portal_type='Student')
     36if not res or len(res) > 1:
    3737    return None
    38 brain = res[0]
     38brain = res[-1]
    3939student = brain.getObject()
    4040student_path = brain.getPath()   
    41 ##if student is None:
    42 ##    students = getattr(context,'students',None)
    43 ##    if students is None:
    44 ##        students = getattr(context.campus,'students',None)
    45 ##    student = getattr(students,member_id,None)
    46 ##    if student is None:
    47 ##        return None
    4841info['review_state'] = wf.getInfoFor(student,'review_state','keiner')
    49 #info['wf_state'] = 'keiner'
    5042info['student'] = student
    5143info['id'] = student.getId()
Note: See TracChangeset for help on using the changeset viewer.