Changeset 1171


Ignore:
Timestamp:
1 Jan 2007, 22:54:52 (18 years ago)
Author:
Henrik Bettermann
Message:

made login after createReturningStudent work
session_result_view is not yet ready

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

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/WAeUPTool.py

    r1170 r1171  
    4040
    4141
     42
     43
    4244class WAeUPTool(UniqueObject, SimpleItem, ActionProviderBase):
    4345    """WAeUP tool"""
     
    5355                     + SimpleItem.manage_options
    5456                     )
     57                     
     58                     
    5559
    5660    def generateStudentId(self,letter): ###(
     
    6771
    6872    security.declareProtected(ModifyPortalContent,'createOne') ###(
    69     def createOne(self,student_brain,commit=False): 
     73    def createOne(self,student_brain,commit=False):
    7074        students_folder = self.portal_url.getPortalObject().campus.students
    7175        sid = self.waeup_tool.generateStudentId('?')
     
    141145            student = res[0]
    142146        logger.info('"%s", "creating Datastructure"' % student_id)
     147
     148        #student should not be allowed to perform this transition
     149        #wftool = self.portal_workflow   
     150        #wftool.doActionFor(student,'return')     
     151
    143152        certcode_org = student.Coursemajorcode
    144153        certcode = makeCertificateCode(certcode_org)
     
    194203        catd['entry_mode']= da['entry_mode']
    195204        catd['matric_no'] = matric_no
    196         catd['jamb_reg_no'] = da['jamb_reg_no'] 
    197         catd['name'] = "%(firstname)s %(middlename)s %(lastname)s" % dp 
    198         catd['sex'] = dp['sex'] 
    199         catd['level'] = level 
     205        catd['jamb_reg_no'] = da['jamb_reg_no']
     206        catd['name'] = "%(firstname)s %(middlename)s %(lastname)s" % dp
     207        catd['sex'] = dp['sex']
     208        catd['level'] = level
    200209        if certificate_brain:
    201210            cpath = certificate_brain.getPath().split('/')
    202             catd['faculty'] = cpath[-4] 
    203             catd['department'] = cpath[-3] 
     211            catd['faculty'] = cpath[-4]
     212            catd['department'] = cpath[-3]
    204213            catd['course'] = certcode
    205214        self.students_catalog.modifyRecord(**catd)
  • WAeUP_SRP/trunk/profiles/default/vocabularies/searchable_student_states.xml

    r863 r1171  
    66 <property name="acl_write_roles">Manager</property>
    77 <item key="all" msgid="">all states</item>
     8 <item key="returning" msgid="">returning</item>
    89 <item key="student_created" msgid="">data imported</item>
    910 <item key="application_pin_entered" msgid="">application pin entered</item>
    1011 <item key="admission_applied" msgid="">applied for admission</item>
    11  <item key="pume_passed" msgid="">pume passed</item>
    12  <item key="pume_failed" msgid="">pume failed</item>
    1312 <item key="objection_raised" msgid="">objection raised</item>
    1413 <item key="admission_rejected" msgid="">admission rejected</item>
     
    1817 <item key="clearance_requested" msgid="">clearance requested</item>
    1918 <item key="cleared_and_validated" msgid="">cleared and validated</item>
    20  <item key="deferred" msgid="">admission deferred</item>
    2119 <item key="content_addable" msgid="">content addable</item>
    22  <item key="category_A" msgid="">category A</item>
    23  <item key="category_B" msgid="">category B</item>
    24  <item key="category_C" msgid="">category C</item>
    25  <item key="category_D" msgid="">category D</item>
    26  <item key="category_E" msgid="">category E</item>
    27  <item key="category_F" msgid="">category F</item>
    2820 <item key="bed_reserved" msgid="">bed reserved</item>
    2921 <item key="maintenance_fee_paid" msgid="">maintenance fee paid</item>
  • WAeUP_SRP/trunk/skins/waeup_custom/logged_in.py

    r1158 r1171  
    9797        elif s_review_state == "clearance_pin_entered":
    9898            redirect_url = "%s/clearance_edit_form" % student.absolute_url()
     99        if s_review_state == "returning":
     100            redirect_url = "%s/student_view" % student.absolute_url()
    99101        else:
    100102            redirect_url = "%s/student_index" % student.absolute_url()
  • WAeUP_SRP/trunk/skins/waeup_student/createReturningStudent.py

    r1170 r1171  
    2121#if str(member) not in ("admin","joachim"):
    2222#    return "not possible"
    23 def createOne(student_brain):
    24     sid = context.waeup_tool.generateStudentId('?')
    25     students_folder.invokeFactory('Student', sid)
    26     student = getattr(students_folder,sid)
    27     wftool.doActionFor(student,'return')
    28     student.manage_setLocalRoles(sid, ['Owner',])
    29     jamb_reg_no = student_brain.Entryregno,
    30     context.students_catalog.addRecord(id = sid,
    31                                        matric_no = matric_no,
    32                                        jamb_reg_no = jamb_reg_no,
    33                                        sex = student_brain.Sex == "F",
    34                                        name = "%s %s %s" % (student_brain.Firstname,
    35                                                             student_brain.Middlename,
    36                                                             student_brain.Lastname)
    37                                     )
    38     return sid,jamb_reg_no
     23
     24
     25#defined in WAeUPTool.py
     26
     27# def createOne(student_brain):
     28#     sid = context.waeup_tool.generateStudentId('?')
     29#     students_folder.invokeFactory('Student', sid)
     30#     student = getattr(students_folder,sid)
     31#     wftool.doActionFor(student,'return')
     32#     student.manage_setLocalRoles(sid, ['Owner',])
     33#     jamb_reg_no = student_brain.Entryregno,
     34#     context.students_catalog.addRecord(id = sid,
     35#                                        matric_no = matric_no,
     36#                                        jamb_reg_no = jamb_reg_no,
     37#                                        sex = student_brain.Sex == "F",
     38#                                        name = "%s %s %s" % (student_brain.Firstname,
     39#                                                             student_brain.Middlename,
     40#                                                             student_brain.Lastname)
     41#                                     )
     42#     return sid,jamb_reg_no
    3943
    4044if not matric_no:
  • WAeUP_SRP/trunk/skins/waeup_student/getStudentInfo.py

    r1167 r1171  
    6868info['url'] = student.absolute_url()
    6969info['student_doc'] = student.getContent()
    70 info['app'] = student.application
    71 info['app_doc'] = student.application.getContent()
    72 info['per'] = getattr(student,'personal',None)
    73 info['sex'] = 'male'
    74 if info['per'] is not None:
    75     info['per_doc'] = student.personal.getContent()
    76     if info['per_doc'].sex:
    77         info['sex'] = 'female'
    78 else:
    79     if info['app_doc'].jamb_sex == "F":
    80         info['sex'] = 'female'
     70#info['app'] = student.application
     71#info['app_doc'] = student.application.getContent()
     72#info['per'] = getattr(student,'personal',None)
     73#info['sex'] = 'male'
     74#if info['per'] is not None:
     75#    info['per_doc'] = student.personal.getContent()
     76#    if info['per_doc'].sex:
     77#        info['sex'] = 'female'
     78#else:
     79#    if info['app_doc'].jamb_sex == "F":
     80#        info['sex'] = 'female'
    8181course = getattr(student,'study_course',None)
    8282if course:
  • WAeUP_SRP/trunk/skins/waeup_student/personal_view.pt

    r1167 r1171  
    1616        <br />
    1717        <span tal:omit-tag=""
    18               tal:content="structure python: info['app_doc'].render(proxy=info['per_doc'],
     18              tal:content="structure python: info['per_doc'].render(proxy=info['per_doc'],
    1919              layout_mode='view',
    2020              layout_id='student_personal_fe')"
  • WAeUP_SRP/trunk/skins/waeup_student/reserve_accommodation.py

    r1161 r1171  
    2626session = acco_id[-4:]
    2727mode = 'create'
    28 if info['review_state'] != 'cleared_and_validated':
     28if not info['review_state'] in ('cleared_and_validated',):
    2929    return context.REQUEST.RESPONSE.redirect("%s/no_booking_allowed" % info['student'].absolute_url())
    3030validate = REQUEST.has_key("cpsdocument_create_button")
  • WAeUP_SRP/trunk/skins/waeup_student/search_students_form.pt

    r1096 r1171  
    6969                  <span tal:replace="student/name" />
    7070                </td>   
    71                 <td><span tal:replace="student/jamb_reg_no" /></td>   
     71                <td><span tal:replace="student/matric_no" /></td>   
     72                <td><span tal:replace="student/jamb_reg_no" /></td>
    7273                <td tal:condition="options/co_view|nothing">
    7374                       <a href="id"
Note: See TracChangeset for help on using the changeset viewer.