Changeset 1157


Ignore:
Timestamp:
30 Dec 2006, 15:50:04 (18 years ago)
Author:
Henrik Bettermann
Message:

penalty logic changed

Location:
WAeUP_SRP/trunk/skins/waeup_student
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_student/getClearanceInfo.py

    r1156 r1157  
    4444    return None
    4545creation_date = DateTime(res[0].CreationDate)
    46 info['penalty'] = creation_date.lessThan(DateTime('2006/12/5'))\
    47                   and DateTime().greaterThan(DateTime('2006/12/30'))
     46info['penalty'] = creation_date.lessThan(DateTime('2006/12/5'))
    4847info['id'] = student_id
    4948info['student'] = student
     
    5453info['clear_doc'] = student.clearance.getContent()
    5554info['clear_review_state'] = wf.getInfoFor(student.clearance,'review_state',None)
    56 if info['clear_review_state'] == "clearance_requested":
     55if info['clear_review_state'] in ('clearance_requested', 'cleared_and_validated',):
    5756    info['penalty'] = info['penalty'] and\
    58                       info['clear_doc'].entry_date.lessThan(DateTime('2006/12/30'))
     57                      info['clear_doc'].entry_date.greaterThan(DateTime('2006/12/30'))
    5958course = getattr(student,'study_course',None)
    6059if course:
  • WAeUP_SRP/trunk/skins/waeup_student/getStudentInfo.py

    r1145 r1157  
    2323logger = logging.getLogger('Student.Info')
    2424
    25 from DateTime import DateTime
    2625
    2726info = {}
     
    6362##brain = res[-1]
    6463##student = brain.getObject()
    65 
    66 creation_date = DateTime(student.creation_date)
    67 info['penalty'] = creation_date.lessThan(DateTime('2006/12/5'))\
    68                   and DateTime().greaterThan(DateTime('2006/12/30'))
    6964
    7065info['review_state'] = wf.getInfoFor(student,'review_state',None)
Note: See TracChangeset for help on using the changeset viewer.