Changeset 3682


Ignore:
Timestamp:
21 Sep 2008, 06:01:55 (16 years ago)
Author:
Henrik Bettermann
Message:
  • Implement Student Pastoral Report for secondary schools
Location:
WAeUP_SRP
Files:
8 added
1 deleted
14 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/CHANGES.txt

    r3681 r3682  
    2626- admitOneStudent uses entry_session from applicants_catalog instead
    2727  of static argument (not yet tested)
     28 
     291.4 (2008-09-21)
     30-----------------
     31- Implement Student Pastoral Report for secondary schools
     32
  • WAeUP_SRP/base/Students.py

    r3481 r3682  
    907907###)
    908908
     909
    909910class StudentPume(CPSDocument): ###(
    910911    """
     
    927928    ob = StudentPume(id, **kw)
    928929    return CPSBase_adder(container, ob, REQUEST=REQUEST)
    929 
    930 
     930###)
     931
     932
     933class StudentPastoralReport(CPSDocument): ###(
     934    """
     935    Student Pastoral Report
     936    """
     937    meta_type = 'StudentPastoralReport'
     938    portal_type = meta_type
     939    security = ClassSecurityInfo()
     940
     941InitializeClass(StudentPastoralReport)
     942
     943def addStudentPastoralReport(container, id, REQUEST=None, **kw):
     944    """Add a Student Pastoral Report."""
     945    ob = StudentPastoralReport(id, **kw)
     946    return CPSBase_adder(container, ob, REQUEST=REQUEST)
     947###)
    931948
    932949# Backward Compatibility StudyLevel
  • WAeUP_SRP/base/__init__.py

    r3673 r3682  
    88from Products.GenericSetup import profile_registry
    99from Products.GenericSetup import EXTENSION
     10from Products.GenericSetup import BASE
    1011
    1112from Products.CPSCore.interfaces import ICPSSite
     
    5657         #"Semester",
    5758         "StudentCourseResult",
     59         "StudentPastoralReport",
    5860         # move to Academics later
    5961         #"Semester",
     
    125127    temp = root.unrestrictedTraverse( "/temp_folder", None )
    126128    if temp is not None and not sess_container_name in temp.objectIds():
    127         addSessionDataContainer( temp, sess_container_name, 9600, 4800, 
     129        addSessionDataContainer( temp, sess_container_name, 9600, 4800,
    128130                  lazy=True, title='Faster session data container')
    129131
  • WAeUP_SRP/base/profiles/default/layouts.xml

    r3359 r3682  
    5959  <object name="student_transfer" meta_type="CPS Layout"/>
    6060  <object name="study_level" meta_type="CPS Layout"/>
     61  <object name="student_pastoral_report" meta_type="CPS Layout"/>
    6162  <object name="university" meta_type="CPS Layout"/>
    6263  <object name="upload" meta_type="CPS Layout"/>
  • WAeUP_SRP/base/profiles/default/schemas.xml

    r3359 r3682  
    4343 <object name="students" meta_type="CPS Schema"/>
    4444 <object name="student_study_level" meta_type="CPS Schema"/>
     45 <object name="student_pastoral_report" meta_type="CPS Schema"/>
    4546 <object name="study_level" meta_type="CPS Schema"/>
    4647 <object name="university" meta_type="CPS Schema"/>
  • WAeUP_SRP/base/profiles/default/types.xml

    r3277 r3682  
    3535 <object name="UploadsFolder" meta_type="CPS Flexible Type Information"/>
    3636 <object name="Upload" meta_type="CPS Flexible Type Information"/>
     37 <object name="StudentPastoralReport" meta_type="CPS Flexible Type Information"/>
    3738</object>
  • WAeUP_SRP/base/profiles/default/types/StudentStudyLevel.xml

    r3153 r3682  
    1313 <property name="filter_content_types">True</property>
    1414 <property name="allowed_content_types">
    15   <element value="Semester"/>
     15  <element value="StudentPastoralReport"/>
    1616 </property>
    1717 <property name="allow_discussion">False</property>
     
    3131 <alias from="(Default)" to="student_index"/>
    3232 <alias from="create_do" to="waeup_document_create_do"/>
    33  <alias from="created" to=""/>
    3433 <alias from="view" to="student_index"/>
    3534 <action title="View" action_id="view" category="object" condition_expr=""
     
    3736  <permission value="View"/>
    3837 </action>
    39  <action title="Add Course" action_id="new_entry" category="object"
     38 <action title="Add Pastoral Report" action_id="new_entry" category="object"
    4039    condition_expr=""
    41     url_expr="string:${object_url}/content_create?type_name=StudentCourseResult"
    42     visible="False">
     40    url_expr="string:${object_url}/content_create?type_name=StudentPastoralReport"
     41    visible="True">
    4342  <permission value="Add portal content"/>
    4443 </action>
    4544</object>
     45
     46
     47
  • WAeUP_SRP/base/profiles/default/vocabularies.xml

    r3436 r3682  
    5353 <object name="aos" meta_type="CPS Vocabulary"/>
    5454 <object name="application_status" meta_type="CPS Vocabulary"/>
     55 <object name="pastoral_grade" meta_type="CPS Vocabulary"/>
     56 <object name="terms" meta_type="CPS Vocabulary"/>
    5557 </object>
  • WAeUP_SRP/base/profiles/default/workflows.xml

    r3632 r3682  
    130130   <bound-workflow workflow_id="waeup_document_wf"/>
    131131  </type>
     132  <type type_id="StudentPastoralReport">
     133   <bound-workflow workflow_id="waeup_student_subobject_wf"/>
     134  </type>
    132135 </bindings>
    133136</object>
  • WAeUP_SRP/base/skins/waeup_default/waeup_document_create_do.py

    r2013 r3682  
    1111request = context.REQUEST
    1212
    13 if type_name in ("StudyLevel","StudentStudyLevel","WAeUPDocument"):
     13if type_name in ("StudyLevel","StudentStudyLevel","WAeUPDocument","StudentPastoralReport"):
    1414    id = datamodel.get('code')
    1515else:
  • WAeUP_SRP/base/skins/waeup_default/waeup_edit_form.pt

    r2579 r3682  
    99           is_allowed context/isSectionOfficer;
    1010           metadata metadata|nothing;
    11            template here/main_template/macros/master;"
     11           template here/main_template/macros/master;
     12           info here/getDocumentInfo;"
    1213           >
    1314  <metal:block define-macro="edit_form">
     
    7879      <tal:block condition="not: metadata"
    7980        i18n:translate="">Edit <span id="page_title" i18n:name="title"
    80         tal:content="here/title_or_id">Page Title</span>
     81        tal:content="info/title">Page Title</span>
    8182      </tal:block>
    8283      <tal:block tal:condition="metadata"
  • WAeUP_SRP/base/skins/waeup_student/academic_report_view.pt

    r3675 r3682  
    4242    </div>   
    4343    </span>
    44 
    45 
    4644         
    4745    <a href=""
     
    6159   
    6260        <br />
     61           
    6362        <table>
     63           <tr>
     64            <th valign='top'>Pastoral Reports:</th>
     65            <td>
     66              <span tal:repeat="item python:info['items']">
     67                <a href="view"
     68                   tal:attributes="href item/id"
     69                   tal:content="item/title"/><br />
     70              </span>
     71            </td>
     72          </tr>
    6473          <tr>
    6574            <th>Session:</th>
     
    99108        </tr>               
    100109        <tr tal:repeat="row python:info[sem[2]]"
    101            
    102110            tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
    103111          <td align="left" valign="middle" style="width: 5%;"
  • WAeUP_SRP/base/skins/waeup_student/getStudentObjectTitles.py

    r3479 r3682  
    1919              'StudentStudyCourse': 'Study Course',
    2020              'PaymentsFolder': 'Payments',
     21              'StudentPastoralReport': 'Pastoral Report',
    2122              }
  • WAeUP_SRP/ois/waeup_custom/getStudyLevelInfo.py

    r3628 r3682  
    7676cert_id = student.course
    7777info['cert_id'] = cert_id
    78 if context.objectIds():
    79     course_results.moveResultsHere(context,student_id)
    80     logger.info("%s initiated moveResultsHere for %s in level %s" % (member_id,student_id,level_id))
    8178total_credits,gpa,carry_overs,normal1,normal2,normal3 = course_results.getCourses(student_id,level_id)
    8279info['total_credits'] = total_credits
     
    8481#start customization
    8582
     83
     84
    8685max_credits = 58
    8786info['without_score'] = False
    8887info['without_cascore'] = False
    8988
    90 
    91 
    92 
    93 
    94 
    95 
     89items = []
     90subobjects = context.objectValues()
     91for subobject in subobjects:
     92    row = {}
     93    row['id'] = subobject.getId()
     94    row['title'] = '%s' % context.portal_vocabularies.terms.get(subobject.getId())
     95    items.append(row)
     96info['items'] = items
    9697
    9798
Note: See TracChangeset for help on using the changeset viewer.