Rev 4561 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4561 | obado | 1 | # Update |
9691 | obado | 2 | # |
4561 | obado | 3 | |
23 | reyssat | 4 | !read scripts/check.class |
5 | !if $error!=$empty |
||
6 | !exit |
||
7 | !endif |
||
8 | |||
9 | option=!items2words $option |
||
10 | option=!trim $option |
||
11 | !if $option=$empty |
||
12 | error=nothing done |
||
13 | !exit |
||
14 | !endif |
||
15 | |||
16 | method=!word 1 of $option |
||
17 | parms=!word 2 to -1 of $option |
||
18 | |||
19 | !if $method notwordof class user users file files score scores or\ |
||
20 | $method iswordof file files score and $ident_type!=wims |
||
21 | error=bad method |
||
22 | !exit |
||
23 | !endif |
||
24 | |||
25 | !if $method iswordof user score |
||
26 | !read scripts/check.user |
||
27 | !if $error!=$empty |
||
3049 | bpr | 28 | error=bad $method |
23 | reyssat | 29 | !exit |
30 | !endif |
||
31 | !endif |
||
32 | |||
33 | cn_sync=yes |
||
34 | !reset cn_option cn_data1 cn_data2 |
||
35 | |||
36 | !if $method=users |
||
37 | cn_option=login,lastname,firstname,password,email |
||
38 | !endif |
||
39 | !if $method=scores |
||
40 | cn_option=login,manuals |
||
41 | !endif |
||
42 | !if $method=file |
||
43 | cn_option=$parms |
||
44 | !endif |
||
45 | |||
46 | parm_$method=empty |
||
47 | parm_class=getclass |
||
48 | parm_user=getuser |
||
49 | parm_users=getcsv |
||
50 | parm_scores=getcsv |
||
51 | parm_file=getclassfile |
||
52 | parm_files=getclasstgz |
||
53 | |||
54 | !readproc adm/connect/main.proc $(parm_$method) $ident $rclass $quser |
||
3049 | bpr | 55 | !if $cn_status=$empty |
23 | reyssat | 56 | :backerror |
3049 | bpr | 57 | error=back calling error: $cn_data $cn_status ---$(parm_$method) $ident $rclass -- $qclass $method |
23 | reyssat | 58 | !exit |
59 | !endif |
||
60 |