Changeset 1856


Ignore:
Timestamp:
5 Jun 2007, 13:06:23 (17 years ago)
Author:
joachim
Message:

aviod conflict errors (in custom)

Location:
WAeUP_SRP/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/profiles/default/layouts/student_course_result.xml

    r1786 r1856  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
    23<object name="student_course_result" meta_type="CPS Layout">
    34 <property name="layout_create_method"></property>
  • WAeUP_SRP/trunk/skins/waeup_epayment/pay_by_sc.py

    r1771 r1856  
    4545                      layout_mode="create",
    4646                      formaction = "pay_by_sc",
    47                       button = 'Pay'
     47                      button = 'Pay',
     48                      commit = False,
    4849                      )
    4950if psm == 'invalid':
  • WAeUP_SRP/trunk/skins/waeup_student/check_admission.py

    r1000 r1856  
    3030                      formaction = "check_admission",
    3131                      button = "Check",
     32                      commit=False,
    3233                      )
    3334if psm == 'invalid':
  • WAeUP_SRP/trunk/skins/waeup_student/create_level.py

    r1845 r1856  
    3737create_level =  request.get('create_level',None)
    3838
    39 if context.hasObject(current_level) and create_level :
    40     logger.info('%s tried to add already existing level %s' % (student.id,current_level))
    41     return
     39##if context.hasObject(current_level) and create_level:
     40##    if getattr(context,current_level).objectIds():
     41##        logger.info('%s tried to add already existing level %s' % (student.id,current_level))
     42##    return
    4243logger.info('%s started to create level %s' % (student.id,current_level))
    4344
     
    5354##        return
    5455
    55 if level_created == current_level:
     56if context.hasObject(current_level):
    5657    level = getattr(context,"%s" % current_level)
    5758else:
     
    6263    level.getContent().edit(mapping={'session': study_session})
    6364    context.portal_workflow.doActionFor(level,'close_for_edit')
     65    context.waeup_tool.doCommit()
    6466results = []
    6567if student.matric_no:
     
    7577
    7678    for co in carry_overs:
     79        cr_id = "%s_co" % co.CosCode
     80        if level.hasObject(cr_id):    #already created
     81            continue
    7782        carry_over = False
    7883        query = Eq('code',co.CosCode)
     
    105110        context.portal_workflow.doActionFor(course_result,'open')
    106111        course_result.getContent().edit(mapping=d)
    107         #context.waeup_tool.doCommit()
     112        context.waeup_tool.doCommit()
    108113#level['create_course_results'](cert_id,current_level)
    109114res = context.portal_catalog(portal_type="Certificate", id = cert_id)
     
    117122    courses = aq_portal(query)
    118123    for c in courses:
     124        cr_id = "%s" % c.getId
     125        if level.hasObject(cr_id):    #already created
     126            continue
    119127        d = context.getCourseInfo(c.getId)
    120128        cr_id = level.invokeFactory('StudentCourseResult',c.getId)
     
    123131        d['core_or_elective'] = getattr(c.getObject().getContent(),'core_or_elective')
    124132        course_result.getContent().edit(mapping=d)
    125         #context.waeup_tool.doCommit()
     133        context.waeup_tool.doCommit()
    126134logger.info('%s finished to create level %s' % (student.id,current_level))
    127135return response.redirect("%s/%s" % (context.absolute_url(),current_level))
Note: See TracChangeset for help on using the changeset viewer.