Changeset 15333
- Timestamp:
- 17 Feb 2019, 10:51:02 (6 years ago)
- Location:
- main/waeup.kofa/trunk
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/CHANGES.txt
r15286 r15333 4 4 1.6.1.dev0 (unreleased) 5 5 ======================= 6 7 * Add `transcript_remark` field to study levels. Add page to allow 8 transcript officers editing the field during transcript processing. 6 9 7 10 * Increase password strength. Officers are now required … … 77 80 faculty_code *and* department_code in create mode. 78 81 79 * Add 'Update all tickets' button to StudyLevelEditFormPage.82 * Add 'Update all tickets' button to `StudyLevelEditFormPage`. 80 83 81 84 * Do not allow to create more than 10 students with a single request to -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r15312 r15333 1203 1203 pnav = 4 1204 1204 1205 @property 1206 def remarks(self): 1207 portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE 1208 levelremarks = '' 1209 studylevelsource = StudyLevelSource().factory 1210 for studylevel in self.context.values(): 1211 leveltitle = studylevelsource.getTitle( 1212 self.context, studylevel.level) 1213 url = self.url(self.context) + '/%s/remark' % studylevel.level 1214 button_title = translate( 1215 _('Edit'), 'waeup.kofa', target_language=portal_language) 1216 levelremarks += ( 1217 '<tr>' 1218 '<td>%s:</td>' 1219 '<td>%s</td> ' 1220 '<td><a class="btn btn-primary btn-xs" href="%s">%s</a></td>' 1221 '</tr>' 1222 ) % ( 1223 leveltitle, studylevel.transcript_remark, url, button_title) 1224 return levelremarks 1225 1205 1226 def update(self, SUBMIT=None): 1206 1227 super(StudentTranscriptValidateFormPage, self).update() … … 1252 1273 buttonname = _('Save comment and release transcript') 1253 1274 pnav = 4 1275 1276 @property 1277 def remarks(self): 1278 levelremarks = '' 1279 studylevelsource = StudyLevelSource().factory 1280 for studylevel in self.context.values(): 1281 leveltitle = studylevelsource.getTitle( 1282 self.context, studylevel.level) 1283 levelremarks += "%s: %s <br><br>" % ( 1284 leveltitle, studylevel.transcript_remark) 1285 return levelremarks 1254 1286 1255 1287 def update(self, SUBMIT=None): … … 1651 1683 (', '.join(deleted), self.context.level)) 1652 1684 self.redirect(self.url(self.context, u'@@manage')+'#tab2') 1685 return 1686 1687 class StudyLevelRemarkFormPage(KofaEditFormPage): 1688 """ Page to edit the student study level transcript remark only 1689 """ 1690 grok.context(IStudentStudyLevel) 1691 grok.name('remark') 1692 grok.require('waeup.processTranscript') 1693 grok.template('studylevelremarkpage') 1694 form_fields = grok.AutoFields(IStudentStudyLevel).omit('level') 1695 form_fields['level_session'].for_display = True 1696 form_fields['level_verdict'].for_display = True 1697 form_fields['validation_date'].for_display = True 1698 form_fields['validated_by'].for_display = True 1699 1700 def update(self, ADD=None, course=None): 1701 if self.context.student.studycourse_locked: 1702 emit_lock_message(self) 1703 return 1704 super(StudyLevelRemarkFormPage, self).update() 1705 1706 @property 1707 def label(self): 1708 lang = self.request.cookies.get('kofa.language') 1709 level_title = translate(self.context.level_title, 'waeup.kofa', 1710 target_language=lang) 1711 return _('Edit transcript remark of level ${a}', mapping = {'a':level_title}) 1712 1713 @property 1714 def translated_values(self): 1715 return translated_values(self) 1716 1717 @action(_('Save remark and go and back to transcript validation page'), 1718 style='primary') 1719 def save(self, **data): 1720 msave(self, **data) 1721 self.redirect( 1722 self.url(self.context.student, 'studycourse/validate_transcript') 1723 +'#tab4') 1653 1724 return 1654 1725 -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/transcriptprocess.pt
r15174 r15333 15 15 <a href="#tab3" data-toggle="tab"> 16 16 <span i18n:translate="">View signatures</span> 17 </a> 18 </li> 19 <li> 20 <a href="#tab4" data-toggle="tab"> 21 <span i18n:translate="">View remarks</span> 17 22 </a> 18 23 </li> … … 50 55 <br /><p tal:content="structure view/signees"></p> 51 56 </div> 57 58 <div id="tab4" class="tab-pane"> 59 <br /> 60 <table class="table-condensed"> 61 <tbody> 62 <span tal:omit-tag="" tal:content="structure view/remarks"></span> 63 </tbody> 64 </table> 65 </div> 52 66 </div> 53 67 -
main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py
r15246 r15333 614 614 ) 615 615 616 transcript_remark = schema.TextLine( 617 title = _(u'Transcript Remark'), 618 required = False, 619 readonly = False, 620 ) 621 616 622 def addCourseTicket(ticket, course): 617 623 """Add a course ticket object. -
main/waeup.kofa/trunk/src/waeup/kofa/students/permissions.py
r15173 r15333 159 159 """The Transcript Officer is allowed to view, to validate and to 160 160 release student transcripts. The officer is not allowed to 161 manage student data. 161 manage student data but to edit the transcript remark on a separate 162 manage page. 162 163 """ 163 164 grok.name('waeup.TranscriptOfficer') -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py
r15285 r15333 490 490 result, 491 491 'gpa,level,level_session,level_verdict,total_credits,' 492 ' validated_by,validation_date,'492 'transcript_remark,validated_by,validation_date,' 493 493 'student_id,number_of_tickets,certcode\r\n' 494 '0.00,,,0,0,,,, 0,\r\n'494 '0.00,,,0,0,,,,,0,\r\n' 495 495 ) 496 496 return … … 508 508 result, 509 509 'gpa,level,level_session,level_verdict,total_credits,' 510 ' validated_by,validation_date,'510 'transcript_remark,validated_by,validation_date,' 511 511 'student_id,number_of_tickets,certcode\r\n' 512 '0.00,100,2012,A,100,,, A111111,1,CERT1\r\n'512 '0.00,100,2012,A,100,,,,A111111,1,CERT1\r\n' 513 513 ) 514 514 return … … 524 524 result, 525 525 'gpa,level,level_session,level_verdict,total_credits,' 526 ' validated_by,validation_date,'526 'transcript_remark,validated_by,validation_date,' 527 527 'student_id,number_of_tickets,certcode\r\n' 528 '0.00,100,2012,A,100,,, A111111,1,CERT1\r\n'528 '0.00,100,2012,A,100,,,,A111111,1,CERT1\r\n' 529 529 ) 530 530 return … … 539 539 result, 540 540 'gpa,level,level_session,level_verdict,total_credits,' 541 ' validated_by,validation_date,'541 'transcript_remark,validated_by,validation_date,' 542 542 'student_id,number_of_tickets,certcode\r\n' 543 '0.00,100,2012,A,100,,, A111111,1,CERT1\r\n'543 '0.00,100,2012,A,100,,,,A111111,1,CERT1\r\n' 544 544 ) 545 545 return … … 558 558 result, 559 559 'gpa,level,level_session,level_verdict,total_credits,' 560 ' validated_by,validation_date,'560 'transcript_remark,validated_by,validation_date,' 561 561 'student_id,number_of_tickets,certcode\r\n' 562 '0.00,100,2012,A,100,,, A111111,1,CERT1\r\n'562 '0.00,100,2012,A,100,,,,A111111,1,CERT1\r\n' 563 563 ) 564 564 return … … 577 577 result, 578 578 'gpa,level,level_session,level_verdict,total_credits,' 579 ' validated_by,validation_date,'579 'transcript_remark,validated_by,validation_date,' 580 580 'student_id,number_of_tickets,certcode\r\n' 581 '0.00,100,2012,A,100,,, A111111,1,CERT1\r\n'581 '0.00,100,2012,A,100,,,,A111111,1,CERT1\r\n' 582 582 ) 583 583 return -
main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py
r15332 r15333 295 295 #sgpa = '%s: %.2f' % (trans('Sessional GPA (rectified)', lang), level['sgpa']) 296 296 data.append(Paragraph(sgpa, style["Normal"])) 297 if getattr(level_obj, ' remark', None):297 if getattr(level_obj, 'transcript_remark', None): 298 298 remark = '%s: %s' % ( 299 trans('Remark', lang), getattr(level_obj, 'remark')) 299 trans('Transcript Remark', lang), 300 getattr(level_obj, 'transcript_remark')) 300 301 data.append(Paragraph(remark, style["Normal"])) 301 302 return data
Note: See TracChangeset for help on using the changeset viewer.