File: print.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 (72 lines) | stat: -rw-r--r-- 1,599 bytes parent folder | download | duplicates (2)
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
!!! Rg$iii contains the data for questions embeddings of
!!! exercise $iii (one line for each question)
!!! ans_$iii contains the data for the answer
!set prompt_empty=.............

!advance prcnt
!if $prcnt>6 and ($wims_user!=supervisor and $wims_developer!= )
  error=too_many_print
  printing=yes
  !exit
!endif

printmax=40
!reset savedrawcnt print
printing=yes
exo=!listintersect $exo and $exolist
!default exo=$defaultlist
wims_intro_parm=$exo
!default exo=$exolist
exo_cnt=!itemcnt $exo
!!at least 1 exercise of each type
!if $random=0
  exo_=!makelist x for x=1 to $exo_cnt
!else
  exo_=!shuffle $exo_cnt
!endif
qnum1=$[$qnum-$exo_cnt]
!if $qnum1 >= 1
  exo__=!randint 1,$exo_cnt repeat $qnum1
  exo_=$exo_,$exo__
!endif
exo=$(exo[$(exo_)])
exo=!item 1 to $printmax of $exo
n=!itemcnt $exo

!if $n<1
  !exit
!endif

M=0
m_step=1
test_print=0
!if $wims_developer!= or $wims_user=supervisor
  latex_exists=0
  !if $printlatex=yes
    !readproc oef/latex.proc begin
    !readproc oef/latex.proc header
  !endif
!else
  latex_exists=-1
!endif

!for iii=1 to $n
  question_$iii=
  e_=!item $iii of $exo
  name_$iii=$e_
  !if $lang_choice!=$empty
    title_$iii=!defof title_$lang_choice in $(class_header)def/$e_.def
  !else
    title_$iii=!defof title_$lang in $(class_header)def/$e_.def
  !endif
  !if $(title_$iii)=$empty
    title_$iii=!defof title in $(class_header)def/$e_.def
  !endif
  !reset question testcondition format
  thisexo=$e_
  !readproc oef/imagedir.proc
  !readproc oef/printanalysis.proc
!next
!if $latex_exists>=1 and $printlatex=yes
  !readproc oef/latex.proc end
!endif