Ignore:
Timestamp:
10 Dec 2006, 18:39:15 (18 years ago)
Author:
joachim
Message:

Removed all fields except study_course from student_study_course
adde StudyCourse? Widget
M profiles/default/layouts/student_study_course.xml
M skins/waeup_default/waeup_edit.py
M Widgets.py
catch unauthorised errors
M skins/waeup_student/application_edit_form.pt
M skins/waeup_student/getStudentInfo.py
M skins/waeup_student/study_course_view.pt
AM skins/waeup_student/getStudentId.py

Location:
WAeUP_SRP/trunk/skins/waeup_student
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_student/application_edit_form.pt

    r877 r1025  
    1 <metal:html tal:define="info context/getStudentInfo;
    2             rendered_main python:info['app_doc'].render(
     1<metal:html tal:define="info context/getStudentInfo">
     2  <span tal:condition="not: info">
     3    <metal:block use-macro="here/error_not_found/macros/not_found" />
     4  </span>
     5<metal:block tal:condition="info">
     6<metal:block tal:define="rendered_main python:info['app_doc'].render(
    37                      layout_mode='edit',
    48                      schema_id = 'student_application',
     
    5054    </metal:main>
    5155  </metal:body>
     56</metal:block>
     57</metal:block>
    5258</metal:html>
  • WAeUP_SRP/trunk/skins/waeup_student/getStudentInfo.py

    r1017 r1025  
    4343            logger.info("student %s tried to access %s" % (member_id,requested_id))
    4444            student_id = member_id
    45             #mtool.assertViewable(context)
     45            mtool.assertViewable(context)
    4646            break
    4747        student_id = member_id
     
    7878        info['sex'] = 'female'
    7979course = getattr(student,'study_course',None)
    80 info['course'] = course
    8180if course:
    82     info['course_doc'] = student.study_course.getContent()
     81    cert_id = course.getContent().study_course
     82    res = context.portal_catalog(portal_type = "Certificate", id = cert_id)
     83    ci = {}
     84    if len(res) > 0:
     85        info['course'] = course
     86        brain = res[0]
     87        ci['study_course'] = brain.getId
     88        ci['title'] = brain.Title
     89        pl = brain.getPath().split('/')
     90        ci['faculty'] = pl[-4]
     91        ci['department'] = pl[-3]
     92        info['course_doc'] = ci
     93    else:
     94        info['course'] = None
    8395#
    8496acco = getattr(student,'accommodation_2006',None)
  • WAeUP_SRP/trunk/skins/waeup_student/study_course_view.pt

    r913 r1025  
    1919    </metal:block>
    2020    <metal:main fill-slot="main">
    21       <span tal:omit-tag=""  
     21      <span tal:omit-tag="" tal:condition="nothing"
    2222            tal:content="structure python: info['doc'].render(layout_mode='view')" />
     23      <table tal:define="sc python: s_info['course_doc']">
     24        <tr>
     25          <td width="180px">Certificate:</td>
     26          <td><span tal:content="sc/title" /></td>
     27        </tr>
     28        <tr>
     29          <td>Certificate ID:</td>
     30          <td tal:content="sc/study_course" />
     31        </tr>
     32          <span tal:define="f_id sc/faculty;
     33          d_id sc/department;
     34          f_title context/academics/?f_id/Title|string:Faculty not yet in Prospectus;
     35          d_title context/academics/?f_id/?d_id/Title|string:Department not yet in Prospectus"
     36          >
     37            <tr>
     38              <td>Faculty:</td>
     39              <td tal:content="f_title" />
     40            </tr>
     41            <tr>
     42              <td>Department:</td>
     43              <td><span tal:content="d_title" /></td>
     44            </tr>
     45          </span>
     46        </table>       
    2347     
    2448      <form action="" method="post" class="group"
Note: See TracChangeset for help on using the changeset viewer.