Subversion Repositories wimsdev

Rev

Rev 17593 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
14297 guerimand 1
!! reactive a freework which is perime
14902 guerimand 2
!! change statut from 2 or 3 to 1
14297 guerimand 3
 
4
!! --- testing if freework is perime
14902 guerimand 5
!if $activetest!=2 and $activetest!=3
14297 guerimand 6
  error=fwnotperime
7
  job=configfw
8
  !changeto $job.proc
9
!endif
10
 
14902 guerimand 11
!! --- testing if freework not archivated
12
test=!fileexists wimshome/log/classes/$wims_class/freeworksdata/$freework/.archivated
13
!if $test=yes and $type>=2
14
  error=alreadyarchivated
15
  job=configfw
16
  !changeto $job.proc
17
!endif
18
 
14297 guerimand 19
!! testing for enough class capacity
20
!readproc adm/class/quotafree.proc
21
!read adm/du $wims_home/log/classes/$wims_class/freeworksdata/$k_/work
22
nbuser=!recordcnt wimshome/log/classes/$wims_class/.userlist
23
need=$[$nbuser*$sizelimitfile*0.25-$du]
24
!if $quota_free-$need <10
25
  error=notenoughfreespace
26
  job=configfw
27
  !changeto $job.proc
28
!endif
29
 
30
!! change statut
31
activetest=1
32
update_content=1\
33
$class_expiration\
34
$title\
35
$desc\
36
$comment\
37
$type\
38
$deadline.$timedeadline\
39
$soldate.$timesoldate\
14537 guerimand 40
$sizelimitfile\
14747 guerimand 41
$scoring\
17593 czzmrn 42
$seealltime\
43
$studentclose
14537 guerimand 44
 
14297 guerimand 45
update_field=$freework
17634 czzmrn 46
update_nbline=$fw_nbline
14297 guerimand 47
!read adm/uprecord wimshome/log/classes/$wims_class/freeworks/.freeworks
48
 
49
success=goodstatut
50
!if $back=1
51
  !restart module=home
52
!else
53
  job=configfw
54
  !reset back
55
  !changeto $job.proc
56
!endif
57
 
58