Rev 14984 | Rev 15238 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 14984 | Rev 15161 | ||
---|---|---|---|
Line 24... | Line 24... | ||
24 | quota_used=$du |
24 | quota_used=$du |
25 | !! -------------------- calculate space reserved |
25 | !! -------------------- calculate space reserved |
26 | quota_reserved=0 |
26 | quota_reserved=0 |
27 | !! ------- space reserved for active freework of type>=2 |
27 | !! ------- space reserved for active freework of type>=2 |
28 | nb_=!recordcnt wimshome/log/classes/$wims_class/freeworks/.freeworks |
28 | nb_=!recordcnt wimshome/log/classes/$wims_class/freeworks/.freeworks |
29 | nbuser_=!recordcnt wimshome/log/classes/$wims_class/.userlist |
- | |
30 | !for k_=1 to $nb_ |
29 | !for k_=1 to $nb_ |
31 | dt_=!record $k_ of wimshome/log/classes/$wims_class/freeworks/.freeworks |
30 | dt_=!record $k_ of wimshome/log/classes/$wims_class/freeworks/.freeworks |
32 | !distribute line $dt_ into s_,bl,bl,bl,bl,t_,bl,bl,c_ |
31 | !distribute line $dt_ into s_,bl,bl,bl,bl,t_,bl,bl,c_ |
33 | !default c_=0 |
32 | !default c_=0 |
34 | !if $s_=1 and $t_>=2 |
33 | !if $s_=1 and $t_>=2 |
35 | !read adm/du $wims_home/log/classes/$wims_class/freeworksdata/$k_/work |
34 | !read adm/du $wims_home/log/classes/$wims_class/freeworksdata/$k_/work |
36 | quota_reserved=$[$quota_reserved+ |
35 | quota_reserved=$[$quota_reserved+$class_limit*$c_*0.25-$du] |
37 | !endif |
36 | !endif |
38 | !next k_ |
37 | !next k_ |
39 | 38 | ||
40 | quota_reserved=$[min($quota_reserved,$wims_class_quota-$quota_used)] |
39 | quota_reserved=$[min($quota_reserved,$wims_class_quota-$quota_used)] |
- | 40 | ||
41 | !! -------------------- end reserved calculation |
41 | !! -------------------- end reserved calculation |
42 | quota_free=$[$quota_total-$quota_used-$quota_reserved] |
42 | quota_free=$[$quota_total-$quota_used-$quota_reserved] |
43 | 43 | ||
44 | !if $quota_free<5 |
44 | !if $quota_free<5 |
45 | auth_upload=no |
45 | auth_upload=no |