- Timestamp:
- 20 Sep 2018, 19:11:42 (6 years ago)
- Location:
- main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa/browser
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa/browser/pages.py
r15155 r15157 1059 1059 return students 1060 1060 1061 class TranscriptSigneeLandingPage(KofaPage): 1062 """Display students with validated transcript requests, when 1063 transcript signee logs in. 1064 """ 1065 grok.name('my_transcript_signing_requests') 1066 grok.require('waeup.Authenticated') 1067 grok.context(IUniversity) 1068 grok.template('mytranscriptrequests') 1069 label =_('My ToDoList') 1070 1071 @property 1072 def getStudents(self): 1073 students = ([],[]) 1074 cat = queryUtility(ICatalog, name='students_catalog') 1075 local_roles = get_user_account(self.request).getLocalRoles() 1076 for item in local_roles.get('waeup.local.TranscriptSignee', []): 1077 if isinstance(item, Faculty): 1078 faccode = item.code 1079 results = cat.searchResults( 1080 state=(TRANSVAL, TRANSVAL), faccode=(faccode, faccode)) 1081 for result in results: 1082 students[1].append(StudentQueryResultItem(result, self)) 1083 return students 1084 1061 1085 # 1062 1086 # Search pages... -
main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa/browser/templates/mytranscriptrequests.pt
r15154 r15157 1 1 <h3 i18n:domain="waeup.kofa" i18n:translate="" tal:condition="python:view.getStudents[0]"> 2 Transcript requested2 Transcripts to be validated 3 3 </h3> 4 4 <div tal:repeat="student python:view.getStudents[0]"> … … 8 8 </div> 9 9 <h3 i18n:domain="waeup.kofa" i18n:translate="" tal:condition="python:view.getStudents[1]"> 10 Transcript validated10 Transcripts to be signed and released 11 11 </h3> 12 12 <div tal:repeat="student python:view.getStudents[1]"> -
main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa/browser/viewlets.py
r15155 r15157 384 384 return '' 385 385 386 class TranscriptSigneeStudents(ManageLink): 387 """A link to transcript signing requests. 388 """ 389 grok.order(6) 390 grok.require('waeup.Authenticated') 391 392 link = u'my_transcript_signing_requests' 393 text = _(u'My ToDoList') 394 395 def render(self): 396 user_account = get_user_account(self.request) 397 if user_account: 398 local_roles = user_account.getLocalRoles() 399 if local_roles.has_key('waeup.local.TranscriptSignee'): 400 url = self.view.url(grok.getSite(), self.link) 401 text = translate(self.text, context=self.request) 402 return u'<li><a href="%s">%s</a></li>' % (url, text) 403 return '' 404 386 405 class MyPreferences(ManageLink): 387 406 """A link to personal preferences, placed in upper left box.
Note: See TracChangeset for help on using the changeset viewer.