source: WAeUP_SRP/trunk/skins/waeup_student/getLevelFromResultsCosCode.py @ 1944

Last change on this file since 1944 was 1678, checked in by Henrik Bettermann, 18 years ago

return interger value

  • Property svn:keywords set to Id
File size: 535 bytes
Line 
1## Script (Python) "getLevelFromResultsList"
2##bind container=container
3##bind context=context
4##bind namespace=
5##bind script=script
6##bind subpath=traverse_subpath
7##parameters=list
8##title=
9##
10# $Id: getLevelFromResultsCosCode.py 1678 2007-04-10 17:41:35Z henrik $
11lnr = 0
12for e in list:
13    if e.CosCode == "N/A":
14       
15        # used for medical dummy results
16        # return 2
17       
18        # used for 'Temporary Withdrawal' dummy results
19        return int(e.Level[0])
20    try:
21        cc = int(e.CosCode[3])
22    except:
23        continue
24    if lnr <= cc:
25        lnr = cc
26return lnr
27
Note: See TracBrowser for help on using the repository browser.