Changeset 2752


Ignore:
Timestamp:
24 Nov 2007, 06:06:14 (17 years ago)
Author:
Henrik Bettermann
Message:

close_for_edit deprecated

Objects should always be opened unless the verdict has been imported.

We need a script which opens all levels before we import the verdicts.

Location:
WAeUP_SRP/base/skins/waeup_student
Files:
4 edited

Legend:

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

    r2664 r2752  
    5757    context.portal_workflow.doActionFor(level,'open')
    5858    level.getContent().edit(mapping={'session': current_session})
    59     context.portal_workflow.doActionFor(level,'close_for_edit')
     59    #context.portal_workflow.doActionFor(level,'close_for_edit')
    6060level_id = level.getId()
    6161session_id = context.getLevelSession(level.getContent(),student_id,level_id)
     
    6767
    6868
    69 # fetch carry_over courses from results_import   
     69# fetch carry_over courses from results_import
    7070if student.session in ('6', '06') and results:
    7171    carry_overs = results
     
    109109        d['session_id'] = session_id
    110110        records.append(d)
    111 # fetch carry_over courses from the course_results catalog         
    112 # else 
     111# fetch carry_over courses from the course_results catalog
     112# else
    113113
    114 # fetch session courses from the certificate 
     114# fetch session courses from the certificate
    115115res = context.portal_catalog(portal_type="Certificate", id = cert_id)
    116116if res:
  • WAeUP_SRP/base/skins/waeup_student/getLevelSession.py

    r2470 r2752  
    2727    session_id = session_id[2:4]
    2828if len(session_id) != 2:
    29     logger.info("invalid session %s in level %s for student %s" % 
     29    logger.info("invalid session %s in level %s for student %s" %
    3030                (session_id,level_id,student_id))
    3131else:
    3232    if changed:
    33         context.portal_workflow.doActionFor(level_doc.aq_parent,'open')
     33        try:
     34            context.portal_workflow.doActionFor(level_doc.aq_parent,'open')
     35        except:
     36            pass
    3437        level_doc.edit(mapping={'session': session_id})
    35         context.portal_workflow.doActionFor(level_doc.aq_parent,'close_for_edit')
    36 return session_id 
     38        #context.portal_workflow.doActionFor(level_doc.aq_parent,'close_for_edit')
     39return session_id
    3740
    38    
    3941
     42
  • WAeUP_SRP/base/skins/waeup_student/getStudyCourseInfo.py

    r2678 r2752  
    8484review_state = wftool.getInfoFor(context,'review_state',None)
    8585student_review_state = sbrain.review_state
    86 if review_state != 'content_addable' and student_review_state == 'school_fee_paid': #and context.isStudent():
    87     wftool.doActionFor(context,'close_for_edit')
     86#if review_state != 'content_addable' and student_review_state == 'school_fee_paid': #and context.isStudent():
     87#    wftool.doActionFor(context,'close_for_edit')
    8888
    8989has_paid = student_review_state == 'school_fee_paid'
  • WAeUP_SRP/base/skins/waeup_student/reject_courses.py

    r1630 r2752  
    2727
    2828wftool = context.portal_workflow
    29 wftool.doActionFor(context,'open')
    30 wftool.doActionFor(context,'close_for_edit')
     29try:
     30    wftool.doActionFor(context,'open')
     31except:
     32    pass
     33#wftool.doActionFor(context,'close_for_edit')
    3134students_folder = context.portal_url.getPortalObject().campus.students
    3235student_id = context.getStudentId()
Note: See TracChangeset for help on using the changeset viewer.