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