Last change
on this file since 17937 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 | """ |
---|
5 | files = context.waeup_tool.get_csv_filenames() |
---|
6 | if 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 | |
---|
15 | if "%s.csv" % key in files: |
---|
16 | return files[files.index("%s.csv" % key)] |
---|
17 | return ('--','pending data only') |
---|
Note: See
TracBrowser for help on using the repository browser.