Changeset 8182 for main/waeup.kofa/trunk/src/waeup/kofa/students
- Timestamp:
- 16 Apr 2012, 20:56:59 (13 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/accommodation.py
r7811 r8182 21 21 from datetime import datetime 22 22 import grok 23 from zope.component import getUtility 23 24 from zope.component.interfaces import IFactory 24 25 from zope.interface import implementedBy 25 from waeup.kofa.interfaces import academic_sessions_vocab 26 from waeup.kofa.interfaces import academic_sessions_vocab, IKofaUtils 26 27 from waeup.kofa.students.interfaces import ( 27 28 IStudentAccommodation, IStudentNavigation, IBedTicket) … … 61 62 def __init__(self): 62 63 super(BedTicket, self).__init__() 63 self.booking_date = datetime.now() 64 tz = getUtility(IKofaUtils).tzinfo 65 self.booking_date = datetime.now(tz) 64 66 self.bed = None 65 67 return -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r8176 r8182 1145 1145 self.context.r_code = u'00' 1146 1146 self.context.p_state = 'paid' 1147 self.context.payment_date = datetime.now() 1147 tz = getUtility(IKofaUtils).tzinfo 1148 self.context.payment_date = datetime.now(tz) 1148 1149 if self.context.p_category == 'clearance': 1149 1150 # Create CLR access code -
main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py
r8176 r8182 379 379 ) 380 380 381 def addCourseTicket(courseticket): 382 """Add a course ticket object. 383 """ 384 385 def getStudent(): 386 """Return student 387 """ 388 381 389 class ICourseTicket(IKofaObject): 382 390 """A course ticket. -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r8119 r8182 26 26 import grok 27 27 from zope.event import notify 28 from zope.component import createObject, queryUtility 28 from zope.component import createObject, queryUtility, getUtility 29 29 from zope.component.hooks import setSite, clearSite 30 30 from zope.catalog.interfaces import ICatalog … … 40 40 from waeup.kofa.university.faculty import Faculty 41 41 from waeup.kofa.university.department import Department 42 from waeup.kofa.interfaces import IUserAccount 42 from waeup.kofa.interfaces import IUserAccount, IKofaUtils 43 43 from waeup.kofa.authentication import LocalRoleSetEvent 44 44 from waeup.kofa.hostels.hostel import Hostel, Bed, NOT_OCCUPIED … … 121 121 # Create 5 access codes with prefix'PWD' 122 122 pin_container = self.app['accesscodes'] 123 tz = getUtility(IKofaUtils).tzinfo 123 124 pin_container.createBatch( 124 datetime.now( ), 'some_userid', 'PWD', 9.99, 5)125 datetime.now(tz), 'some_userid', 'PWD', 9.99, 5) 125 126 pins = pin_container['PWD-1'].values() 126 127 self.pwdpins = [x.representation for x in pins]
Note: See TracChangeset for help on using the changeset viewer.