Accueil › Forums › Programmation WIMS › Programmation d’exercices OEF › Bug canvasdraw et/ou drawinput › Répondre à : Bug canvasdraw et/ou drawinput
7 juillet 2020 à 17:20
#5894
Participant
::
In canvasdraw the command input (from docs)
@ input x,y,size,editable,value
@ to set inputfield "readonly", use editable = 0
@ if no preset 'value' is needed...use a 'space' as last item argument
The last argument ‘value’ can not be an empty string…
So if you have source code access to your wims server, you can quick fix this by editing scripts/oef/special/drawinput.phtml
and add:
blah blah
!if $(reply$n_) = $empty
!set reply$n_=?
!endif
!set codeinput=!append line input $[$x_],$[$y_],$(inputsize_tmp[2]),1,$(reply$n_) $ $ to $code
!endif
The \overline is probably eaten by some oef-script
You could try a direct call to canvasdraw...
\text{test=wims(exec canvasdraw
size 200,200
xrange 0,4
yrange 0,4
linewidth 5
input 1,1,1,1,?
latex 2,2,\Huge{\overline{B}})}
\statement{
\test
}
I will see if this can be changed within canvasdraw (e.g. accepting an empty string...)
kind regards
Joke