Changeset 1495


Ignore:
Timestamp:
26 Feb 2007, 12:57:35 (18 years ago)
Author:
joachim
Message:

fixed versions for course_registration

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

Legend:

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

    r1494 r1495  
    4343context.invokeFactory('StudentStudyLevel',"%s" % current_level)
    4444level = getattr(context,"%s" % current_level)
     45context.portal_workflow.doActionFor(level,'open')
    4546study_session = context.getSessionString()
    4647level.getContent().edit(mapping={'session': study_session})
    47 context.portal_workflow.doActionFor(level,'open')
    4848context.portal_workflow.doActionFor(level,'close_for_edit')
    4949results = context.results_import(matric_no = student.matric_no)
    50 carry_overs = [brain for brain in results if brain.GRADE in ('D','E','F')]
    51 l = []
    52 for co in carry_overs:
    53     d = context.getCourseInfo(co.CosCode)
    54     d['grade'] = co.GRADE
    55     d['carry_level'] = co.CarryLevel
    56     cr_id = level.invokeFactory('StudentCourseResult',"%s_co" % co.CosCode)
    57     getattr(level,cr_id).getContent().edit(mapping=d)
     50if results:
     51    carry_overs = [brain for brain in results if brain.GRADE in ('D','E','F')]
     52    #carry_overs = [brain for brain in results if int(brain.Score) < 40 ]
     53    l = []
     54    for co in carry_overs:
     55        d = context.getCourseInfo(co.CosCode)
     56        d['grade'] = co.GRADE
     57        d['carry_level'] = co.CarryLevel
     58        cr_id = level.invokeFactory('StudentCourseResult',"%s_co" % co.CosCode)
     59        course_result = getattr(level,cr_id)
     60        context.portal_workflow.doActionFor(course_result,'open')
     61        course_result.getContent().edit(mapping=d)
    5862res = context.portal_catalog(portal_type="Certificate", id = cert_id)
    5963l = []
     
    6872        d = context.getCourseInfo(c.getId)
    6973        cr_id = level.invokeFactory('StudentCourseResult',c.getId)
     74        course_result = getattr(level,cr_id)
     75        context.portal_workflow.doActionFor(course_result,'open')
    7076        d['core_or_elective'] = getattr(c.getObject().getContent(),'core_or_elective')
    71         getattr(level,cr_id).getContent().edit(mapping=d)
     77        course_result.getContent().edit(mapping=d)
    7278session.set('in_progress','finished')
    73 return response.redirect("%s/study_level_view" % level.absolute_url())
     79return response.redirect("%s" % level.absolute_url())
  • WAeUP_SRP/trunk/skins/waeup_student/getStudyCourseInfo.py

    r1494 r1495  
    5656student_review_state = context.getStudentReviewState()
    5757#may_register = 0 #1 or student_review_state in ('shool_fee_payed',)
    58 may_register = (1 or student_review_state in ('shool_fee_payed',)) and\
     58may_register = (student_review_state in ('shool_fee_paid',)) and\
    5959               current_level not in levels
    6060levels.sort()
  • WAeUP_SRP/trunk/skins/waeup_student/study_level_view.pt

    r1494 r1495  
    4040      </form>   
    4141      <form action="." method="post" class="group">
     42        <span tal:condition="info/carry_overs" tal:omit-tag="">
    4243        <h3>Carryover Courses</h3>
    4344        <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content">     
     
    5960          </tr>
    6061        </table>
     62        </span>
    6163        <h3>Session Courses</h3>
    6264        <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content">     
Note: See TracChangeset for help on using the changeset viewer.