Changeset 1483 for WAeUP_SRP/trunk/skins/waeup_student
- Timestamp:
- 23 Feb 2007, 21:54:05 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_student/getStudyCourseInfo.py
r1482 r1483 43 43 info['course'] = None 44 44 items = [] 45 current_level = sbrain.level46 levels = context.objectIds()47 review_state = wftool.getInfoFor(context,'review_state',None)48 if review_state != 'content_addable':49 context.portal_workflow.doActionFor(context,'close_for_edit')45 #current_level = sbrain.level 46 #levels = context.objectIds() 47 #review_state = wftool.getInfoFor(context,'review_state',None) 48 #if review_state != 'content_addable': 49 # context.portal_workflow.doActionFor(context,'close_for_edit') 50 50 51 levels.sort()52 if not levels:53 context.invokeFactory('StudentStudyLevel',"%s" % current_level) 54 level = getattr(context,"%s" % current_level)55 session = context.getSessionString()56 level.getContent().edit(mapping={'session': session})57 context.portal_workflow.doActionFor(level,'open')58 context.portal_workflow.doActionFor(level,'close_for_edit')59 levels.append(current_level)60 for l in levels:61 row = {}62 row['id'] = l63 row['title'] = "Level %s" % l64 row['url'] = "%s/%s" % (context.absolute_url(),l)65 items.append(row)51 #levels.sort() 52 #if not levels: 53 # context.invokeFactory('StudentStudyLevel',"%s" % current_level) 54 # level = getattr(context,"%s" % current_level) 55 # session = context.getSessionString() 56 # level.getContent().edit(mapping={'session': session}) 57 # context.portal_workflow.doActionFor(level,'open') 58 # context.portal_workflow.doActionFor(level,'close_for_edit') 59 # levels.append(current_level) 60 #for l in levels: 61 # row = {} 62 # row['id'] = l 63 # row['title'] = "Level %s" % l 64 # row['url'] = "%s/%s" % (context.absolute_url(),l) 65 # items.append(row) 66 66 67 67 info['items'] = items
Note: See TracChangeset for help on using the changeset viewer.