Ignore:
Timestamp:
31 Jan 2008, 16:41:48 (17 years ago)
Author:
Henrik Bettermann
Message:

calculate correct level in academics section

Location:
WAeUP_SRP/base/skins/waeup_student
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/skins/waeup_student/create_level.py

    r2988 r3074  
    7171l = []
    7272
    73 level_nr,dummy = divmod(int(current_level),100)
     73#level_nr,dummy = divmod(int(current_level),100)
    7474# fetch session courses from the certificate
    7575res = context.portal_catalog(portal_type="Certificate", id = cert_id)
     
    7777    cert = res[0]
    7878    path = cert.getPath()
    79     academics_level = 100 * level_nr
     79    #academics_level = 100 * level_nr
     80    if int(current_level) > 0:
     81        academics_level = 100 * (int(current_level)/100)
     82    else:
     83        academics_level = '000'   
    8084    query = Eq("path","%s/%s" % (path,academics_level)) &\
    8185            Eq('portal_type','CertificateCourse')
  • WAeUP_SRP/base/skins/waeup_student/refresh_level.py

    r2758 r3074  
    5454    cert = res[0]
    5555    path = cert.getPath()
    56     academics_level = 100 * (int(student.level)/100)
     56    if int(student.level) > 0:
     57        academics_level = 100 * (int(student.level)/100)
     58    else:
     59        academics_level = '000'
    5760    query = Eq("path","%s/%s" % (path,academics_level)) &\
    5861            Eq('portal_type','CertificateCourse')
Note: See TracChangeset for help on using the changeset viewer.