Changeset 1281 for WAeUP_SRP/trunk


Ignore:
Timestamp:
12 Jan 2007, 09:49:31 (18 years ago)
Author:
Henrik Bettermann
Message:

mail_password_form now works for all students

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

Legend:

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

    r1268 r1281  
    3838students_object = context.portal_url.getPortalObject().campus.students
    3939student = getattr(students_object, student_id)
    40 info['student'] = student
    41 info['id'] = student_id
    42 info['review_state'] = wf.getInfoFor(student,'review_state',None)
    43 info['per'] = student.personal
    44 info['app'] = student.application
    45 info['per_doc'] = student.personal.getContent()
    46 info['app_doc'] = student.application.getContent()
    47 info['clear_doc'] = student.clearance.getContent()
    48 info['password'] = context.waeup_tool.getCredential(student_id)
    4940
    50 if info['per_doc'].email:
    51     info['email'] = info['per_doc'].email
    52 else:
    53     info['email'] = info['app_doc'].app_email
     41if hasattr(student,"application"):
    5442
    55 msg="""
     43    info['student'] = student
     44    info['id'] = student_id
     45    info['review_state'] = wf.getInfoFor(student,'review_state',None)
     46    info['per'] = student.personal
     47    info['app'] = student.application
     48    info['per_doc'] = student.personal.getContent()
     49    info['app_doc'] = student.application.getContent()
     50    info['clear_doc'] = student.clearance.getContent()
     51    info['password'] = context.waeup_tool.getCredential(student_id)
     52
     53    if info['per_doc'].email:
     54        info['email'] = info['per_doc'].email
     55    else:
     56        info['email'] = info['app_doc'].app_email
     57
     58    msg="""
    5659Your SRP Member Details
    5760-----------------------
     
    6871"""
    6972
    70 info['message'] = msg % (
    71     student.Title(),
    72     student_id,
    73     info['clear_doc'].matric_no,
    74     info['app_doc'].jamb_reg_no,
    75     info['app_doc'].app_email,
    76     info['per_doc'].email,
    77     info['clear_doc'].birthday,
    78     info['password']
    79     )
     73    info['message'] = msg % (
     74        student.Title(),
     75        student_id,
     76        info['clear_doc'].matric_no,
     77        info['app_doc'].jamb_reg_no,
     78        info['app_doc'].app_email,
     79        info['per_doc'].email,
     80        info['clear_doc'].birthday,
     81        info['password']
     82        )
     83else:
     84       
     85    info['student'] = student
     86    info['id'] = student_id
     87    info['review_state'] = wf.getInfoFor(student,'review_state',None)
     88    info['password'] = context.waeup_tool.getCredential(student_id)
     89    info['email'] = 'na'
     90
     91    msg="""
     92Your SRP Member Details
     93-----------------------
     94
     95Fullname: %s
     96Student Id: %s
     97Password: %s
     98
     99"""
     100
     101    info['message'] = msg % (
     102        'na',
     103        student_id,
     104        info['password']
     105        )
     106       
     107       
     108       
     109                   
    80110
    81111return info
  • WAeUP_SRP/trunk/skins/waeup_student/mail_password_form.pt

    r1268 r1281  
    3030          </td>
    3131          <td>
    32              <span tal:content="info/student/Title" />
     32             <span tal:condition="info/student/Title" tal:content="info/student/Title" />
     33             <span tal:condition="not:info/student/Title">na</span>
    3334          </td>
    3435        </tr>
     
    6263          </td>
    6364        </tr>
    64         <tr>
     65        <tr tal:condition="python: info['email']!='na'">
    6566          <td>&nbsp;</td>
    6667          <td><input name="Submit" type="submit" class="standalone" value="Submit" /><br /><br /></td>
Note: See TracChangeset for help on using the changeset viewer.