Rev 10378 | Rev 10496 | 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 | |||
10331 | bpr | 18 | !!for ods the script csv/mkODS.py is not there. |
19 | !bound csvformat within csv,tsv default csv |
||
23 | reyssat | 20 | !default csvdownload=login,name |
21 | |||
22 | !if $csvtype=download |
||
23 | csvdownload=!trim $csvdownload |
||
10005 | guerimand | 24 | !if techvar isitemof $csvdownload |
25 | !! add technical variable list to download list |
||
26 | csvdownload=!listcomplement techvar in $csvdownload |
||
27 | nb=!linecnt $tv_listtechvar |
||
28 | !for k=1 to $nb |
||
10368 | bpr | 29 | name=!replace internal / by _ in $(tv_listtechvar[$k;2])_$(tv_listtechvar[$k;3]) |
30 | csvdownload=!append item techvar_$name to $csvdownload |
||
10378 | guerimand | 31 | code_user_techvar_$name=var_$(tv_listtechvar[$k;1]) |
10368 | bpr | 32 | name_user_techvar_$name=$(tv_listtechvar[$k;1]) |
10005 | guerimand | 33 | !next k |
34 | !endif |
||
10368 | bpr | 35 | !if regvar isitemof $csvdownload |
36 | !! add register variable list to download list |
||
37 | regvar_name=!defof class_regvars in wimshome/log/classes/$wims_class/.def |
||
38 | regvar_cnt=!itemcnt $regvar_name |
||
39 | csvdownload=!listcomplement regvar in $csvdownload |
||
40 | !reset regvarlist |
||
41 | !for k=1 to $regvar_cnt |
||
10382 | guerimand | 42 | name_regprop$k=$(regvar_name[$k]) |
10368 | bpr | 43 | csvdownload=!append item regprop$k to $csvdownload |
44 | regvarlist=!append item regprop$k to $regvarlist |
||
10382 | guerimand | 45 | !next k |
10368 | bpr | 46 | !endif |
47 | |||
23 | reyssat | 48 | !if $csvdownload!=$empty and $usercnt>0 |
49 | !read csv/download.proc |
||
50 | !endif |
||
51 | !endif |
||
52 | |||
53 | !if $csvtype=upload |
||
5412 | bpr | 54 | !if $classtype isin 13 and $typename notwordof class course and\ |
55 | ($typename notwordof level or $wims_user!=supervisor) |
||
23 | reyssat | 56 | error=not_class |
57 | !exit |
||
58 | !endif |
||
59 | !read csv/upload.proc |
||
60 | !endif |
||
61 | |||
62 | !reset csvtype |
||
63 | |||
10334 | bpr | 64 | !set wims_ariane_self=no |
65 | !set wims_ariane=!append line csv,8 to\ |
||
66 | $wims_ariane |
||
67 |