Subversion Repositories wimsdev

Rev

Rev 17811 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 17811 Rev 17847
Line 33... Line 33...
33
chmod a+rwx tmp/forall
33
chmod a+rwx tmp/forall
34
# clean tmp/whoconnect
34
# clean tmp/whoconnect
35
rm -rf tmp/whoconnect 2>/dev/null
35
rm -rf tmp/whoconnect 2>/dev/null
36
mkdir -p tmp/whoconnect
36
mkdir -p tmp/whoconnect
37
 
37
 
38
# Any classes which will expire in one month ?
38
# Any classes which will expire in one month?
39
cd $WIMS_HOME/log/classes
39
cd $WIMS_HOME/log/classes
40
for cls in [0-9]*
40
for cls in [0-9]*
41
do
41
do
42
exp=`awk -F'=' '$1=="!set class_expiration" {print $2; exit}' $cls/.def`
42
exp=`awk -F'=' '$1=="!set class_expiration" {print $2; exit}' $cls/.def`
43
 
43
 
Line 59... Line 59...
59
(code $cls) on the site $site_hostname. This class will be closed in
59
(code $cls) on the site $site_hostname. This class will be closed in
60
one month because it will reach its expiration date.
60
one month because it will reach its expiration date.
61
You should download a archive file of your class and
61
You should download a archive file of your class and
62
upload its content or part of it into another class.
62
upload its content or part of it into another class.
63
 
63
 
64
To get an archive file of the contents of this class, follow this link :
64
To get an archive file of the contents of this class, follow this link:
65
 
65
 
66
--- WIMS (WWW Interactive Multipurpose Server)
66
--- WIMS (WWW Interactive Multipurpose Server)
67
http://$site_hostname/wims/wims.cgi?module=adm/class/classes&+type=authsupervisor&+class=$cls
67
http://$site_hostname/wims/wims.cgi?module=adm/class/classes&+type=authsupervisor&+class=$cls
68
 
68
 
69
@
69
@
Line 89... Line 89...
89
 
89
 
90
(code $cls) on the site $site_hostname. This class is now closed,
90
(code $cls) on the site $site_hostname. This class is now closed,
91
because it has reached its expiration date.
91
because it has reached its expiration date.
92
 
92
 
93
The complete registry of this class (user list and activity history)
93
The complete registry of this class (user list and activity history)
94
is stored in an archive file, which can be sent to you upon request
94
is stored in an archive file, which can be recovered upon request
95
to the webmaster of this site.
95
to the webmaster of this site.
96
 
96
 
97
--- WIMS (WWW Interactive Multipurpose Server)
97
--- WIMS (WWW Interactive Multipurpose Server)
98
    http://$site_hostname/
98
    http://$site_hostname/
99
 
99
 
Line 126... Line 126...
126
   list=`ls -dt $d/* | tail -n +$examlog_lim2`
126
   list=`ls -dt $d/* | tail -n +$examlog_lim2`
127
   if [ -n "$list" ]; then rm -Rf $list; fi
127
   if [ -n "$list" ]; then rm -Rf $list; fi
128
 done
128
 done
129
done
129
done
130
 
130
 
131
# is the class number limit or the user number limit reached ?
131
# is the class number limit or the user number limit reached?
132
# do it each 01 of month !
132
# do it each 01 of month!
133
today1=`date +%d`
133
today1=`date +%d`
134
if [ "$today1" -eq "01" ]; then
134
if [ "$today1" -eq "01" ]; then
135
 cd $WIMS_HOME/log/classes
135
 cd $WIMS_HOME/log/classes
136
 site_manager=`awk -F'=' '$1=="site_manager" {print $2; exit}' $WIMS_HOME/log/wims.conf`
136
 site_manager=`awk -F'=' '$1=="site_manager" {print $2; exit}' $WIMS_HOME/log/wims.conf`
137
 user_limit=`awk -F'=' '$1=="user_limit" {print $2; exit}' $WIMS_HOME/log/wims.conf`
137
 user_limit=`awk -F'=' '$1=="user_limit" {print $2; exit}' $WIMS_HOME/log/wims.conf`
Line 190... Line 190...
190
    mkdir -p $s/$d
190
    mkdir -p $s/$d
191
   done
191
   done
192
done
192
done
193
# Sheet expiration management. This should be activated during summer vacation.
193
# Sheet expiration management. This should be activated during summer vacation.
194
for s in `find . -path '*/sheets/.sheets' -type f`; do
194
for s in `find . -path '*/sheets/.sheets' -type f`; do
195
# quick test : any sheet to expire now ?
195
# quick test: any sheet to expire now?
196
   test=`awk 'BEGIN {a=0};
196
   test=`awk 'BEGIN {a=0};
197
	a==1 {a=0; if($1<'$today' && b==1) {print "Z"; exit}}
197
	a==1 {a=0; if($1<'$today' && b==1) {print "Z"; exit}}
198
	substr($1,1,1)==":" {a=1;b=substr($1,2,1)};' $s`
198
	substr($1,1,1)==":" {a=1;b=substr($1,2,1)};' $s`
199
# if test then change status code to 2 for sheets to expire
199
# if test then change status code to 2 for sheets to expire
200
# in temporary file, then overwrite old file with new one
200
# in temporary file, then overwrite old file with new one
Line 207... Line 207...
207
   fi
207
   fi
208
done
208
done
209
 
209
 
210
# Sequence auto hide/show management.
210
# Sequence auto hide/show management.
211
#for s in `find . -path '*/seq/.sequence[0-9]*' -type f`; do
211
#for s in `find . -path '*/seq/.sequence[0-9]*' -type f`; do
212
# quick test : any sequence to hide now ?
212
# quick test: any sequence to hide now?
213
#   test=`sed -n 5p $s`
213
#   test=`sed -n 5p $s`
214
#   if [ "$today" = "$test" ]; then
214
#   if [ "$today" = "$test" ]; then
215
#    awk 'BEGIN {cpt=0};
215
#    awk 'BEGIN {cpt=0};
216
#	{a+=1; if(a==4) {print "0"} else {print $0};}' $s >.tmp
216
#	{a+=1; if(a==4) {print "0"} else {print $0};}' $s >.tmp
217
#    mv -f .tmp $s
217
#    mv -f .tmp $s
218
#   fi
218
#   fi
219
# quick test : any sequence to show now ?
219
# quick test: any sequence to show now?
220
#   test=`sed -n 6p $s`
220
#   test=`sed -n 6p $s`
221
#   if [ "$today" = "$test" ]; then
221
#   if [ "$today" = "$test" ]; then
222
#    awk 'BEGIN {cpt=0};
222
#    awk 'BEGIN {cpt=0};
223
#	{a+=1; if(a==4) {print "1"} else {print $0};}' $s >.tmp
223
#	{a+=1; if(a==4) {print "1"} else {print $0};}' $s >.tmp
224
#    mv -f .tmp $s
224
#    mv -f .tmp $s