Changeset 1816


Ignore:
Timestamp:
24 May 2007, 05:49:27 (18 years ago)
Author:
Henrik Bettermann
Message:
  • importResults fixed: line readded which had been removed in revion 1700 (don't know why!!)
  • also the link 'Previous Sessions' now works for withdrawn students
Location:
WAeUP_SRP/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/Students.py

    r1809 r1816  
    394394            dsc = {}
    395395            catalog_entry['level'] = dsc['current_level'] = entry_levels.get(da['entry_mode'],'100')
    396             #catalog_entry['level'] = dsc['current_level'] = '100'  # Attention: not for DE students           
     396            #catalog_entry['level'] = dsc['current_level'] = '100'  # Attention: not for DE students
    397397            catalog_entry['session'] = dsc['current_session'] = da['entry_session']
    398398            catalog_entry['mode'] = dsc['current_mode'] = da['entry_mode']
     
    769769                    #result['Error'] = "No Course"
    770770                    #logger.info(format_error % result)
     771                   
     772            result['key'] = key
     773            try:
     774                table.addRecord(**result)
     775            except ValueError:
     776                #import pdb;pdb.set_trace()
     777                result['Error'] = "Duplicate"
     778                no_import.append( format_error % result)
     779                continue
     780                   
    771781            regs.append(key)
    772782            imported.append(format % result)
  • WAeUP_SRP/trunk/WAeUPTool.py

    r1813 r1816  
    291291            student = res[0]
    292292        else:
    293             logger.info('%s Id not found in returning_import' % student_id)
     293            logger.info('Id %s not found in returning_import' % student_id)
    294294            return
    295295        logger.info('%s creates data structure' % student_id)
    296296        s_results = self.results_import(matric_no = student.matric_no)
    297         lnr = self.getLevelFromResultsCosCode(s_results)
    298         level = "%d00" % lnr
    299         verdict,eligible = self.getVerdict(s_results[0].Verdict)
    300         if eligible:
    301             level = "%d00" % (lnr + 1)
    302 ##        level = s_results[0].Level
    303 ##        for result in s_results:
    304 ##            if level != result.Level:
    305 ##                logger.info('"%s", "Levels differ","%s != %s"' % (student_id,level,result.Level))
     297        if s_results:
     298            lnr = self.getLevelFromResultsCosCode(s_results)
     299            level = "%d00" % lnr
     300            verdict,eligible = self.getVerdict(s_results[0].Verdict)
     301            if eligible:
     302                level = "%d00" % (lnr + 1)
     303        else:
     304            logger.info('matric_no %s not found in results_import' % student.matric_no)
     305            level = 0
     306            verdict = 'N/A'
    306307        #student should not be allowed to perform this transition
    307308        #wftool = self.portal_workflow
  • WAeUP_SRP/trunk/skins/waeup_student/getStudyCourseInfo.py

    r1783 r1816  
    5252    info['course_doc'] = ci
    5353else:
    54     info['course'] = None
     54    info['cert_id'] = 'N/A'
     55    ci['study_course'] = 'N/A'
     56    ci['title'] = 'N/A'
     57    ci['faculty'] = 'N/A'
     58    ci['department'] = 'N/A'
     59    info['course_doc'] = ci
     60   
    5561items = []
    5662current_level = sbrain.level
Note: See TracChangeset for help on using the changeset viewer.