Rev 2477 | Rev 4598 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2477 | Rev 3974 | ||
---|---|---|---|
Line 32... | Line 32... | ||
32 | dictionary=$module_dir/arch/recdep |
32 | dictionary=$module_dir/arch/recdep |
33 | dep=!exec translator $selw |
33 | dep=!exec translator $selw |
34 | copy=!words2items $selw $dep |
34 | copy=!words2items $selw $dep |
35 | copy=!listuniq $copy |
35 | copy=!listuniq $copy |
36 | 36 | ||
- | 37 | !! ----------------------------- restore of user when replace or merge |
|
37 | !if user isitemof $copy |
38 | !if user isitemof $copy |
38 | n=!recordcnt wimshome/$wims_sesdir/upload/class/.userlist |
39 | n=!recordcnt wimshome/$wims_sesdir/upload/class/.userlist |
- | 40 | !read adm/class/userremain.proc |
|
- | 41 | m=!recordcnt wimshome/log/classes/$wims_class/.userlist |
|
39 | !if $restore=merge |
42 | !if $restore=merge |
- | 43 | !if $n>$dispo |
|
- | 44 | user_bad=refused |
|
40 |
|
45 | copy=!listcomplement user,score in $copy |
- | 46 | !endif |
|
41 | !else |
47 | !else |
- | 48 | !if ($n>$dispo and $class_superclass!=$empty) or ($class_superclass=$empty and $n>$dispo+$m) |
|
- | 49 | user_bad=refused |
|
- | 50 | copy=!listcomplement user,score in $copy |
|
42 |
|
51 | !else |
- | 52 | !if $m>0 |
|
- | 53 | erase=user |
|
- | 54 | !endif |
|
- | 55 | !endif |
|
43 | !endif |
56 | !endif |
- | 57 | !if ($wims_supertype=4 or $wims_supertype=2) |
|
- | 58 | !if $class_typename=class |
|
- | 59 | !if user isin $erase |
|
- | 60 | !for k=1 to $m |
|
- | 61 | u=!record $k of wimshome/log/classes/$wims_class/.userlist |
|
- | 62 | t=!defof user_participate in wimshome/log/classes/$wims_superclass/.users/$(u[3]) |
|
- | 63 | t=!listcomplement $wims_class in $t |
|
- | 64 | !setdef !set user_participate=$t in wimshome/log/classes/$wims_superclass/.users/$(u[3]) |
|
- | 65 | !next k |
|
- | 66 | !endif |
|
44 |
|
67 | !reset user_ok,user_loginused |
- | 68 | !for k=1 to $n |
|
- | 69 | u=!record $k of wimshome/$wims_sesdir/upload/class/.userlist |
|
- | 70 | test=!defof user_exists in wimshome/log/classes/$wims_superclass/.users/$(u[3]) |
|
- | 71 | !if $test!=$empty |
|
- | 72 | user_loginused=!append item $(u[3]) to $(user_loginused) |
|
- | 73 | !sh rm -f $wims_home/$wims_sesdir/upload/class/.users/$(u[3]) $wims_home/$wims_sesdir/upload/class/score/$(u[3]) $wims_home/$wims_sesdir/upload/class/noscore/$(u[3]); |
|
- | 74 | !else |
|
- | 75 | user_ok=!append item $(u[3]) to $user_ok |
|
45 |
|
76 | !endif |
- | 77 | !next k |
|
- | 78 | !sh cd $wims_home/$wims_sesdir/upload/class/;\ |
|
- | 79 | cp -pR .users $wims_home/log/classes/$wims_superclass/; |
|
46 |
|
80 | !for u in $user_ok |
- | 81 | !setdef !set user_participate=$wims_class in wimshome/log/classes/$wims_superclass/.users/$u |
|
- | 82 | !next k |
|
- | 83 | !endif |
|
47 | copy=!listcomplement |
84 | copy=!listcomplement user in $copy |
- | 85 | !readproc adm/class/mkuserlist |
|
48 | !endif |
86 | !endif |
49 | !endif |
87 | !endif |
50 | 88 | ||
51 | !if $restore=replace |
89 | !if $restore=replace |
52 | erase=$copy |
90 | erase=$copy |