Subversion Repositories wimsdev

Rev

Rev 18578 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
18578 bpr 1
N=0
2
iii=0
16937 bpr 3
!for j=1 to $n
17615 bpr 4
  l=!record $j of $data
18578 bpr 5
  !distribute lines $l into m_,p_,r_,w_,tit_$j,d_
17615 bpr 6
  !!! hack for multi-language: the file var.proc of the module is not read -
7
  !!! this means that all other options in this var.proc are not taken in account
8
  !reset oefenv_lang
9
  test_lang=!module language $m_
10
  test_tr_lang=!module translation_language $m_
11
  !if $lang iswordof $test_tr_lang $test_lang
12
    oefenv_lang=$lang
13
  !endif
18578 bpr 14
  mod_$j=$m_
17615 bpr 15
  wims_trustfile=oef/togetfile.proc
16
  !read imagedir.proc
17
  test=!module category $m_
18
  test2=!filelist $(Class_header)src/*.oef
19
  !!!if (../classes/ isin ../$m_ or oef isin $test ) and $test2!=$empty
20
  p_=!translate internal +&= to $ \
16937 bpr 21
$ $ in $p_
17615 bpr 22
  t_=!linecnt $p_
18578 bpr 23
  !reset e
24
  qnum=1
17615 bpr 25
  !for k=1 to $t_
26
    l_=!line $k of $p_
27
    !distribute words $l_ into n_,v_
28
    !if $n_=exo
29
      e=!append item $v_ to $e
30
    !endif
31
    !if $n_=qnum
32
      qnum=$v_
33
    !endif
34
  !next k
35
  !if $e=$empty
36
    !reset exolist
37
    wims_prefix=
38
    !read $(class_header)Exindex
39
    wims_prefix=$wims_prefix2
40
    e=$exolist
41
  !endif
42
  e_cnt=!itemcnt $e
43
  e__=!shuffle $e_cnt
18578 bpr 44
  e__=!shuffle $qnum*$e_cnt
45
  e__=!item 1 to $qnum of $e__
46
  tmp_e=$e
47
  !for t=1 to $qnum-1
48
    tmp_e=$tmp_e,$e
49
  !next
50
  e=!nonempty items $tmp_e
17615 bpr 51
  e__=$(e[$e__])
52
  e_cnt=!itemcnt $e__
53
  !for l=1 to $qnum
18578 bpr 54
    !increase iii
55
    !increase N
18673 bpr 56
    !if $qnum >1
57
      num_$iii=$j.$l
58
    !else
59
      num_$iii=$j
60
    !endif
18578 bpr 61
    module_$iii=$(mod_$j)
62
    title_$iii=$(tit_$j)
17615 bpr 63
    question_$iii=
18578 bpr 64
    e_$iii=$(e__[$l])
17615 bpr 65
    e_=$(e_$iii)
66
    !reset question testcondition format
67
    thisexo=$e_
68
    !readproc imagedir.proc
69
    !read oef/printanalysis.proc
18578 bpr 70
    !read oef/latex.proc
71
  !next qnum
72
  !reset e__
17615 bpr 73
!next