File: preview.proc

package info (click to toggle)
wims 2%3A4.29a%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 185,704 kB
  • sloc: xml: 366,687; javascript: 120,570; ansic: 62,341; java: 62,170; sh: 7,744; perl: 3,937; yacc: 3,217; cpp: 1,915; lex: 1,805; makefile: 1,084; lisp: 914; pascal: 601; python: 520; php: 318; asm: 7
file content (74 lines) | stat: -rw-r--r-- 2,064 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74

!! ------ check method
!bound method within all,select,login,filter default all
!bound selfsend within 0,1 default 0
!bound sendotherteacher within 0,1 default 0

save_selfsend=$selfsend
save_sendotherteacher=$sendotherteacher
save_subject=!char 1 to 100 of $subject
save_subject=!detag $save_subject
!!  -------- for the moment use detag
!!  script_data_input=!char 1 to 1000 of $msg
!!!readproc adm/partialdetag.proc variable
!! save_subject=$script_data_output
save_msg=!char 1 to 1000 of $msg
save_msg=!detag $save_msg

all_list=!values v for v=1 to $nb_user
!if $method=all
  sending_mail=$all_list
!endif

!if $method=select
  sending_mail=!listintersect $all_list and $select_user
!endif

!if $method=filter
  !reset sending_mail sending_nomail
  !for lu=1 to $nb_user
    us=!record $lu of wimshome/sessions/$wims_session/.userlist_mail
    !distribute item $us_ into l_name_,f_name_,login
    !read adm/vfilter/testfilter $(us[3])\
$varfilter_
    !if $var_filter_test=1
      sending_mail=!append item $lu to $sending_mail
    !endif
  !next lu
  nbbad=0
  !if $nbw_user>0
    !for lu=1 to $nbw_user
      us=!record $lu of wimshome/sessions/$wims_session/.userlist_nomail
      !distribute item $us_ into l_name_,f_name_,login
      !read adm/vfilter/testfilter $(us[3])\
$varfilter_
      !if $var_filter_test=1
        sending_nomail=!append item $lu to $sending_nomail
        !increase nbbad
      !endif
    !next lu
  !endif
!endif

!if $method=login
  !reset sending_mail valid_login
  !for lu=1 to $nb_user
    us=!record $lu of wimshome/sessions/$wims_session/.userlist_mail
    !distribute item $us into l_name_,f_name_,login
    !if $login isitemof $loginlist
      sending_mail=!append item $lu to $sending_mail
      valid_login=!append item $login to $valid_login
    !endif
  !next lu
  bad_list=!listcomplement $valid_login in $loginlist
  nbbad=!itemcnt $bad_list
!endif

nbsend=!itemcnt $sending_mail
!if $nbsend=0
  error=nousermail
  !reset job
  !exit
!endif
nbteacher=!recordcnt wimshome/sessions/$wims_session/.teacherlist_mail