Rev 14287 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2290 | bpr | 1 | |
23 | reyssat | 2 | !if robot isin $session |
14287 | obado | 3 | !exit |
23 | reyssat | 4 | !endif |
2290 | bpr | 5 | |
23 | reyssat | 6 | wims_prefix=mb class user tmp |
1441 | bpr | 7 | !defread wimshome/log/classes/$wims_class/.def |
8 | !!! the forum in levels should be accessible from the portal |
||
9 | !if $wims_class=$wims_superclass and $class_type=4 |
||
10 | participate_=!defof user_participate in wimshome/log/classes/$wims_class/.users/$wims_user |
||
11 | supervise_=!defof user_supervise in wimshome/log/classes/$wims_class/.users/$wims_user |
||
12 | for_test=!replace internal classes/ by in $forum |
||
13 | !reset for_test_ |
||
14 | !if ,$for_test isin ,$participate_,$supervise_ |
||
15 | for_test_=yes |
||
16 | for_test=!replace internal / by , in $for_test |
||
17 | for_test=!item 2 of $for_test |
||
18 | !endif |
||
19 | !endif |
||
20 | !if $wims_class>0 and ($forum=$empty or $forum=classes/$wims_class or $for_test_=yes) |
||
13679 | bpr | 21 | !if $for_test_!= |
22 | for_level=!nospace /$for_test |
||
23 | reyssat | 23 | !else |
13679 | bpr | 24 | for_level= |
23 | reyssat | 25 | !endif |
14287 | obado | 26 | classname=!defof class_description in wimshome/log/classes/$wims_class$for_level/.def |
13679 | bpr | 27 | forumdir=wimshome/log/classes/$wims_class$for_level/forum |
28 | Forumdir=$wims_home/log/classes/$wims_class$for_level/forum |
||
29 | forum=classes/$wims_class$level |
||
23 | reyssat | 30 | !defread $forumdir/.def |
13679 | bpr | 31 | !if $mb_defined!=yes |
32 | !!!FIXME ??? if wims_class is 456778/3/201, what is the value ??? |
||
33 | !if $wims_class>9999 |
||
34 | cfm_send=alluser |
||
35 | !else |
||
36 | cfm_send=mailuser |
||
37 | !endif |
||
38 | !mexec scripts/mkclassforum.sh |
||
39 | !defread $forumdir/.def |
||
40 | !endif |
||
41 | !if $mb_defined!=yes |
||
42 | error=forum_not_exist |
||
43 | job=list |
||
44 | !exit |
||
45 | !endif |
||
46 | forumrealuser=$wims_realuser |
||
47 | forumuser=$wims_user |
||
48 | !default forumrealuser=$wims_user |
||
23 | reyssat | 49 | !else |
13679 | bpr | 50 | forum=!text select 0123456789 in $forum |
51 | !default forum=1001 |
||
52 | forumdir=wimshome/log/forums/$forum |
||
53 | !defread $forumdir/.def |
||
54 | !if $mb_defined!=yes |
||
55 | error=forum_not_exist |
||
56 | job=list |
||
57 | !exit |
||
58 | !endif |
||
59 | !if $job=authuser |
||
60 | !read var.init.auth |
||
61 | job=list |
||
62 | !else |
||
63 | !defread wimshome/$wims_sesdir/mb_user.$forum |
||
64 | !endif |
||
23 | reyssat | 65 | !endif |
4759 | bpr | 66 | ## a supprimer dans les prochaines versions |
67 | !sh mkdir -p $Forumdir/.users |
||
23 | reyssat | 68 | |
69 | !mexec scripts/rmdeposit.sh |
||
70 | |||
10991 | bpr | 71 | !if $forumrealuser!=$empty |
13679 | bpr | 72 | !if classes isin $forumdir |
73 | !read adm/class/userdef classes,$wims_class,$forumrealuser |
||
74 | !defread $userdef |
||
75 | !else |
||
76 | !defread $forumdir/.users/$forumuser |
||
77 | !endif |
||
78 | c_sender=$wims_firstname $wims_lastname |
||
79 | c_smail=$wims_email |
||
80 | !default c_sender=$user_firstname $user_lastname |
||
81 | !default c_smail=$user_email |
||
23 | reyssat | 82 | !endif |
83 | |||
84 | is_owner=no |
||
85 | !if $forumuser=supervisor |
||
13679 | bpr | 86 | is_owner=yes |
23 | reyssat | 87 | !endif |
88 | |||
89 | !bound mb_readpolicy within open,alluser,selecuser,owner default alluser |
||
90 | rpolycode=!positionof item $mb_readpolicy in open,alluser,selecuser,owner |
||
91 | !if $forumuser!=$empty |
||
13679 | bpr | 92 | !if $is_owner=yes |
93 | read_right=1 |
||
94 | !else |
||
95 | read_right=!item $rpolycode of 1,1,1,0 |
||
96 | !endif |
||
23 | reyssat | 97 | !else |
13679 | bpr | 98 | read_right=!item $rpolycode of 1,0,0,0 |
23 | reyssat | 99 | !endif |
100 | |||
101 | !bound mb_sendpolicy within open,mail,alluser,mailuser,selecuser,owner default alluser |
||
102 | # 0: no right. 1: email verify. 2: owner check. 3: immediate. |
||
103 | spolycode=!positionof item $mb_sendpolicy in open,mail,alluser,mailuser,selecuser,owner |
||
104 | !if $forumuser!=$empty |
||
13679 | bpr | 105 | !if $is_owner=yes |
106 | send_right=!item $spolycode of 3,3,3,3,3,3 |
||
107 | !else |
||
108 | send_right=!item $spolycode of 3,3,3,1,3,0 |
||
109 | !endif |
||
23 | reyssat | 110 | !else |
13679 | bpr | 111 | send_right=!item $spolycode of 3,1,0,0,0,0 |
23 | reyssat | 112 | !endif |
14637 | guerimand | 113 | !bound mb_nolink within yes,no default yes |