source: WAeUP_SRP/trunk/skins/waeup_default/get_csv_names.py @ 16250

Last change on this file since 16250 was 3820, checked in by Henrik Bettermann, 16 years ago

improve security setting for lecturer course editing

  • Property svn:keywords set to Id
File size: 404 bytes
Line 
1##parameters=key=None
2# $Id: get_csv_names.py 3820 2008-12-16 07:43:06Z henrik $
3"""
4"""
5files = context.waeup_tool.get_csv_filenames()
6if key is None:
7    if files:
8        l = [(f[:-4],f) for f in files]
9    else:
10        l = []
11    l.insert(0,('--','pending data only'))
12    l.sort(cmp=lambda x,y: cmp(x[0].lower(), y[0].lower()))
13    return l
14
15if "%s.csv" % key in files:
16    return files[files.index("%s.csv" % key)]
17return ('--','pending data only')
Note: See TracBrowser for help on using the repository browser.