Toutes mes réponses sur les forums
-
AuteurMessages
-
jm.evers
Participant::thanks , yacas logic seems a good idea ! (never knew…)
I will give it a try and maybe it’s enough for high_school_level freestyle answer checking.
Using some software not available on all platforms can not always be avoided. (like Scilab , M2 to name a few)
jm.evers
Participant::Well, in general I was wondering why we can use all kinds of octave packages and not those from maxima. Sure the load command in maxima is powerful, but if used in a chroot environment, it should be no real problem.
More specific, I’m working on a module about logic…
where I would like to make use package « logic.mac »
checking the freestyle answers from pupils (using or,and,not in the answers)load("logic.mac"); test1:(A and B) or C; test2:(A or C) and (B or C); test3:A and (B or C); logic_equiv(test2, test1 ); logic_equiv(test3, test1 );
And there are probably more interesting /useful packages available in « /usr/local/share/maxima/ »
Joke
-
Cette réponse a été modifiée le il y a 7 années et 8 mois par
jm.evers.
jm.evers
Participant::Well, I do agree there is no easy solution.
I’ve proposed a
feature request for mac. package loading in a chroot environment.Joke
jm.evers
Participantjm.evers
Participant::it was a small joke…
but that’s why you can’t make exercises using perl,python,C,lisp,haskell,ruby etc.etc. in a wims chroot : because they are not installed…however in servers -without the extra security of a chroot- one can try to escape to the « real system » ,when exploiting some « new_and_unknown_to_wims_security_flaw » in the aux. software needed by wims.
jm.evers
Participantjm.evers
Participant::Hi,
Well you could say the first one is a feature, the second one is certainly no bug…
Just try this in normal latex, and you will see that the first one (missing the * operator) is really some service to lazy teachers.
Use texmath on the equations and all your « bugs » are gone
\text{f1 = texmath(-8*x^2+112*x-392)}
Another thing: use the separator « & » when using multicol array\begin{array}{lclr} c1 & c2 & c3 & c4 \\ c11 & c22 & c33 & c44 \\ c111 & c222 & c333 & c444 \end{array}
Joke
jm.evers
Participant::Sorry, my answer was not complete…If you use createxo, you could try this (avoiding the unbalanced brackets error)
\statement{ \( \begin{cases} \begin{array}{lclr} f(x) & = & \sin(x) & (1) \\ h(x) & = & \sin(x) & (2) \\ i(x) & = & \sin(x) & (3) \\ j(x) & = & \sin(x) & (4) \\ k(x) & = & \sin(x) & (5) \end{array} \end{cases} ) }
joke
jm.evers
Participant::in latex mode (math-with-images) the automatic equation numbering is easy…use
\begin{equation} f(x) = x^3 g(x) = x^4 h(x) = x^5 \end{equation}
however in wims mathml this is not -yet- supported…you have to manually add the numbering
So in wims_mathml use something like
\left\{ \begin{array}{lclr} f(x) & = & \sin(x^{2}) & (1) \\ h(x) & = & \sin\left(x^{\frac{1}{2}}\right) & (2) \\ i(x) & = & \sin(2x) & (3) \\ j(x) & = & \sin(3\cdot x) & (4) \\ k(x) & = & \sin(\sqrt{x}) & (5) \end{array} \right.
hope this helps…
Joke-
Cette réponse a été modifiée le il y a 8 années et 2 mois par
jm.evers.
jm.evers
Participant::all userdraw objects (points,arrows,segments…etc) including inputfields | drag&drop | onclick stuff, can be read with the next js-code (see directexec module)
<script type="text/javascript"> //<![CDATA[ "use strict"; <!-- will return all 'userdraw' or 'userinput' data from all canvas javascript includes --> <!-- will return all 'drag&drop' or 'onclick' data from all canvas javascript includes --> function read_canvas(){ if( typeof popup !== 'undefined' ){ var fun = popup['read_canvas'+canvas_scripts[0]]; return fun(); } else { var script_len = canvas_scripts.length;var draw_reply = "";var found_result = false;for(var p = 0 ; p < script_len ; p++){var fun = eval("read_canvas"+canvas_scripts[p]);if( typeof fun === 'function'){var result = fun();if( result && result.length != 0){if(script_len == 1 ){ return result;};found_result = true;draw_reply = draw_reply + "["+p+"]="+ result + "\n";};};};if( found_result ){return draw_reply;}else{return null;} }; }; function read_dragdrop(){ if( typeof popup !== 'undefined' ){ var fun = popup['read_dragdrop'+canvas_scripts[0]]; return fun(); }else{ var script_len = canvas_scripts.length;var dragdrop_reply = "";var found_result = false; for(var p = 0 ; p < script_len ; p++){var fun = eval("read_dragdrop"+canvas_scripts[p]); if(typeof fun === 'function'){var result = fun();if( result && result.length != 0 ){if(script_len == 1 ){ return result;};found_result = true;dragdrop_reply = dragdrop_reply + "["+p+"]=" + result +"\n";};};};if( found_result ){return dragdrop_reply;}else{return null;} }; };
note: as for the real answer checking, the sky is the limit…
Joke-
Cette réponse a été modifiée le il y a 8 années et 2 mois par
jm.evers.
jm.evers
Participant::well, using html5&canvas , in createxo something like
this could be produced
(of course things in createxo are more complex than directly written in ‘wims phtml’)\text{fun=wims(mathmlmath \frac{1}{x^{2}})} \text{math_x = wims(mathmlmath x)} \text{plus_infty = wims(mathmlmath +\infty)} \text{min_infty = wims(mathmlmath -\infty)} \text{f = wims(replace internal " by ' in \fun)} \text{x = wims(replace internal " by ' in \math_x)} \text{infp = wims(replace internal " by ' in \plus_infty)} \text{infm = wims(replace internal " by ' in \min_infty)} \text{src=size 400,200 xrange -5,5 yrange -1,5 linewidth 1 segment -4,3,4,3,red segment -3,4,-3,-4,red segment 3,4,3,-4,red fontfamily Italic 18px Ariel centerstring black,3.5,0 input -1,0,8,1,? mathml -4,3.5,0,0,\x mathml 3.5,3.5,5,0,\x mathml -4,2,0,0,\f mathml 3.5,2,5,0,\f arrow -3,2,-0.5,0.1,8,blue arrow 3,2,0.5,0.1,8,blue mathml-3,3.5,0,0,\infm mathml 2,3.5,5,0,\infp mathml -3,2.3,0,0,\infp mathml 2,2.3,5,0,\infm } \text{img=wims(exec canvasdraw \src )} \statement{ img = \img <input type="button" value="click" onclick='javascript:var fun=eval("read_canvas"+canvas_scripts[0]);alert(fun());' /> }
instead of calling wims_mathml and replace stuff… (needed for createxo), you could use unicode
string color,x,y,\unicode
kind regards,
jokejm.evers
Participant::Hi,
I’m not sure what your problem is, but I guess it’s the \hline…this is not implemented in wims_mathml (item2mml).
see changelog:added extra (non LaTeX) option to \begin{array}{} commmand. now a single "-" will produce on all rows a "\hline" now "-.-.-" will produce a hline under row1,row3,row5 (the MathML code attribute is: rowlines="solid none solid none solid") The options do not adversely interfere with normal latex (for gif) example:
\begin{array}{c|c:|c-.-.-.} 1 & 2 & 3 \\ 1 & 2 & 3 \\ 1 & 2 & 3 \\ 1 & 2 & 3 \\ 1 & 2 & 3 \\ 1 & 2 & 3 \end{array}
Or in your example:
\special{mathmlinput [ \begin{array}{-c|lcccr|} x & -\infty & & 0 & & +\infty \\ & +\infty & & & & +\infty \\ x^2 & & \searrow & & \nearrow & \\ & & &reply1 & & \\ \end{array}],6 reply1,3}
jm.evers
Participant::Hi Paul,
If you use a recent version of wims.cgi
you should have MathmML support via MathJaX on every browser…except Firefox/Gecko browser family or simply all browsers calling themselves: (navigator.userAgent)
« gecko », »khtml », »trident » and have native/built-in MathML support (which is much faster than MathJax, of course…)Of course you must allow javascript to make use of MathJaX (loading of this library is shown at the ‘bottom’ bar of your browsers)
hope this helps?
Jokejm.evers
Participant::Hi,
I’ve tested -a few years ago- an install of wims on openbsd using the jailed http-server.
I did not succeed to get this running properly
(I’ve forgotten the details…)Besides my operating system of choice has always been FreeBSD ,using Apache22|24 and make use of the native chroot system call integrated (as of 2004) in wims.cgi
All ‘dangerous’ programs are in a chroot-directorySo while this is not as secure as a complete *BSD jailed httpd server, it will run out of the box.
However be aware that a few admin-modules within wims use some non posix versions of the programs date|tac|stat and maybe others…so some stuff will not work without tweaking
kinf regards,
joke-
Cette réponse a été modifiée le il y a 8 années et 5 mois par
jm.evers.
jm.evers
Participant::Hi,
when you want to use the latest stable wims version there are -in my opinion- two sensible(*) options:1) install a newer version of linux along with the
« latest » stable software for wims (maxima/pari/octave etc). This would take a few hours2) only install the latest software needed by wims
via a chroot. In that way you can keep your linux installation. This method would take you 50 seconds…But it’s not my call to make 🙂
kind regards,
Joke Evers
(*)
to avoid bugs&flaws in both modules and aux softwarejm.evers
Participant::Hi,
You may want to save yourself a lot of trouble and try using maxima (and the rest) from a chroot system. (only 64bit linux)
http://wims.unice.fr/download/wims/chroot/wims-4.12.chroot64.linux.tar.bz2After install, just run as root
/home/wims/bin/setchroot
Joke
jm.evers
Participant::Hi,
I guess adding extra coordinates to the correct answer should do, something like
\answer{}{[\dessin];arrows,0,0,5,5,0,0,-5,-5,0,0,-2,4}{type=draw}
However I´m not sure if the scoring system will count a ´half´ correct answer…
If you want pupils to use calculated coordinates ( instead of trying to draw very precise…) use commanduserinput_xy
Read the docs from
canvasdraw.html to adjust to your liking.Joke
-
Cette réponse a été modifiée le il y a 9 années par
jm.evers. Raison: typos
jm.evers
Participant::Hi,
Regarding ‘canvasdraw’ :
some documentation on the implemented command syntax may be found in the wims-distribution : ~/src/Misc/canvasdraw/canvasdraw.html)
or here : canvasdraw.htmlnote: the basic syntax for draw primitives are more or less the same as for ‘draw / flydraw’
kind regards,
Joke-
Cette réponse a été modifiée le il y a 9 années par
jm.evers. Raison: typo
-
Cette réponse a été modifiée le il y a 7 années et 8 mois par
-
AuteurMessages