Changeset 1612 for WAeUP_SRP


Ignore:
Timestamp:
20 Mar 2007, 18:35:57 (18 years ago)
Author:
joachim
Message:

add validated_by and validation_date to student_study_level schema.
edit these in validate_courses
show these in course_registration_slip
modyfiy getRolesInContext to make edit work

could only do moderate testing cause of readconflict errors

Location:
WAeUP_SRP/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/PatchCPSUserFolderUserFolder.py

    r1607 r1612  
    9696        if sc is None:
    9797            break
    98         #from pdb import set_trace;set_trace()
    9998        sc_obj = sc.getContent()
    10099        cert_id = sc_obj.study_course
     
    123122                                                )
    124123        if real_object.portal_type == "StudentStudyLevel":
    125             context_obj = getattr(certificate_obj,real_object.getId(),None)
     124            if real_object.meta_type != "StudentStudyLevel":
     125                context_obj = getattr(certificate_obj,real_object.getId(),None)
     126            else:
     127                context_obj = getattr(certificate_obj,real_object.aq_parent.getId(),None)
    126128            if context_obj is None:
     129                #from pdb import set_trace;set_trace()
    127130                break
    128131            allowed = set(('CourseAdviser', 'SectionManager'))
  • WAeUP_SRP/trunk/profiles/default/schemas/student_study_level.xml

    r1399 r1612  
    44 <field name="code" meta_type="CPS String Field"/>
    55 <field name="session" meta_type="CPS String Field"/>
    6  <field name="gpa" meta_type="CPS Float Field"/>
    7  <field name="status" meta_type="CPS String Field"/>
    86 <field name="verdict" meta_type="CPS String Field"/>
    9   <field name="imported_gpa" meta_type="CPS Float Field"/>
     7 <field name="validated_by" meta_type="CPS String Field"/>
     8 <field name="validation_date" meta_type="CPS DateTime Field"/>
    109</object>
  • WAeUP_SRP/trunk/skins/waeup_student/course_registration_slip.pt

    r1579 r1612  
    1919     
    2020      <div tal:condition="validated">
    21         - validated by Course Adviser -
     21        - validated by Course Adviser -
     22      <span tal:condition="info/doc/validated_by|nothing" tal:omit-tag="">
     23        <span tal:replace="info/doc/validated_by" /> on <span tal:replace="info/doc/validation_date" />
     24      </span>
    2225      </div>
    2326      <div tal:condition="not: validated">
  • WAeUP_SRP/trunk/skins/waeup_student/validate_courses.py

    r1589 r1612  
    1313"""
    1414from Products.CMFCore.WorkflowCore import WorkflowException
     15import DateTime
     16current = DateTime.DateTime()
    1517try:
    1618    from Products.zdb import set_trace
     
    3032student_id = context.getStudentId()
    3133student = getattr(students_folder,student_id)
     34level_doc = context.getContent()
     35if level_doc.portal_type == 'StudentStudyLevel':
     36    level_doc.edit(mapping={'validated_by': member_id,
     37                            'validation_date': current,})
    3238try:
    3339    wftool.doActionFor(student,'validate_courses')
Note: See TracChangeset for help on using the changeset viewer.