- Timestamp:
- 14 Jun 2012, 08:08:27 (13 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
/main/waeup.uniben/trunk/src/waeup/uniben merged eligible /main/waeup.sirp/branches/uli-studentpw/src/waeup/aaue 6703-6755 /main/waeup.uniben/trunk/src/waeup/aaue 8720
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
-
main/waeup.aaue/trunk/src/waeup/aaue/students/browser.py
r8711 r8723 30 30 StudentBaseEditFormPage, StudentPersonalEditFormPage, 31 31 OnlinePaymentDisplayFormPage, OnlinePaymentAddFormPage, 32 OnlinePaymentBreadcrumb, ExportPDFPaymentSlipPage) 32 OnlinePaymentBreadcrumb, ExportPDFPaymentSlipPage, 33 StudentFilesUploadPage, emit_lock_message) 33 34 from waeup.kofa.students.viewlets import ( 34 PaymentReceiptActionButton )35 PaymentReceiptActionButton, StudentPassportActionButton) 35 36 from waeup.aaue.students.interfaces import ( 36 37 ICustomStudentBase, ICustomStudent, ICustomStudentPersonal, … … 38 39 ICustomStudentOnlinePayment, 39 40 ) 41 from waeup.kofa.students.workflow import ADMITTED 40 42 from waeup.aaue.interfaces import MessageFactory as _ 41 43 … … 207 209 # note = translate(_( 208 210 # u"""<br /><br /><br /> 209 #The tranzaction code for eTranzact paymentsis <strong>${a}</strong>.""",211 #The tranzaction code is <strong>${a}</strong>.""", 210 212 # mapping = {'a':tcode})) 211 213 # return note 214 215 class StudentPassportActionButton(StudentPassportActionButton): 216 217 @property 218 def target_url(self): 219 slip = getUtility(IExtFileStore).getFileByContext( 220 self.context, 'application_slip') 221 if self.context.state != ADMITTED or slip is not None: 222 return '' 223 return self.view.url(self.view.context, self.target) 224 225 class CustomStudentFilesUploadPage(StudentFilesUploadPage): 226 """ View to upload passport picture. 227 228 Students are not allowed to change the picture if they 229 passed the regular Kofa application. 230 """ 231 232 def update(self): 233 slip = getUtility(IExtFileStore).getFileByContext( 234 self.context, 'application_slip') 235 if self.context.state != ADMITTED or slip is not None: 236 emit_lock_message(self) 237 return 238 super(StudentFilesUploadPage, self).update() 239 return -
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py
r8677 r8723 19 19 import shutil 20 20 import tempfile 21 from StringIO import StringIO 21 22 from hurry.workflow.interfaces import IWorkflowState 22 23 from zope.component.hooks import setSite, clearSite … … 26 27 from waeup.kofa.students.tests.test_browser import StudentsFullSetup 27 28 from waeup.kofa.testing import FunctionalTestCase 29 from waeup.kofa.interfaces import ( 30 IExtFileStore, IFileStoreNameChooser) 28 31 from waeup.kofa.students.batching import StudentProcessor 29 32 from waeup.kofa.students.interfaces import IStudentsUtils … … 287 290 self.browser.getControl(name="form.password").value = 'spwd' 288 291 self.browser.getControl("Login").click() 292 # Even in state admitted students can't change the portait if 293 # application slip exists. 294 IWorkflowState(self.student).setState('admitted') 295 self.browser.open(self.student_path) 296 self.assertTrue('Change portrait' in self.browser.contents) 297 file_store = getUtility(IExtFileStore) 298 applicant_slip = 'My application slip' 299 file_id = IFileStoreNameChooser(self.student).chooseName( 300 attr="application_slip.pdf") 301 file_store.createFile(file_id, StringIO(applicant_slip)) 302 self.browser.open(self.student_path) 303 self.assertFalse('Change portrait' in self.browser.contents) 304 self.browser.open(self.student_path + '/change_portrait') 305 self.assertTrue('The requested form is locked' in self.browser.contents) 289 306 # Student can view and edit clearance data 290 307 self.browser.getLink("Clearance Data").click()
Note: See TracChangeset for help on using the changeset viewer.