mathviewpanel=$module_title:/:+:-:*:^
rounding=0
mathview=0
!readproc $remarkdir/rounding.$taal
image=0
questiontype=7
embed=0
n=$counter
!if $level=0
    R=$counter
!else
    R=$level
!endif
javascript=js/javainput.js
# produceerd een <tr>
XSIZE=650
smallfont=16
largefont=22
# applettext => letterlijke 
math=1
checkfile=$checkdir/simplify.proc
arglist=$empty
formula$n=$empty
letters=x,y,a,b,c,d,f,h,k,m,p,z
letters=!shuffle $letters
x=!item 1 of $letters
y=!item 2 of $letters
z=!item 3 of $letters
getallen=!shuffle 2,3,4,5,6,7,8,9,-1,-2,-3,-4,-5,-6,-7,-8,9
a=!item 1 of $getallen
b=!item 2 of $getallen
c=!item 3 of $getallen
d=!item 4 of $getallen
question$n=!record 8 of lang/remarks.$taal
#@ herleid de volgende macht <br><font size=-1>dus schrijf anders</font>
sometext=!record 29 of lang/remarks.$taal
helptext=<a onmouseover="return escape('<img src=$module_dir/gifs/exo1.jpg>')">$sometext</a>
# var1 is used for checking  "literal typing" of question
!if $R=1
    var1=($x^$a)/($x^$b)
    tot=!exec pari $var1\
    printtex($var1)
    formula=\frac{$x^{$a}}{$x^{$b}}
    answer$n=!line 1 of $tot
    tex=!line 2 of $tot
    texanswer$n=$formula = $tex
    varlist=!varlist $(answer$n)
    wims_rawmath_variables=$varlist
    !if $a<0
	a=($a)
    !endif
    !if $b<0
	b=($b)
    !endif
    applettext=$x^$a/($x^$b)=
    !if $wims_user=supervisor
	exotext=<font color=green>correct answer: $(answer$n)
    !endif
 !exit
!endif

!if $R=2
    var1=($c*$x^$a)/($d*$x^$b) 
    tot=!exec pari $var1\
    printtex($var1)
    formula=\frac{$c\cdot $x^{$a}}{$d\cdot $x^{$b}}
    answer$n=!line 1 of $tot
    tex=!line 2 of $tot
    texanswer$n=$formula = $tex
    varlist=!varlist $(answer$n)
    wims_rawmath_variables=$varlist
    !if $a<0
	a=($a)
    !endif
    !if $b<0
	b=($b)
    !endif
    applettext=$c*$x^$a/($d*$x^$b)=
    !if $wims_user=supervisor
	exotext=<font color=green>correct answer: $(answer$n)
    !endif
 !exit
!endif


!if $R=3
    var1=($c*$x)^$a/$x^$b
    tot=!exec pari $var1\
    printtex($var1)
    formula=\frac{\left($c \cdot $x \right)^{$a}}{$x^{$b}}
    answer$n=!line 1 of $tot
    tex=!line 2 of $tot
    texanswer$n=$formula = $tex
    varlist=!varlist $(answer$n)
    wims_rawmath_variables=$varlist
    applettext=$var1=
    !if $a<0
	a=($a)
    !endif
    !if $b<0
	b=($b)
    !endif
    applettext=($c*$x)^$a/($x^$b)=
    !if $wims_user=supervisor
	exotext=<font color=green>correct answer: $(answer$n)
    !endif
 !exit
!endif

!if $R>3
    var1=($c*$x)^$a/($d*$x)^$b 
    tot=!exec pari ($var1)\
    printtex($var1)
    formula=\frac{\left($c\cdot $x\right)^{$a}}{\left($d\cdot $x\right)^{$b}}
    answer$n=!line 1 of $tot
    tex=!line 2 of $tot
    texanswer$n=$formula = $tex
    varlist=!varlist $(answer$n)
    wims_rawmath_variables=$varlist
    !if $a<0
	a=($a)
    !endif
    !if $b<0
	b=($b)
    !endif
    applettext=($c*$x)^$a/(($d*$x)^$b)=
    !if $wims_user=supervisor
	exotext=<font color=green>correct answer: $(answer$n)
    !endif
 !exit
!endif

