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

Last change on this file since 12113 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
RevLine 
[1756]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:
[3162]7    if files:
8        l = [(f[:-4],f) for f in files]
9    else:
10        l = []
[3167]11    l.insert(0,('--','pending data only'))
[2282]12    l.sort(cmp=lambda x,y: cmp(x[0].lower(), y[0].lower()))
13    return l
[1756]14
[3162]15if "%s.csv" % key in files:
16    return files[files.index("%s.csv" % key)]
[3167]17return ('--','pending data only')
Note: See TracBrowser for help on using the repository browser.