Changeset 1434 for WAeUP_SRP


Ignore:
Timestamp:
18 Feb 2007, 08:58:35 (18 years ago)
Author:
Henrik Bettermann
Message:

speed-up department_view

Location:
WAeUP_SRP/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/profiles/default/vocabularies/verdicts.xml

    r1417 r1434  
    66 <property name="description"></property>
    77 <property name="acl_write_roles">Manager</property>
    8  <item key="A" msgid="">Successful Student</item>
    9  <item key="B" msgid="">Student WITH CARRYOVER COURSES</item>
    10  <item key="C" msgid="">Student for Probation</item>
    11  <item key="C" msgid="">Student on Probation/Transfer</item>
    12  <item key="D" msgid="">Student who is to withdraw from the Faculty</item>
    13  <item key="E" msgid="">Student who were previously on Probation</item>
    14  <item key="F" msgid="">medical Cases</item>
    15  <item key="G" msgid="">absent from Examination</item>
    16  <item key="H" msgid="">withheld Results</item>
    17  <item key="I" msgid="">expelled/rusticated/suspended Student</item>
    18  <item key="J" msgid="">temporary withdrawal from the University</item>
    19  <item key="K" msgid="">unregistered Student</item>
     8 <item key="A" msgid="">successful student</item>
     9 <item key="B" msgid="">student with carryover courses</item>
     10 <item key="C" msgid="">student for probation</item>
     11 <item key="C" msgid="">student on probation/transfer</item>
     12 <item key="D" msgid="">student who is to withdraw from the faculty</item>
     13 <item key="E" msgid="">student who were previously on probation</item>
     14 <item key="F" msgid="">medical case</item>
     15 <item key="G" msgid="">absent from examination</item>
     16 <item key="H" msgid="">withheld results</item>
     17 <item key="I" msgid="">expelled/rusticated/suspended student</item>
     18 <item key="J" msgid="">temporary withdrawn from the university</item>
     19 <item key="K" msgid="">unregistered student</item>
    2020</object>
  • WAeUP_SRP/trunk/skins/waeup_academics/getCoursesCertificatesInfo.py

    r913 r1434  
    2424cp = brain.getPath()
    2525info['container_path'] = cp
    26 res = context.portal_catalog(container_path="%s/courses" % cp)
    27 items = []
    28 for r in res:
    29     row = {}
    30     ro = r.getObject()
    31     rd = ro.getContent()
    32     row['id'] = r.getId
    33     row['title'] = rd.Title()
    34     row['url'] = ro.absolute_url()
    35     items.append(row)
    36 info['courses'] = items
     26#res = context.portal_catalog(container_path="%s/courses" % cp)
     27#items = []
     28#for r in res:
     29#    row = {}
     30#    ro = r.getObject()
     31#    rd = ro.getContent()
     32#    row['id'] = r.getId
     33#    row['title'] = rd.Title()
     34#    row['url'] = ro.absolute_url()
     35#    items.append(row)
     36#info['courses'] = items
    3737res = context.portal_catalog(container_path="%s/certificates" % cp)
    3838items = []
     
    4747info['certificates'] = items
    4848return info
     49
  • WAeUP_SRP/trunk/skins/waeup_utilities/fixLevelFromResults.py

    r1409 r1434  
    3939line_count = 0
    4040lines = []
    41 #from Products.zdb import set_trace;set_trace()
    4241res = scat()
    4342for sbrain in res:
     
    4847    erg = context.results_import(matric_no=sbrain.matric_no)
    4948    if erg and erg[0].Level:
    50         #lc = "N"
    5149        level_res = erg[0].Level
    5250        everdict = erg[0].Verdict
     
    5452        #if level_cc == 0:
    5553            #lc = "-"
    56         #if "%d00" % level_cc != level_res:
    5754        lc = 100*level_cc - int(level_res)
    5855        verdict,elegible = context.getVerdict(everdict)
    5956        if elegible:
    60             #lc = "S"
    6157            level = "%d00" % (level_cc + 1)
    62         #context.students_catalog.modifyRecord(id = sbrain.id,
    63         #                                      level="",
    64         #                                      verdict = "")
     58        context.students_catalog.modifyRecord(id = sbrain.id,
     59                                              level="",
     60                                              verdict = "")
    6561        while True:
    6662            student = getattr(students,sbrain.id,None)
     
    7268            if study_course is None:
    7369                break
    74             #study_course.getContent().edit(mapping = {'current_level':level,
    75             #                                          'current_verdict':verdict})
    76             #context.students_catalog.modifyRecord(id = sbrain.id,
    77             #                                      level=level,
    78             #                                      verdict=verdict)
     70            study_course.getContent().edit(mapping = {'current_level':level,
     71                                                      'current_verdict':verdict})
     72            context.students_catalog.modifyRecord(id = sbrain.id,
     73                                                  level=level,
     74                                                  verdict=verdict)
    7975            ec = "reg"
    8076            break
    8177
    82         #rwrite(ec +"--"+ sbrain.id +"--"+ sbrain.matric_no +"--"+ old_level +"--"+ level +"<br />")
    8378        s = '"%s","%s","%s","%s","%s","%s","%s","%s"' % (str(lc),ec,
    8479                                                           sbrain.id,
     
    9085        #lines.append(s)
    9186    else:
    92         #rwrite(ec +"--"+ sbrain.id +"--"+ sbrain.matric_no + "<br />")
    9387        s = '"","%s","%s","%s","",""' % (ec,sbrain.id,sbrain.matric_no)
    9488        #lines.append(s)
Note: See TracChangeset for help on using the changeset viewer.