Changeset 9545 for main/waeup.kofa/trunk/src/waeup
- Timestamp:
- 5 Nov 2012, 18:39:56 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
r9495 r9545 214 214 self.flash(_('You logged in.')) 215 215 if self.request.principal.user_type == 'student': 216 student = grok.getSite()['students'][ 217 self.request.principal.id] 216 218 rel_link = '/students/%s' % self.request.principal.id 219 if student.personal_data_expired: 220 rel_link = '/students/%s/edit_personal' % ( 221 self.request.principal.id) 222 self.flash( 223 _('Your personal data record expired. ' 224 'Please update.')) 217 225 self.redirect(self.application_url() + rel_link) 218 226 return -
main/waeup.kofa/trunk/src/waeup/kofa/students/student.py
r9521 r9545 202 202 return False 203 203 204 @property 205 def personal_data_expired(self): 206 now = datetime.utcnow() 207 if self.personal_updated: 208 days_ago = getattr( 209 now - self.personal_updated, 'days') 210 if days_ago > 180: 211 return True 212 return False 213 204 214 def transfer(self, certificate, current_session=None, 205 215 current_level=None, current_verdict=None, previous_verdict=None):
Note: See TracChangeset for help on using the changeset viewer.