Changeset 3207


Ignore:
Timestamp:
23 Feb 2008, 23:04:51 (17 years ago)
Author:
Henrik Bettermann
Message:

wrong boolean logic fixed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/WAeUPImport.py

    r3195 r3207  
    5151from utils import makeDigest
    5252
    53 class WAeUPImport: ###( 
     53class WAeUPImport: ###(
    5454    """ WAeUPImport """
    5555    required_modes = ('create',)
     
    233233                courses_folder = getattr(department.getObject(),"courses",None)
    234234                if courses_folder is not None:
    235                     self._v_department_courses[department.getId] = courses_folder.objectIds() 
     235                    self._v_department_courses[department.getId] = courses_folder.objectIds()
    236236        department_id = mapping['department_code']
    237237        course_id = mapping.get('code','')
     
    446446    plural_name = "%ss" % name
    447447    commit_after = 1000
    448    
     448
    449449    def create(self,mapping):###(
    450450        "create a department in the correct faculty"
     
    550550    plural_name = "%ss" % name
    551551    commit_after = 100
    552    
     552
    553553    field2types_student = {   ###(
    554554                      'StudentApplication':
     
    662662                    msg = "matric_no exists"
    663663                    break
    664             if not (matric_no and jamb_reg_no):
     664            else:
    665665                msg = "jamb_reg_no or matric_no must be specified"
    666666                break
     
    681681                for field in f2t[pt]['fields']:
    682682                    d[field] = mapping.get(field,'')
    683    
     683
    684684                if pt == "StudentApplication":
    685685                    #d['jamb_sex']  = 'M'
     
    689689                    d['jamb_middlename'] = mapping.get('middlename',None)
    690690                    d['jamb_lastname'] = mapping.get('lastname',None)
    691    
     691
    692692                # if pt == "StudyCourse":
    693693                #     for von,zu in (('entry_mode','current_mode'),
     
    696696                #             d[zu] = mapping[von]
    697697                sub_doc.edit(mapping = d)
    698    
     698
    699699                #import pdb;pdb.set_trace()
    700700                new_state = f2t[pt]['wf_transition_%(transition)s' % vars()]
     
    833833    commit_after = 100000
    834834    required_modes = ('create','edit')
    835    
     835
    836836    def edit(self,mapping):
    837837        "edit student verdicts"
     
    907907                break
    908908            verdict = d['verdict'] = d['current_verdict']  = mapping.get('current_verdict','')
    909    
     909
    910910            #if verdict == student_record.verdict:
    911911            #    msg = 'student %s: verdict already set to %s' % (student_id,
    912912            #                                                            verdict)
    913    
     913
    914914            level_review_state = wftool.getInfoFor(level_obj,'review_state',None)
    915915            if level_review_state != "closed":
     
    917917                # msg = 'student %s: level %s is not closed' % (student_id,
    918918                #                                                      current_level)
    919    
     919
    920920            study_course_obj.getContent().edit(mapping = d)
    921921            level_obj.getContent().edit(mapping = d)
Note: See TracChangeset for help on using the changeset viewer.