Ignore:
Timestamp:
4 Oct 2008, 05:41:27 (16 years ago)
Author:
Henrik Bettermann
Message:
  • OIS customizations according to Issoufou's wish list of Oct 2 (2, 4, 5, 6, 7, 8)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_student/getGradesFromScore.py

    r2756 r3707  
    55##bind script=script
    66##bind subpath=traverse_subpath
    7 ##parameters=score=None
     7##parameters=score=None,level_id=None
    88##title=
    99##
    1010# $Id$
    1111
    12 if score is None:
    13     return None,None
    14 score = int(score)
    15 if score >= 70:
    16     return ('A',5)
    17 if score >= 60:
    18     return ('B',4)
    19 if score >= 50:
    20     return ('C',3)
    21 if score >= 45:
    22     return ('D',2)
    23 if score >= 40:
    24     return ('E',1)
    25 return ('F',0)
     12if level_id:
     13    if level_id in ('100', '200', '300'):
     14        if score >= 80:
     15            return ('A')
     16        if score >= 60:
     17            return ('C')
     18        if score >= 55:
     19            return ('P')
     20        if score >= 0:
     21            return ('F')                               
     22    elif level_id in ('400', '500', '600'):
     23        if score >= 80:
     24            return ('A1')
     25        if score >= 75:
     26            return ('B2')
     27        if score >= 70:
     28            return ('B3')
     29        if score >= 65:
     30            return ('C4')
     31        if score >= 60:
     32            return ('C5')
     33        if score >= 55:
     34            return ('C6')
     35        if score >= 0:
     36            return ('F9')
     37    else:
     38        return('X')
     39else:
     40    if score is None:
     41        return None,None
     42    score = int(score)
     43    if score >= 70:
     44        return ('A',5)
     45    if score >= 60:
     46        return ('B',4)
     47    if score >= 50:
     48        return ('C',3)
     49    if score >= 45:
     50        return ('D',2)
     51    if score >= 40:
     52        return ('E',1)
     53    return ('F',0)
Note: See TracChangeset for help on using the changeset viewer.