Rev 10382 | Rev 10516 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
23 | reyssat | 1 | |
2 | sec=!defof class_secure in wimshome/log/classes/$wims_class/.def |
||
3 | sec=!trim $sec |
||
4 | htest=!checkhost $sec |
||
5 | !if $wims_sup_secure<0 or ($sec!=$empty and $htest<1) |
||
6 | error=not_secure |
||
7 | !exit |
||
8 | !endif |
||
9 | |||
10 | typename=!defof class_typename in wimshome/log/classes/$wims_class/.def |
||
11 | classtype=!defof class_type in wimshome/log/classes/$wims_class/.def |
||
12 | |||
13 | #!if $wims_superclass!=$empty and $csvtype=upload |
||
14 | # error=not_superclass |
||
15 | # !exit |
||
16 | #!endif |
||
17 | |||
10496 | czzmrn | 18 | csvformatlist=csv,tsv |
10331 | bpr | 19 | !!for ods the script csv/mkODS.py is not there. |
10496 | czzmrn | 20 | !bound csvformat within $csvformatlist default csv |
23 | reyssat | 21 | !default csvdownload=login,name |
22 | |||
23 | !if $csvtype=download |
||
24 | csvdownload=!trim $csvdownload |
||
10005 | guerimand | 25 | !if techvar isitemof $csvdownload |
26 | !! add technical variable list to download list |
||
27 | csvdownload=!listcomplement techvar in $csvdownload |
||
28 | nb=!linecnt $tv_listtechvar |
||
29 | !for k=1 to $nb |
||
10368 | bpr | 30 | name=!replace internal / by _ in $(tv_listtechvar[$k;2])_$(tv_listtechvar[$k;3]) |
31 | csvdownload=!append item techvar_$name to $csvdownload |
||
10378 | guerimand | 32 | code_user_techvar_$name=var_$(tv_listtechvar[$k;1]) |
10368 | bpr | 33 | name_user_techvar_$name=$(tv_listtechvar[$k;1]) |
10005 | guerimand | 34 | !next k |
35 | !endif |
||
10368 | bpr | 36 | !if regvar isitemof $csvdownload |
37 | !! add register variable list to download list |
||
38 | regvar_name=!defof class_regvars in wimshome/log/classes/$wims_class/.def |
||
39 | regvar_cnt=!itemcnt $regvar_name |
||
40 | csvdownload=!listcomplement regvar in $csvdownload |
||
41 | !reset regvarlist |
||
42 | !for k=1 to $regvar_cnt |
||
10382 | guerimand | 43 | name_regprop$k=$(regvar_name[$k]) |
10368 | bpr | 44 | csvdownload=!append item regprop$k to $csvdownload |
45 | regvarlist=!append item regprop$k to $regvarlist |
||
10382 | guerimand | 46 | !next k |
10368 | bpr | 47 | !endif |
48 | |||
23 | reyssat | 49 | !if $csvdownload!=$empty and $usercnt>0 |
50 | !read csv/download.proc |
||
51 | !endif |
||
52 | !endif |
||
53 | |||
54 | !if $csvtype=upload |
||
5412 | bpr | 55 | !if $classtype isin 13 and $typename notwordof class course and\ |
56 | ($typename notwordof level or $wims_user!=supervisor) |
||
23 | reyssat | 57 | error=not_class |
58 | !exit |
||
59 | !endif |
||
60 | !read csv/upload.proc |
||
61 | !endif |
||
62 | |||
63 | !reset csvtype |
||
64 | |||
10334 | bpr | 65 | !set wims_ariane_self=no |
66 | !set wims_ariane=!append line csv,8 to\ |
||
67 | $wims_ariane |
||
68 |