Changeset 6862 for WAeUP_SRP


Ignore:
Timestamp:
5 Oct 2011, 06:39:58 (13 years ago)
Author:
Henrik Bettermann
Message:

Change of functional specification: All students (except those in level 100) should be able to register 100L carryover courses.

Location:
WAeUP_SRP/trunk/skins
Files:
5 edited
1 moved

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_futminna/create_level_101.py

    r6858 r6862  
    2424response = request.RESPONSE
    2525redirect = response.redirect
    26 logger = logging.getLogger('Skins.create_level_501')
     26logger = logging.getLogger('Skins.create_level_101')
    2727info = context.waeup_tool.getAccessInfo(context)
    2828student_id = info['student_id']
     
    3434current_level = student.level
    3535
    36 if current_level not in ['500','510',]:
    37     logger.info('%s tried to create level 501 but is not in level 500' % student.id)
    38     return 'Forbidden'
    39 
    4036current_session = student.session
    4137in_progress =  request.get('in_progress','not started')
     
    4440    return 'Forbidden'
    4541
    46 if context.hasObject('100') or context.hasObject('501'):
     42if context.hasObject('100') or context.hasObject('101'):
    4743    logger.info('%s tried to create already existing level 100' % student.id)
    4844    return 'Forbidden'
    4945
    50 context.invokeFactory('StudentStudyLevel',"%s" % '501')
    51 level = getattr(context,"501")
     46context.invokeFactory('StudentStudyLevel',"%s" % '101')
     47level = getattr(context,"101")
    5248context.portal_workflow.doActionFor(level,'open')
    5349level.getContent().edit(mapping={'session': current_session})
     
    8480    existing_uids = context.course_results.addMultipleRecords(records)
    8581    if existing_uids:
    86         logger.info('%s level 501 %s existing keys' % (student.id,
     82        logger.info('%s level 101 %s existing keys' % (student.id,
    8783                                                     ",".join(existing_uids)))
    8884
    89 logger.info('%s created level 501 (100 carry overs)' % student.id)
     85logger.info('%s created level 101 (100 carry overs)' % student.id)
    9086
    91 return response.redirect("%s/501" % context.absolute_url())
     87return response.redirect("%s/101" % context.absolute_url())
  • WAeUP_SRP/trunk/skins/waeup_futminna/getStudentLevelsVoc.py

    r6858 r6862  
    3838
    3939# FUTMinna only
    40 if ikey == 501:
     40if ikey == 101:
    4141    return "100 Level Carryover Courses"
    4242
  • WAeUP_SRP/trunk/skins/waeup_futminna/getStudyCourseInfo.py

    r6858 r6862  
    9494               (student_record.entry_mode.startswith('pd') and current_level == '500'))  #fceokene only
    9595
    96 info['may_register_501'] = (current_level == '500') and '501' not in levels
     96info['may_register_101'] = (int(current_level) > 199) and '100' not in levels and '101' not in levels
    9797
    9898missing_data = has_paid and\
  • WAeUP_SRP/trunk/skins/waeup_futminna/getStudyLevelInfo.py

    r6858 r6862  
    4747info['has_verdict'] = has_verdict = level_doc.verdict
    4848
    49 info['submission_allowed']= school_fee_paid and is_current_level and not has_verdict and level_id != '501'
    50 info['validation_allowed']= review_state == 'courses_registered' and is_current_level and level_id != '501'
     49info['submission_allowed']= school_fee_paid and is_current_level and not has_verdict and level_id != '101'
     50info['validation_allowed']= review_state == 'courses_registered' and is_current_level and level_id != '101'
    5151info['rejection_allowed']= review_state in ('courses_registered', 'courses_validated','returning',) and\
    52                                              is_current_level and level_id != '501'
     52                                             is_current_level and level_id != '101'
    5353info['validated'] = level_doc.validated_by and not (is_current_level and review_state in ('courses_registered',))
    5454info['show_check_boxes'] =  (is_ca and school_fee_paid and is_current_level and not has_verdict) or\
    5555                            (info['is_student'] and school_fee_paid and is_current_level and not has_verdict) or\
    56                             level_id == '501' or\
     56                            level_id == '101' or\
    5757                            (is_so) # and is_current_level and not has_verdict)
    5858
     
    9090info['credits_exceeded'] = total_credits > max_credits
    9191current_session = student.session
    92 info['show_submit'] = not info['credits_exceeded'] and level_id != '501'
    93 info['show_update'] = level_id != '501'
     92info['show_submit'] = not info['credits_exceeded'] and level_id != '101'
     93info['show_update'] = level_id != '101'
    9494#end customization
    9595
  • WAeUP_SRP/trunk/skins/waeup_futminna/study_course_view.pt

    r6858 r6862  
    135135
    136136    <form action="" method="post" class="group" onsubmit="return submit_once()"
    137           tal:attributes="action string:${context/absolute_url}/create_level_501"
     137          tal:attributes="action string:${context/absolute_url}/create_level_101"
    138138          tal:define="rows python: info['items'];"
    139           tal:condition="info/may_register_501"
     139          tal:condition="info/may_register_101"
    140140          >
    141141      <table width="100%" cellspacing="0" cellpadding="2"
  • WAeUP_SRP/trunk/skins/waeup_student/register_courses.py

    r6858 r6862  
    3434
    3535# FUTMinna only
    36 if context.getId() == '501':
     36if context.getId() == '101':
    3737    return 'Forbidden'
    3838
Note: See TracChangeset for help on using the changeset viewer.