Changeset 3392


Ignore:
Timestamp:
28 Mar 2008, 10:07:38 (17 years ago)
Author:
joachim
Message:

check for expiration

Location:
WAeUP_SRP/base
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/Widgets.py

    r3369 r3392  
    12191219         {'id': 'reuse_pin', 'type': 'boolean', 'mode': 'w',
    12201220         'label': 'Reuse Application Pin'},
     1221         {'id': 'expiration_date', 'type': 'date', 'mode': 'w',
     1222         'label': 'Exspiration Date'},
    12211223        )
    12221224    prefix = ''
    12231225    reference = ''
    12241226    reuse_pin = False
    1225 
     1227   
    12261228    def prepare(self, datastructure, **kw): ###(
    12271229        """Prepare datastructure from datamodel."""
     
    14711473        member_id = str(self.portal_membership.getAuthenticatedMember())
    14721474        do = 1
     1475        expiration_date = self.REQUEST.get('expiration_date')
    14731476        if self.isStaff():
    14741477            do = 0
     
    15011504                s_logger.info('%s/%s entered wrong data together with PIN %s' % (member_id,ref,pin_str))
    15021505        while do:
     1506            if expiration_date and DateTime(expiration_date).lessThan(DateTime()):
     1507                if not pins(student=ref):
     1508                    #import pdb;pdb.set_trace()
     1509                    err = 'no application record found'
     1510                    s_logger.info('%s/%s tried new application though expired with PIN %s' % (member_id,ref,pin_str))
     1511                    break
    15031512            ok,pin_record = pins.searchAndSetRecord(pin,ref,prefix)
    15041513            if ok < -2 or ok > 2:
  • WAeUP_SRP/base/doc/srp_documentation.mm

    r3172 r3392  
    22<!-- To view this file, download free mind mapping software FreeMind from http://freemind.sourceforge.net -->
    33<node CREATED="1170079518946" ID="Freemind_Link_650524897" MODIFIED="1172489583516" TEXT="WAeUP Documentation">
    4 <node CREATED="1172489529057" FOLDED="true" ID="Freemind_Link_43083883" MODIFIED="1172489545651" POSITION="right" TEXT="SRP Data Structure">
     4<node CREATED="1172489529057" ID="Freemind_Link_43083883" MODIFIED="1172489545651" POSITION="right" TEXT="SRP Data Structure">
    55<node CREATED="1170079621592" ID="Freemind_Link_1297017754" MODIFIED="1170079640872" TEXT="Campus">
    66<node CREATED="1171710559043" ID="Freemind_Link_1592396213" MODIFIED="1171710565212" TEXT="Id: campus"/>
     
    232232</node>
    233233</node>
     234<node CREATED="1206110102419" ID="ID_535009408" MODIFIED="1206110113139" TEXT="Data Import">
     235<node CREATED="1206110116296" ID="ID_1977539873" MODIFIED="1206110147170" TEXT="Student">
     236<node CREATED="1171124926993" ID="ID_677833643" LINK="../profiles/default/schemas/import_student.xml" MODIFIED="1206110297279" TEXT="Schema: import_student"/>
     237<node CREATED="1171124982312" ID="ID_246147802" LINK="../profiles/default/layouts/import_student.xml" MODIFIED="1206110362376" TEXT="Layout: import_student"/>
     238</node>
     239<node CREATED="1206110116296" ID="ID_53520087" MODIFIED="1206110772812" TEXT="Student Study Level">
     240<node CREATED="1171124926993" ID="ID_275196857" LINK="../profiles/default/schemas/import_student_study_level.xml" MODIFIED="1206110496797" TEXT="Schema: import_student_study_level"/>
     241<node CREATED="1171124982312" ID="ID_1813331706" LINK="../profiles/default/layouts/import_student_study_level.xml" MODIFIED="1206110506764" TEXT="Layout: import_student_study_level"/>
     242</node>
     243<node CREATED="1206110116296" ID="ID_1116667508" MODIFIED="1206110589175" TEXT="Student Course Results">
     244<node CREATED="1171124926993" ID="ID_1895773400" LINK="../profiles/default/schemas/import_course_result.xml" MODIFIED="1206110707820" TEXT="Schema: import_course_result"/>
     245<node CREATED="1171124982312" ID="ID_1828896749" LINK="../profiles/default/layouts/import_course_result.xml" MODIFIED="1206110733175" TEXT="Layout: import_course_result"/>
     246</node>
     247</node>
    234248</node>
    235249<node CREATED="1171379675232" FOLDED="true" ID="Freemind_Link_41196870" MODIFIED="1171379685192" TEXT="User Interface">
  • WAeUP_SRP/base/skins/waeup_student/apply_admission.py

    r3342 r3392  
    163163without_reg_no = screening_type in ('prence','cest','sandwich')
    164164info['expired'] = current.greaterThan(deaddates[screening_type])
     165info['expiration_date'] = deaddates[screening_type]
    165166
    166167
     
    176177                             ob=object,
    177178                             commit = False,
     179                             expiration_date = deaddates[screening_type],
    178180                            )
    179181if slip:
  • WAeUP_SRP/base/skins/waeup_student/apply_admission_form.pt

    r3384 r3392  
    3535                 tal:attributes="value ds/pin|nothing"
    3636                 tal:condition="ds/pin|nothing"/>
     37          <input type="hidden" name="expiration_date"
     38                 tal:attributes="value info/expiration_date|nothing"
     39                 tal:condition="info/expiration_date|nothing"/>
    3740               
    3841          <div tal:replace="structure rendered_main" />
Note: See TracChangeset for help on using the changeset viewer.