File: var.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 (53 lines) | stat: -rw-r--r-- 1,264 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
!set wims_backslash_insmath=yes
#if you change these limits, you have to modify var.def!

sstyle		=!item $style of 1,1,2,2
ask_reason	=!item $style of 1,0,0,1
all_steps	=!item $style of 0,1,0,0
ltype		=!item $sstyle of ol,ul
wims_prefix	=class user tmp
!read scenario/$module_language/names
!read Exindex
exocnt=!itemcnt $exolist
!bound random within 0,1 default 1
!default format=html

!if $cmd=reply and $status!=waiting
  error=double_reply
  !exit
!endif

!if $status=$empty
  !read scenario/exo.init
!endif

nn=!itemcnt $shufflelist
#thisexo=!item ($reply_cnt)%$nn+1 of $shufflelist
thisexo=!item 1 of $shufflelist
!if $nn>1 and $status!=waiting
  wims_module_log=$wims_module_log got $thisexo
!endif

!if $status!=waiting
  !read scenario/var.prep
!endif

!if $cmd=reply and $status=waiting
  !read scenario/var.proc.$sstyle
  !if $done=yes
    !if $sstyle=2
      module_score=$[$scorecnt/$stepcnt]
    !endif
    weight=!item $level of 0.6,1,1.6,3,5
    module_score=$[max(min($module_score,10),0)]
    !if $level=5 and $module_score<10
      module_score=0
    !else
      module_score=$[rint(100*($module_score/10)^$weight)/10]
    !endif
    wims_module_log=score $module_score
    status=
  !endif
!endif

!set wims_title_title=$module_title<br>$title