Changeset 6862
- Timestamp:
- 5 Oct 2011, 06:39:58 (13 years ago)
- 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 24 24 response = request.RESPONSE 25 25 redirect = response.redirect 26 logger = logging.getLogger('Skins.create_level_ 501')26 logger = logging.getLogger('Skins.create_level_101') 27 27 info = context.waeup_tool.getAccessInfo(context) 28 28 student_id = info['student_id'] … … 34 34 current_level = student.level 35 35 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 40 36 current_session = student.session 41 37 in_progress = request.get('in_progress','not started') … … 44 40 return 'Forbidden' 45 41 46 if context.hasObject('100') or context.hasObject(' 501'):42 if context.hasObject('100') or context.hasObject('101'): 47 43 logger.info('%s tried to create already existing level 100' % student.id) 48 44 return 'Forbidden' 49 45 50 context.invokeFactory('StudentStudyLevel',"%s" % ' 501')51 level = getattr(context," 501")46 context.invokeFactory('StudentStudyLevel',"%s" % '101') 47 level = getattr(context,"101") 52 48 context.portal_workflow.doActionFor(level,'open') 53 49 level.getContent().edit(mapping={'session': current_session}) … … 84 80 existing_uids = context.course_results.addMultipleRecords(records) 85 81 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, 87 83 ",".join(existing_uids))) 88 84 89 logger.info('%s created level 501 (100 carry overs)' % student.id)85 logger.info('%s created level 101 (100 carry overs)' % student.id) 90 86 91 return response.redirect("%s/ 501" % context.absolute_url())87 return response.redirect("%s/101" % context.absolute_url()) -
WAeUP_SRP/trunk/skins/waeup_futminna/getStudentLevelsVoc.py
r6858 r6862 38 38 39 39 # FUTMinna only 40 if ikey == 501:40 if ikey == 101: 41 41 return "100 Level Carryover Courses" 42 42 -
WAeUP_SRP/trunk/skins/waeup_futminna/getStudyCourseInfo.py
r6858 r6862 94 94 (student_record.entry_mode.startswith('pd') and current_level == '500')) #fceokene only 95 95 96 info['may_register_ 501'] = (current_level == '500') and '501' not in levels96 info['may_register_101'] = (int(current_level) > 199) and '100' not in levels and '101' not in levels 97 97 98 98 missing_data = has_paid and\ -
WAeUP_SRP/trunk/skins/waeup_futminna/getStudyLevelInfo.py
r6858 r6862 47 47 info['has_verdict'] = has_verdict = level_doc.verdict 48 48 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'49 info['submission_allowed']= school_fee_paid and is_current_level and not has_verdict and level_id != '101' 50 info['validation_allowed']= review_state == 'courses_registered' and is_current_level and level_id != '101' 51 51 info['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' 53 53 info['validated'] = level_doc.validated_by and not (is_current_level and review_state in ('courses_registered',)) 54 54 info['show_check_boxes'] = (is_ca and school_fee_paid and is_current_level and not has_verdict) or\ 55 55 (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\ 57 57 (is_so) # and is_current_level and not has_verdict) 58 58 … … 90 90 info['credits_exceeded'] = total_credits > max_credits 91 91 current_session = student.session 92 info['show_submit'] = not info['credits_exceeded'] and level_id != ' 501'93 info['show_update'] = level_id != ' 501'92 info['show_submit'] = not info['credits_exceeded'] and level_id != '101' 93 info['show_update'] = level_id != '101' 94 94 #end customization 95 95 -
WAeUP_SRP/trunk/skins/waeup_futminna/study_course_view.pt
r6858 r6862 135 135 136 136 <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" 138 138 tal:define="rows python: info['items'];" 139 tal:condition="info/may_register_ 501"139 tal:condition="info/may_register_101" 140 140 > 141 141 <table width="100%" cellspacing="0" cellpadding="2" -
WAeUP_SRP/trunk/skins/waeup_student/register_courses.py
r6858 r6862 34 34 35 35 # FUTMinna only 36 if context.getId() == ' 501':36 if context.getId() == '101': 37 37 return 'Forbidden' 38 38
Note: See TracChangeset for help on using the changeset viewer.