Changeset 14992 for main/waeup.kofa/trunk/src/waeup/kofa/browser
- Timestamp:
- 26 Apr 2018, 08:50:56 (7 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/browser
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
r14939 r14992 61 61 IPasswordValidator, IContactForm, IKofaUtils, ICSVExporter, 62 62 academic_sessions_vocab, DOCLINK, registration_states_vocab) 63 from waeup.kofa.university.department import Department 64 from waeup.kofa.university.course import Course 63 65 from waeup.kofa.permissions import ( 64 66 get_users_with_local_roles, get_all_roles, get_all_users, … … 1011 1013 @property 1012 1014 def getCourses(self): 1015 courses = [] 1013 1016 local_roles = get_user_account(self.request).getLocalRoles() 1014 return local_roles['waeup.local.Lecturer'] 1017 for item in local_roles.get('waeup.local.Lecturer', []): 1018 if isinstance(item, Course): 1019 courses.append(item) 1020 elif isinstance(item, Department): 1021 courses += [i for i in item.courses.values()] 1022 return courses 1015 1023 1016 1024 # -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/mycourses.pt
r13908 r14992 5 5 <div tal:repeat="course view/getCourses"> 6 6 <a tal:attributes="href python:view.url(course)"> 7 <span tal:content="course/title">ROLE</span> 8 (<span tal:content="course/code">ROLE</span>) 7 <span tal:content="python:course.__parent__.__parent__.__parent__.code">FAC</span> / 8 <span tal:content="python:course.__parent__.__parent__.code">DEP</span> / 9 <span tal:content="course/longtitle">COURSE</span> 9 10 </a> 10 11 </div>
Note: See TracChangeset for help on using the changeset viewer.