Ignore:
Timestamp:
25 Feb 2007, 00:32:45 (18 years ago)
Author:
joachim
Message:

fix

Location:
WAeUP_SRP/trunk/skins/waeup_student
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_student/getStudentReviewState.py

    r1415 r1490  
    1010# $Id$
    1111"""
    12 return Info about the current Student
     12return the review_state of the Student
    1313"""
    1414try:
    1515    from Products.AdvancedQuery import Eq, Between, Le,In
    16     evalAQ = context.portal_catalog.evalAdvancedQuery
     16    aq_portal = context.portal_catalog.evalAdvancedQuery
    1717except:
    18     evalAdvancedQuery = None
     18    aq_portal = None
    1919student_id = context.getStudentId()
    20 #res = context.portal_catalog(id = student_id,portal_type='Student')
    2120query = Eq('id',student_id)
    22 res = evalAQ(query)
    23 if not res:# or len(res) > 1:
     21res = aq_portal(query)
     22if not res:
    2423    return None
    25 return res[-1].review_state
     24return res[0].review_state
  • WAeUP_SRP/trunk/skins/waeup_student/getStudyCourseInfo.py

    r1483 r1490  
    1414request = context.REQUEST
    1515
    16 wf = context.portal_workflow
     16wftool = context.portal_workflow
    1717path_info = request.get('PATH_INFO').split('/')
    1818
     
    4747#review_state = wftool.getInfoFor(context,'review_state',None)
    4848#if review_state != 'content_addable':
    49 #    context.portal_workflow.doActionFor(context,'close_for_edit')
    50 
     49#    wftool.doActionFor(context,'close_for_edit')
     50student_review_state = context.getStudentReviewState()
     51may_register = student_review_state in ('shool_fee_payed',)
    5152#levels.sort()
    52 #if not levels:
     53#if not levels and may_register:
    5354#    context.invokeFactory('StudentStudyLevel',"%s" % current_level)
    5455#    level = getattr(context,"%s" % current_level)
Note: See TracChangeset for help on using the changeset viewer.