Répondre à : Bug canvasdraw et/ou drawinput

Accueil Forums Programmation WIMS Programmation d’exercices OEF Bug canvasdraw et/ou drawinput Répondre à : Bug canvasdraw et/ou drawinput

#5894
jm.evers
Participant
Up
0
Down
::

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

  • Cette réponse a été modifiée le il y a 3 années et 5 mois par jm.evers.
  • Cette réponse a été modifiée le il y a 3 années et 5 mois par jm.evers.
  • Cette réponse a été modifiée le il y a 3 années et 5 mois par jm.evers.