Changeset 3780


Ignore:
Timestamp:
21 Nov 2008, 09:26:51 (16 years ago)
Author:
Henrik Bettermann
Message:
  • get study_mode from certificates and ignore study_mode attribute of study_course objects
  • customize school_fee payment for FUTMinna
Location:
WAeUP_SRP/trunk
Files:
2 added
7 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/CHANGES.txt

    r3772 r3780  
    122122-----------------
    123123- enable random bed booking order
     124
     1251.24 (2008-11-20)
     126-----------------
     127- get study_mode from certificates and ignore study_mode attribute of study_course objects
  • WAeUP_SRP/trunk/WAeUPImport.py

    r3741 r3780  
    742742                              'current_level',
    743743                              'current_session',
    744                               'current_mode',
     744                              'current_mode',  #is no longer used and visible but can still be imported
    745745                              'current_verdict',
    746746                              'previous_verdict',
  • WAeUP_SRP/trunk/WAeUPTables.py

    r3772 r3780  
    867867                        'end_level', # from certificate
    868868                        'level', # current_level
    869                         'mode',  # current_mode
     869                        'mode',  # from certificate
    870870                        'session', # current_session
    871871                        'verdict', # current_verdict
     
    966966        return getattr(doc,'current_level',None)
    967967
     968    #def get_from_doc_mode(self,doc,cached_data={}):
     969    #    "return the students mode"
     970    #    if doc is None:
     971    #        return None
     972    #    cm = getattr(doc,'current_mode',None)
     973    #    return cm
     974   
    968975    def get_from_doc_mode(self,doc,cached_data={}):
    969976        "return the students mode"
    970977        if doc is None:
    971978            return None
    972         cm = getattr(doc,'current_mode',None)
    973         return cm
     979        if hasattr(self,"_v_certificates") and self._v_certificates.has_key(doc.study_course):
     980            return self._v_certificates[doc.study_course]['study_mode']
     981        certificate_res = self.portal_catalog(id = doc.study_course)
     982        if len(certificate_res) != 1:
     983            return None
     984        return getattr(certificate_res[0].getObject().getContent(),'study_mode','unknown')   
    974985
    975986
  • WAeUP_SRP/trunk/WAeUPTool.py

    r3776 r3780  
    868868        dsc['current_level'] = level
    869869        dsc['current_verdict'] = verdict
    870         dsc['current_mode'] = em
     870        dsc['current_mode'] = em   #no longer used
    871871        dsc['current_session'] = '05'
    872872        studycourse.getContent().edit(mapping=dsc)
     
    10411041        # because ug_ft has two different entry modes
    10421042                       
    1043         if brain.entry_mode: 
    1044             da['entry_mode'] = brain.entry_mode 
     1043        if brain.entry_mode:                      # does not happen because import_application
     1044            da['entry_mode'] = brain.entry_mode   # schema has no field entry_mode
    10451045        elif brain.screening_type == 'pume': 
    10461046            da['entry_mode'] = 'ume_ft' 
     
    11161116        dsc['study_course'] = brain.course_admitted
    11171117        dsc['current_verdict'] = ''
    1118         dsc['current_mode'] = da['entry_mode']
     1118        dsc['current_mode'] = da['entry_mode'] # no longer used
    11191119        if da['entry_mode'].startswith('de'):
    11201120            dsc['current_level'] = '200'
  • WAeUP_SRP/trunk/profiles/default/layouts/student_study_course.xml

    r3689 r3780  
    119119   <cell name="current_level"/>
    120120  </row>
    121   <row>
    122    <cell name="current_mode"/>
    123   </row>
    124121 </table>
    125122</object>
  • WAeUP_SRP/trunk/profiles/futminna/layouts/members.xml

    r3763 r3780  
    116116  <property name="display_width">20</property>
    117117  <property name="size_max">0</property>
    118   <property name="check_words">fceokene</property>
     118  <property name="check_words">minna</property>
    119119 </widget>
    120120<widget name="roles" meta_type="Generic MultiSelect Widget">
  • WAeUP_SRP/trunk/skins/waeup_utilities/ti_507_resolve.py

    r3778 r3780  
    6969            d['study_course'] = student.course
    7070            d['matric_no'] = student.matric_no
     71            d['entry_mode'] = student.entry_mode
    7172            wrong[student.id] = d
    7273            if (student.mode,study_mode) not in (('ume_ft', 'ug_ft'),('de_pt', 'ug_pt'),('de_ft', 'ug_ft')):
    73                 logger.info("; %(student_id)s;  %(matric_no)s ; %(study_course)s ; %(current_mode_old)s ; %(current_mode)s" % d)
     74                logger.info("; %(student_id)s;  %(matric_no)s ; %(study_course)s ; %(entry_mode)s ; %(current_mode_old)s ; %(current_mode)s" % d)
    7475    # if wrong and not (len(wrong) % commit_after):
    7576    #     logger.info('found %d wrong of %d' % (len(wrong),count))
     
    8182
    8283return
     84
     85# the following must not be done because I've changed get_from_doc_mode in WAeUPTables. The current_mode field
     86# of the study_course object is no longer used
    8387
    8488for student_id,d in wrong.items():
Note: See TracChangeset for help on using the changeset viewer.