- Timestamp:
- 18 Sep 2018, 10:20:39 (6 years ago)
- Location:
- main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa/students
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa/students/browser.py
r15140 r15143 264 264 form = self.request.form 265 265 self.hitlist = [] 266 if form.get('searchtype', None) == 'suspended': 267 self.searchtype = form['searchtype'] 268 self.searchterm = None 269 elif form.get('searchtype', None) == 'transcript': 266 if form.get('searchtype', None) in ('suspended', TRANSREQ, TRANSVAL): 270 267 self.searchtype = form['searchtype'] 271 268 self.searchterm = None … … 309 306 form = self.request.form 310 307 self.hitlist = [] 311 if form.get('searchtype', None) == 'suspended':308 if form.get('searchtype', None) in ('suspended', TRANSREQ, TRANSVAL): 312 309 self.searchtype = form['searchtype'] 313 310 self.searchterm = None … … 1153 1150 grok.name('validate_transcript') 1154 1151 grok.require('waeup.processTranscript') 1155 form_fields = grok.AutoFields(IStudentTranscript)1156 1152 1157 1153 def update(self, SUBMIT=None): -
main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa/students/browser_templates/containermanagepage.pt
r13347 r15143 17 17 with deactivated account (search term omitted) 18 18 </option> 19 <option i18n:translate="" value="transcript"> 20 who requested transcript (search term omitted) 19 <option i18n:translate="" value="transcript requested"> 20 in state 'transcript requested' (search term omitted) 21 </option> 22 <option i18n:translate="" value="transcript validated"> 23 in state 'transcript validated' (search term omitted) 21 24 </option> 22 25 </select> -
main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa/students/browser_templates/containerpage.pt
r11254 r15143 17 17 with deactivated account (search term omitted) 18 18 </option> 19 <option i18n:translate="" value="transcript"> 20 who requested transcript (search term omitted) 19 <option i18n:translate="" value="transcript requested"> 20 in state 'transcript requested' (search term omitted) 21 </option> 22 <option i18n:translate="" value="transcript validated"> 23 in state 'transcript validated' (search term omitted) 21 24 </option> 22 25 </select> -
main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa/students/browser_templates/transcriptrelease.pt
r15128 r15143 12 12 </a> 13 13 </li> 14 <li> 15 <a href="#tab3" data-toggle="tab"> 16 <span i18n:translate="">View signatures</span> 17 </a> 18 </li> 14 19 </ul> 15 20 … … 20 25 <tbody> 21 26 <tr> 22 <td i18n:translate="">27 <td class="fieldname" i18n:translate=""> 23 28 Comment: 24 29 </td> … … 41 46 <p tal:content="structure view/correspondence"></p> 42 47 </div> 48 49 <div id="tab3" class="tab-pane"> 50 <p tal:content="structure context/transcript_signees"></p> 51 </div> 43 52 </div> 44 53 -
main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa/students/catalog.py
r10465 r15143 29 29 from waeup.kofa.students.interfaces import IStudent, ICourseTicket 30 30 from waeup.kofa.university.vocabularies import course_levels 31 from waeup.kofa.students.workflow import (TRANSREQ, TRANSVAL) 31 32 32 33 class StudentsCatalog(grok.Indexes): … … 88 89 hitlist.append(StudentQueryResultItem(student, view=view)) 89 90 return hitlist 90 elif searchtype == 'transcript':91 elif searchtype in (TRANSREQ, TRANSVAL): 91 92 cat = queryUtility(ICatalog, name='students_catalog') 92 results = cat.searchResults( 93 state=('transcript requested', 'transcript requested')) 93 results = cat.searchResults(state=(searchtype, searchtype)) 94 94 else: 95 95 # Temporary solution to display all students added -
main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa/students/interfaces.py
r14702 r15143 219 219 transcript_enabled = Attribute('True if transcript processing is enabled') 220 220 clearance_locked = Attribute('True if clearance form is locked') 221 studycourse_locked = Attribute( 222 'True if nobody is allowed to change studycourse, studylecel or ' 223 'course ticket data, neither through the UI nor via import') 221 224 222 225 password = Attribute('Encrypted password') … … 376 379 transcript_comment = schema.Text( 377 380 title = _(u'Comment'), 381 required = False, 382 ) 383 384 transcript_signees = schema.Text( 385 title = _(u'Signees'), 378 386 required = False, 379 387 ) -
main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa/students/tests/test_browser.py
r15141 r15143 2146 2146 # Officer can search for students in state 'transcript requested' 2147 2147 self.browser.open(self.container_path) 2148 self.browser.getControl(name="searchtype").value = ['transcript ']2148 self.browser.getControl(name="searchtype").value = ['transcript requested'] 2149 2149 self.browser.getControl("Find student(s)").click() 2150 2150 self.assertTrue('Anna Tester' in self.browser.contents) … … 3628 3628 'officer_comment,perm_address,personal_updated,phone,reg_number,' 3629 3629 'sex,student_id,suspended,suspended_comment,transcript_comment,' 3630 ' password,state,history,certcode,is_postgrad,current_level,'3631 'current_ session\r\n'3630 'transcript_signees,password,state,history,certcode,is_postgrad,' 3631 'current_level,current_session\r\n' 3632 3632 ',,1981-02-04#,aa@aa.ng,,Anna,,Tester,234,,,,,,' 3633 '1234#,123,m,K1000000,0,,, {SSHA}' in self.browser.contents)3633 '1234#,123,m,K1000000,0,,,,{SSHA}' in self.browser.contents) 3634 3634 3635 3635 def test_payment_dates(self): … … 3734 3734 'officer_comment,perm_address,personal_updated,phone,reg_number,' 3735 3735 'sex,student_id,suspended,suspended_comment,transcript_comment,' 3736 ' password,state,history,certcode,is_postgrad,current_level,'3737 'current_ session\r\n'3736 'transcript_signees,password,state,history,certcode,is_postgrad,' 3737 'current_level,current_session\r\n' 3738 3738 ',,1981-02-04#,aa@aa.ng,,Anna,,Tester,234,,,,,,' 3739 '1234#,123,m,K1000000,0,,, {SSHA}' in self.browser.contents)3739 '1234#,123,m,K1000000,0,,,,{SSHA}' in self.browser.contents) 3740 3740 self.assertEqual(len(self.app['datacenter'].running_exports), 1) 3741 3741 job_id = self.app['datacenter'].running_exports[0][0] -
main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa/students/tests/test_export.py
r15060 r15143 127 127 'my adm code,my clr code,1981-02-04#,anna@sample.com,,' 128 128 'Anna,,Tester,234,M.,NG,,"Studentroad 21\nLagos 123456\n",,' 129 '+234-123-12345#,123,f,A111111,0,,,, created'129 '+234-123-12345#,123,f,A111111,0,,,,,created' 130 130 ) 131 131 … … 160 160 'nationality,officer_comment,perm_address,personal_updated,' 161 161 'phone,reg_number,sex,student_id,suspended,suspended_comment,' 162 'transcript_comment, password,state,history,certcode,is_postgrad,'163 'c urrent_level,current_session\r\n'162 'transcript_comment,transcript_signees,password,state,history,' 163 'certcode,is_postgrad,current_level,current_session\r\n' 164 164 'my adm code,my clr code,' 165 165 '1981-02-04#,anna@sample.com,,Anna,,Tester,234,M.,NG,,' 166 166 '"Studentroad 21\nLagos 123456\n",,+234-123-12345#,123,f,' 167 'A111111,0,,,, created'167 'A111111,0,,,,,created' 168 168 in result 169 169 ) … … 182 182 'nationality,officer_comment,perm_address,personal_updated,' 183 183 'phone,reg_number,sex,student_id,suspended,suspended_comment,' 184 'transcript_comment, password,state,history,certcode,'184 'transcript_comment,transcript_signees,password,state,history,certcode,' 185 185 'is_postgrad,current_level,current_session\r\n' 186 186 'my adm code,my clr code,1981-02-04#,anna@sample.com,,' 187 187 'Anna,,Tester,234,M.,NG,,"Studentroad 21\nLagos 123456\n"' 188 ',,+234-123-12345#,123,f,A111111,0,,,, created'188 ',,+234-123-12345#,123,f,A111111,0,,,,,created' 189 189 in result 190 190 ) … … 202 202 'nationality,officer_comment,perm_address,personal_updated,' 203 203 'phone,reg_number,sex,student_id,suspended,suspended_comment,' 204 'transcript_comment, password,state,history,certcode,'204 'transcript_comment,transcript_signees,password,state,history,certcode,' 205 205 'is_postgrad,current_level,current_session\r\n' 206 206 'my adm code,my clr code,1981-02-04#,anna@sample.com,,' 207 207 'Anna,,Tester,234,M.,NG,,"Studentroad 21\nLagos 123456\n"' 208 ',,+234-123-12345#,123,f,A111111,0,,,, created'208 ',,+234-123-12345#,123,f,A111111,0,,,,,created' 209 209 in result 210 210 )
Note: See TracChangeset for help on using the changeset viewer.