Rev 12337 | Rev 12359 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
23 | reyssat | 1 | max_todo=5 |
2 | max_defaffi=10 |
||
3 | |||
4 | !if ($wims_supertype<3 and $wims_typename=class) or ($wims_supertype=4 and $wims_typename=course) |
||
12340 | bpr | 5 | cdt_supervise=yes |
6 | !readdef wimshome/log/classes/$wims_class/cdt/.def |
||
7 | !if $cdt_hide=yes |
||
11978 | guerimand | 8 | hiddenlist=$wims_class |
12340 | bpr | 9 | !endif |
10 | !if $cdt_defined!=yes and $wims_class!=$empty |
||
11 | !sh mkdir -p $wims_home/log/classes/$wims_class/cdt/def;\ |
||
23 | reyssat | 12 | mkdir -p $wims_home/log/classes/$wims_class/cdt/src;\ |
13 | mkdir -p $wims_home/log/classes/$wims_class/cdt/files; |
||
2130 | bpr | 14 | !filewrite wimshome/log/classes/$wims_class/cdt/.def !set cdt_title=$wims_name_cdt\ |
23 | reyssat | 15 | !set cdt_description=$empty\ |
16 | !set cdt_defined=yes\ |
||
17 | !set cdt_nbdate=0\ |
||
18 | !set cdt_ltmonth=$empty |
||
12340 | bpr | 19 | !set cdt_title=$wims_name_cdt |
20 | !set cdt_description=$empty |
||
21 | !set cdt_defined=yes |
||
22 | !set cdt_nbdate=0 |
||
23 | !set cdt_ltmonth=$empty |
||
24 | !endif |
||
25 | !if / isin $wims_class |
||
26 | part1=!replace internal / by , in $wims_class |
||
27 | part2=!item -1 of $part1 |
||
28 | part1=!item 1 to -2 of $part1 |
||
29 | part1=!replace internal , by / in $part1 |
||
30 | part1=!nospace $part1 |
||
31 | !sh cd $wims_home/$wims_sesdir;\ |
||
32 | mkdir -p getfile;\ |
||
33 | cd getfile;\ |
||
34 | rm -rf cdt;\ |
||
35 | mkdir -p cdt/$part1;\ |
||
36 | cd cdt/$part1;\ |
||
37 | ln -s $wims_home/log/classes/$wims_class/cdt/files $part2; |
||
38 | !else |
||
23 | reyssat | 39 | !sh cd $wims_home/$wims_sesdir\ |
40 | mkdir -p getfile\ |
||
41 | cd getfile\ |
||
42 | rm -rf cdt\ |
||
43 | mkdir -p cdt\ |
||
44 | cd cdt\ |
||
45 | ln -s $wims_home/log/classes/$wims_class/cdt/files $wims_class |
||
12340 | bpr | 46 | !endif |
23 | reyssat | 47 | !else |
12340 | bpr | 48 | cdt_supervise=no |
49 | courses=!record 0 of wimshome/log/classes/$wims_class/courses |
||
50 | courses=!column 1 of $courses |
||
51 | nbmonth=0 |
||
52 | nbdate=0 |
||
53 | !for prog in $courses |
||
54 | prog=!text select 0123456789/ in $prog |
||
55 | !readdef wimshome/log/classes/$wims_superclass/$prog/cdt/.def |
||
56 | !if $cdt_defined!=yes |
||
57 | !sh mkdir -p $wims_home/log/classes/$wims_superclass/$prog/cdt/def;\ |
||
58 | mkdir -p $wims_home/log/classes/$wims_superclass/$prog/cdt/src;\ |
||
59 | mkdir -p $wims_home/log/classes/$wims_superclass/$prog/cdt/files; |
||
60 | !filewrite wimshome/log/classes/$wims_superclass/$prog/cdt/.def !set cdt_title=$wims_name_cdt\ |
||
23 | reyssat | 61 | !set cdt_description=$empty\ |
62 | !set cdt_defined=yes\ |
||
63 | !set cdt_nbdate=0\ |
||
64 | !set cdt_ltmonth=$empty |
||
12340 | bpr | 65 | !set cdt_title=$wims_name_cdt |
66 | !set cdt_description=$empty |
||
67 | !set cdt_defined=yes |
||
68 | !set cdt_nbdate=0 |
||
69 | !set cdt_ltmonth=$empty |
||
70 | !endif |
||
71 | nbdate=$[$cdt_nbdate+$nbdate] |
||
72 | nbmonth=!listunion $nbmonth and $cdt_ltmonth |
||
73 | !next prog |
||
74 | cdt_nbdate=$nbdate |
||
75 | cdt_nbmonth=$nbmonth |
||
76 | !reset ltcourses hiddenlist |
||
77 | !for cl in $courses |
||
78 | test=!defof cdt_hide in wimshome/log/classes/$wims_superclass/$cl/cdt/.def |
||
79 | !if $test!=yes |
||
80 | tmp=!replace internal / by , in $cl |
||
81 | tmp=!item -1 of $tmp |
||
82 | ltcourses=!append word $tmp to $ltcourses |
||
83 | !else |
||
84 | hiddenlist=!append item $cl to $hiddenlist |
||
85 | !endif |
||
86 | !next cl |
||
87 | !sh cd $wims_home/$wims_sesdir;\ |
||
88 | mkdir -p getfile\ |
||
89 | cd getfile\ |
||
90 | rm -rf cdt\ |
||
91 | mkdir -p cdt/$wims_class/\ |
||
92 | cd cdt/$wims_class\ |
||
93 | for m in $ltcourses; do\ |
||
94 | ln -s $wims_home/log/classes/$wims_class/$$m/cdt/files $$m;\ |
||
95 | done; |
||
23 | reyssat | 96 | !endif |
97 | cdt_nbmonth=!itemcnt $cdt_ltmonth |
||
98 | |||
8138 | guerimand | 99 | !! -------------------------------- enregistrement de visite du cdt |
23 | reyssat | 100 | test=!record 0 of wimshome/s2/$wims_session/cdt |
101 | !if $test=$empty |
||
12340 | bpr | 102 | !appendfile wimshome/log/classes/$wims_class/cdt/connect.log $wims_now $httpd_REMOTE_ADDR connect $wims_user |
103 | !writefile wimshome/s2/$wims_session/cdt $wims_session |
||
8138 | guerimand | 104 | !endif |
105 | |||
9598 | guerimand | 106 | !if $cdt_showyear=1 |
12340 | bpr | 107 | dateoption=withyear |
9598 | guerimand | 108 | !else |
12340 | bpr | 109 | dateoption=$empty |
9598 | guerimand | 110 | !endif |