Changeset 464 for WAeUP_SRP/trunk


Ignore:
Timestamp:
1 Sep 2006, 17:16:18 (18 years ago)
Author:
joachim
Message:

added missing files.

A trunk/profiles/default/layouts/student_check_pin.xml
M trunk/profiles/default/types.xml
M trunk/profiles/default/actionicons.xml
M trunk/profiles/default/workflows.xml
A trunk/profiles/default/types/StudentSemester.xml
D trunk/profiles/default/types/CourseTicket.xml
M trunk/profiles/default/types/StudentsFolder.xml
A trunk/profiles/default/types/StudentCourseResult.xml
M trunk/init.py
M trunk/skins/waeup_academics/academics_content_lib_info_detail_tab.pt
A trunk/skins/waeup_custom/cpsskins_lib.pt
M trunk/skins/waeup_custom/getContentInfo.py
M trunk/Students.py

Location:
WAeUP_SRP/trunk
Files:
4 added
1 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/Students.py

    r459 r464  
    158158                        logger.info('Level %(level)s not in %(certcode)s' % vars())
    159159                    l.getContent().edit(mapping={'Title': "Level %s" % level})
    160                     l.invokeFactory('Semester','first')
    161                     l.invokeFactory('Semester','second')
     160                    l.invokeFactory('StudentSemester','first')
     161                    l.invokeFactory('StudentSemester','second')
    162162                    first_s = getattr(l,'first')
    163163                    first_s.getContent().edit(mapping={'Title': 'First Semester'})
     
    237237                sc.invokeFactory('StudentStudyLevel', level)
    238238                l = getattr(sc, level)
    239                 l.invokeFactory('Semester','first')
    240                 l.invokeFactory('Semester','second')
     239                l.invokeFactory('StudentSemester','first')
     240                l.invokeFactory('StudentSemester','second')
    241241                first_s = getattr(l,'first')
    242242                first_s.getContent().edit(mapping={'Title': 'First Semester'})
     
    247247            if snr == "2":
    248248                semester = getattr(l,'second')
    249             logger.info('Creating CourseTicket %(CosCode)s in Level %(Level)s for %(StudentId)s %(Matnumber)s' % result)
    250             semester.invokeFactory('CourseTicket',course)
     249            logger.info('Creating StudentCourseResult %(CosCode)s in Level %(Level)s for %(StudentId)s %(Matnumber)s' % result)
     250            semester.invokeFactory('StudentCourseResult',course)
    251251            ct = getattr(semester,course)
    252252            d = {}
     
    316316            s.invokeFactory('StudentAdmission','admission')
    317317            da = {'Title': 'Admission Data'}
    318             s.invokeFactory('StudentPersonal','personal')
    319             sp = s.personal
    320             d = {'Title': 'Personal Data'}
    321             s.invokeFactory('StudentClearance','clearance')
    322             sc = s.clearance
    323             dc = {'Title': 'Clearance Data'}
     318##            s.invokeFactory('StudentPersonal','personal')
     319##            sp = s.personal
     320##            d = {'Title': 'Personal Data'}
     321##            s.invokeFactory('StudentClearance','clearance')
     322##            sc = s.clearance
     323##            dc = {'Title': 'Clearance Data'}
    324324            da["jamb_reg_no"] = jamb.get("REG-NO")
    325325            da["jamb_lastname"] = jamb.get("NAME")
    326             d["lastname"] = jamb.get("NAME")
     326##            d["lastname"] = jamb.get("NAME")
    327327            da["jamb_sex"] = jamb.get("SEX")
    328328            d["sex"] = jamb.get("SEX")
     
    334334            da["jamb_first_uni"] = jamb.get("UNIV1")
    335335            da["jamb_second_uni"] = jamb.get("UNIV2")
    336             s.personal.getContent().edit(mapping=d)
     336##            s.personal.getContent().edit(mapping=d)
    337337            s.admission.getContent().edit(mapping=da)
    338338        return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
     
    370370            content = data.getContent()
    371371            return "%s %s" % (content.firstname,content.lastname)
     372        data = getattr(self,'admission',None)
     373        if data:
     374            content = data.getContent()
     375            return "%s" % (content.jamb_lastname)
    372376        return self.title
    373377
     
    543547###)
    544548
     549class StudentSemester(CPSDocument): ###(
     550    """
     551    WAeUP StudentSemester containing the courses and students
     552    """
     553    meta_type = 'StudentSemester'
     554    portal_type = meta_type
     555    security = ClassSecurityInfo()
     556
     557InitializeClass(StudentSemester)
     558
     559def addStudentSemester(container, id, REQUEST=None, **kw):
     560    """Add a StudentSemester."""
     561    ob = StudentSemester(id, **kw)
     562    return CPSBase_adder(container, ob, REQUEST=REQUEST)
     563
     564###)
     565
    545566class Semester(CPSDocument): ###(
    546567    """
     
    560581###)
    561582
    562 class CourseTicket(CPSDocument): ###(
    563     """
    564     WAeUP CourseTicket
    565     """
    566     meta_type = 'CourseTicket'
    567     portal_type = meta_type
    568     security = ClassSecurityInfo()
     583class StudentCourseResult(CPSDocument): ###(
     584    """
     585    WAeUP StudentCourseResult
     586    """
     587    meta_type = 'StudentCourseResult'
     588    portal_type = meta_type
     589    security = ClassSecurityInfo()
     590   
    569591    def getCourseEntry(self,cid):
    570         res = self.portal_catalog({'meta_type': "Course",
     592        res = self.portal_catalog({'meta_type': "StudentCourse",
    571593                                           'id': cid})
    572594        if res:
     
    584606        return "No course with id %s" % cid
    585607
    586 InitializeClass(CourseTicket)
    587 
    588 def addCourseTicket(container, id, REQUEST=None, **kw):
    589     """Add a CourseTicket."""
    590     ob = CourseTicket(id, **kw)
     608InitializeClass(StudentCourseResult)
     609
     610def addStudentCourseResult(container, id, REQUEST=None, **kw):
     611    """Add a StudentCourseResult."""
     612    ob = StudentCourseResult(id, **kw)
    591613    return CPSBase_adder(container, ob, REQUEST=REQUEST)
    592614###)
  • WAeUP_SRP/trunk/__init__.py

    r458 r464  
    4040         "Student",
    4141         "StudentStudyCourse",
    42          "CourseTicket",
     42         "StudentCourseResult",
    4343         "StudentAdmission",
    4444         "StudentClearance",
     
    4646         "ScratchCardBatch",
    4747         "ScratchCardBatchesFolder",
     48         "StudentStudyLevel",
     49         "StudentSemester",
     50         # move to Academics later
    4851         "StudyLevel",
    49          "StudentStudyLevel",
    5052         "Semester",
    5153         )
  • WAeUP_SRP/trunk/profiles/default/actionicons.xml

    r459 r464  
    22<action-icons>
    33 <action-icon category="object" action_id="view"
    4               title="View" priority="0"
     4              title="View" priority="10"
    55              icon_expr="actionicon_view.png"/>
    66 <action-icon category="object" action_id="new_content"
    7               title="New" priority="1"
     7              title="New" priority="0"
    88              icon_expr="actionicon_add.png"/>
    99 <action-icon category="object" action_id="contents"
    10               title="Contents" priority="2"
     10              title="Contents" priority="20"
    1111              icon_expr="actionicon_manage_content.png"/>
    1212 <action-icon category="object" action_id="preview"
    13               title="Preview" priority="3"
     13              title="Preview" priority="30"
    1414              icon_expr="actionicon_preview_icon.png"/>
    1515 <action-icon category="object" action_id="edit"
    16               title="Edit" priority="4"
     16              title="Edit" priority="100"
    1717              icon_expr="actionicon_modify.png"/>
    1818 <action-icon category="object" action_id="metadata"
    19               title="Metadata" priority="5"
     19              title="Metadata" priority="110"
    2020              icon_expr="actionicon_metadata.png"/>
    2121 <action-icon category="object" action_id="localroles"
    22               title="Local Roles" priority="6"
     22              title="Local Roles" priority="250"
    2323              icon_expr="actionicon_user_roles.png"/>
    2424 <action-icon category="object"
    2525              action_id="activate_comments"
    26               title="Authorize comments" priority="8"
     26              title="Authorize comments" priority="130"
    2727              icon_expr="actionicon_comments.png"/>
    2828 <action-icon category="object" action_id="comment"
    29               title="Add comment" priority="9"
     29              title="Add comment" priority="140"
    3030              icon_expr="actionicon_addcomment.png"/>
    3131 <action-icon category="object" action_id="search_entry"
    32               title="Search entry" priority="10"
     32              title="Search entry" priority="0"
    3333              icon_expr="actionicon_search.png"/>
    3434 <action-icon category="object" action_id="new_entry"
     
    3636              icon_expr="actionicon_add.png"/>
    3737 <action-icon category="object" action_id="view_entry"
    38               title="View entry" priority="10"
     38              title="View entry" priority="0"
    3939              icon_expr="actionicon_view.png"/>
    4040 <action-icon category="object" action_id="edit_entry"
    41               title="Edit entry" priority="10"
     41              title="Edit entry" priority="100"
    4242              icon_expr="actionicon_modify.png"/>
    4343 <action-icon category="object" action_id="delete_entry"
    44               title="Delete entry" priority="10"
     44              title="Delete entry" priority="120"
    4545              icon_expr="actionicon_reject.png"/>
    4646 <action-icon category="object" action_id="edit_online"
    47               title="Edit online" priority="11"
     47              title="Edit online" priority="100"
    4848              icon_expr="actionicon_edit_online.png"/>
    4949 <action-icon category="folder" action_id="portlets"
    50               title="Manage portlets" priority="0"
     50              title="Manage portlets" priority="270"
    5151              icon_expr="actionicon_manage_portlets.png"/>
    5252 <action-icon category="workflow" action_id="copy_submit"
    53               title="Submit" priority="0"
     53              title="Submit" priority="70"
    5454              icon_expr="actionicon_submit.png"/>
    5555 <action-icon category="workflow" action_id="checkout_draft"
    56               title="Version" priority="1"
     56              title="Version" priority="150"
    5757              icon_expr="actionicon_version.png"/>
    5858 <action-icon category="workflow" action_id="status_history"
    59               title="History" priority="2"
     59              title="History" priority="260"
    6060              icon_expr="actionicon_history.png"/>
    6161 <action-icon category="workflow" action_id="retract"
    62               title="Submit" priority="3"
     62              title="Submit" priority="90"
    6363              icon_expr="actionicon_retract.png"/>
    6464 <action-icon category="workflow" action_id="approve"
    65               title="Approve" priority="2"
     65              title="Approve" priority="50"
    6666              icon_expr="actionicon_validate.png"/>
    6767 <action-icon category="workflow" action_id="reject"
    68               title="Reject" priority="4"
     68              title="Reject" priority="60"
    6969              icon_expr="actionicon_reject.png"/>
    7070 <action-icon category="workflow" action_id="expire"
    71               title="Expire" priority="5"
     71              title="Expire" priority="80"
    7272              icon_expr="actionicon_expire.png"/>
    7373 <action-icon category="workflow"
    7474              action_id="delete_translation"
    75               title="Delete translation" priority="6"
     75              title="Delete translation" priority="190"
    7676              icon_expr="actionicon_del_translation.png"/>
    7777 <action-icon category="workflow" action_id="translate"
    78               title="Translate" priority="6"
     78              title="Translate" priority="180"
    7979              icon_expr="actionicon_add_translation.png"/>
    8080 <action-icon category="workflow" action_id="accept"
    81               title="Accept" priority="7"
     81              title="Accept" priority="50"
    8282              icon_expr="actionicon_publish.png"/>
    8383 <action-icon category="workflow" action_id="unpublish"
    84               title="Unpublish" priority="7"
     84              title="Unpublish" priority="70"
    8585              icon_expr="actionicon_unpublish.png"/>
    8686 <action-icon category="workflow" action_id="abandon_draft"
    87               title="Give up revision" priority="8"
     87              title="Give up revision" priority="170"
    8888              icon_expr="actionicon_version_reject.png"/>
    8989 <action-icon category="workflow" action_id="checkin_draft"
    90               title="Checkin revision" priority="10"
     90              title="Checkin revision" priority="160"
    9191              icon_expr="actionicon_version_validate.png"/>
    9292 <action-icon category="global" action_id="configThemes"
     
    118118              icon_expr="actionicon_advanced_search.png"/>
    119119 <action-icon category="global_header" action_id="contact"
    120               title="Contact" priority="3"
    121120              icon_expr="actionicon_email.png"/>
    122121 <action-icon category="user" action_id="login"
     
    185184              action_id="import_fulltime_students_results"
    186185              title="Import Fulltime Students Results"
    187               priority="2" icon_expr="actionicon_submit.png"/>
     186              priority="2"
     187              icon_expr="actionicon_submit.png"/>
    188188 <action-icon category="import"
    189189              action_id="import_jamb_data"
  • WAeUP_SRP/trunk/profiles/default/types.xml

    r454 r464  
    1010 <object name="Course" meta_type="CPS Flexible Type Information"/>
    1111 <object name="CertificateCourse" meta_type="CPS Flexible Type Information"/>
    12  <object name="CourseTicket" meta_type="CPS Flexible Type Information"/>
    1312 <object name="Department" meta_type="CPS Flexible Type Information"/>
    1413 <object name="Faculty" meta_type="CPS Flexible Type Information"/>
     
    2019 <object name="StudentStudyCourse" meta_type="CPS Flexible Type Information"/>
    2120 <object name="StudentClearance" meta_type="CPS Flexible Type Information"/>
     21 <object name="StudentCourseResult" meta_type="CPS Flexible Type Information"/>
    2222 <object name="StudentPersonal" meta_type="CPS Flexible Type Information"/>
    2323 <object name="StudentAdmission" meta_type="CPS Flexible Type Information"/>
     24 <object name="StudentSemester" meta_type="CPS Flexible Type Information"/>
    2425 <object name="StudentsFolder" meta_type="CPS Flexible Type Information"/>
    2526 <object name="ScratchCardBatchesFolder" meta_type="CPS Flexible Type Information"/>
  • WAeUP_SRP/trunk/profiles/default/types/StudentsFolder.xml

    r459 r464  
    6565 </action>
    6666 <action title="FT Student Results"
    67     action_id="import_fulltime_students_results" category="import"
     67    action_id="import_full_time_students_results" category="import"
    6868    condition_expr=""
    6969    url_expr="string:${object_url}/loadFullTimeStudentsResultsFromCSV"
  • WAeUP_SRP/trunk/profiles/default/workflows.xml

    r455 r464  
    4141   <bound-workflow workflow_id="waeup_base_wf"/>
    4242  </type>
    43   <type type_id="CourseTicket">
    44    <bound-workflow workflow_id="waeup_base_wf"/>
    45   </type>
    4643  <type type_id="CoursesFolder">
    4744   <bound-workflow workflow_id="section_folder_wf"/>
     
    8077   <bound-workflow workflow_id="waeup_student_wf"/>
    8178  </type>
    82   <type type_id="StudentDocuments">
    83    <bound-workflow workflow_id="waeup_base_wf"/>
    84   </type>
    85   <type type_id="StudentElegibility">
    86    <bound-workflow workflow_id="waeup_base_wf"/>
    87   </type>
    88   <type type_id="StudentEligibility">
    89    <bound-workflow workflow_id="waeup_base_wf"/>
    90   </type>
    9179  <type type_id="StudentPersonal">
    9280   <bound-workflow workflow_id="waeup_student_wf"/>
     
    9482  <type type_id="StudentStudyCourse">
    9583   <bound-workflow workflow_id="section_folder_wf"/>
     84  </type>
     85  <type type_id="StudentCourseResult">
     86   <bound-workflow workflow_id="waeup_base_wf"/>
    9687  </type>
    9788  <type type_id="StudentsFolder">
     
    10495   <bound-workflow workflow_id="section_folder_wf"/>
    10596  </type>
     97  <type type_id="StudentSemester">
     98   <bound-workflow workflow_id="section_folder_wf"/>
     99  </type>
    106100  <type type_id="University">
    107101   <bound-workflow workflow_id="section_folder_wf"/>
  • WAeUP_SRP/trunk/skins/waeup_academics/academics_content_lib_info_detail_tab.pt

    r454 r464  
    131131    </span>
    132132    <span tal:define="docu python: info['doc']"
    133           tal:condition="python: docu.portal_type == 'CourseTicket'">
     133          tal:condition="python: docu.portal_type == 'StudentCourseResult'">
    134134      <td>
    135135        <span tal:content="docu/grade">ID</span>
     
    140140    </span>
    141141    <span tal:define="docu python: info['doc']"
    142           tal:condition="python: docu.portal_type == 'Student'">
     142          tal:condition="python: False and docu.portal_type == 'Student'">
    143143      <td>
    144144        <span tal:content="info/clearance/matric_no">ID</span>
  • WAeUP_SRP/trunk/skins/waeup_custom/getContentInfo.py

    r458 r464  
    233233        info['core_or_elective'] = core
    234234    elif doc.portal_type == 'Student':
    235         info['clearance'] = proxy.clearance.getContent()
     235        try:
     236            info['clearance'] = proxy.clearance.getContent()
     237        except AttributeError:
     238            info['clearance'] = None
    236239    info['time'] = doc.modified()
    237240    info['doc'] = doc
Note: See TracChangeset for help on using the changeset viewer.