Toutes mes réponses sur les forums
-
AuteurMessages
-
20 août 2014 à 11:38 en réponse à : Installation sur VPS. Problème apache sur serveur ubuntu 14.04 #2411
jm.evers
Participant::Hi, again…
I know nothing of Debian specifics, but just « google »
Invalid Mutex directory in argument file:${APACHE_LOCK_DIR}
And you will find some possible clues..like:
debian related apache2It looks like you did not define required variables APACHE_LOCK_DIR,
APACHE_PID_FILE and so on.
This is exactly what envvar file is for. You *need* to source it before runing apache.apache2 is a service. On Debian, you need to start services using
service(8) on the command line:
# service apache2 start
This will call /etc/init.d/apache2 that does all the magic.
Alternatively, you could find apache2ctl(8) useful.hope this helps?
joke-
Cette réponse a été modifiée le il y a 10 années et 10 mois par
jm.evers.
jm.evers
Participantjm.evers
Participant::Hi,
I don’t think this is a possible configuration key for ‘chemeq’…however it is always possible to modify the student reply, before handing it to ‘chemeq’ for checking.In wims-phtml use something like (let’s say the student answer is stored in variable $reply1)
reply1=!replace internal = by --> in $reply1
Then call ‘chemeq’ to check $reply1 for validity.
I don’t know how to do this in OEF, but I guess it should more or less be the same…kind regards,
Joke-
Cette réponse a été modifiée le il y a 10 années et 11 mois par
jm.evers.
jm.evers
Participantjm.evers
Participant::The mathml syntax should -ideally- be the same as in latex
Although of course not everything can be implemented: wims_mathml is 1 MB … latex is somewhat larger (…)
The latex syntax is\mathcal{}
: equal to wims_mathml.
So\mathcal A
is sloppy latex : there is norelax
in wims_mathml. If such an error is flagged , due to unsupported syntax, we will switch to image mode for this tex-string. I don’t know why the rest of following correct latex is not presented in mathml ?
The experimental\cal
in mathml is for 1 char onlyyylval=wims_mathml_copy3("&",yytext+5,"scr;")
yytext+5 is just a single char.joke
-
Cette réponse a été modifiée le il y a 11 années par
jm.evers.
jm.evers
Participant::Hi,
For a test I’ve added ‘\cal’ towims_mathm.l
on Leiden wims mirror : use direct exec to test your complaints…
The quick fix code inserted into wims_mathml.l is
"\\cal"\ {1,5}[a-zA-Z]{ yylval=wims_mathml_copy3("&",yytext+5,"scr;"); return MI;}
kind regards,
joke-
Cette réponse a été modifiée le il y a 11 années par
jm.evers.
jm.evers
Participant::I’m not into OEF…but with canvasdraw you can include as many textareas / inputfields (even in mathml) as you like.
They will be embedded in the canvas.
Just use a canvasdraw command like ‘input x,y,size,readonly,value
to place the inputfield on location (x:y)
Canvasdraw command ‘inputstyle some_css_string’ may be used to adjust the inputfield looks.
A javascript function ‘read_canvas()’ will read all inputfields.
Canvasdraw command ‘replyformat int’ may be use to format the output of ‘read_canvas()’ to suit your ‘answertype’
etc etc etcjm.evers
Participant::Hi,
The latest svn version of wims allows creation of html5 canvas images…as you probably know these images are pixel perfect (just like SVG). On zooming / dragging -for example- a new png image is created by the canvas engine of the browser.
All modern browsers support canvas.
The canvasdraw syntax is comparable (but not always compatible) with the wims included flydraw program (used for serverside creation of bitmap images)!exec canvasdraw
size 400,400
xrange -10,10
yrange -10,10
linewidth 2
rect x0,y0,x1,y1,blue
fontfamily italic 16px Ariel
string green,-10,-10,Calculate something
To see modules making use of canvasdraw (as replacement for java applet), see
http://wims.math.leidenuniv.nl/canvaskind regards,
jokejm.evers
Participant::Hi, there are a « few » ways to ‘escape to lisp’ from the maxima commandline.
the simplest, being to_lisp();joke@zondag /home/joke : maxima Maxima 5.31.3 http://maxima.sourceforge.net using Lisp SBCL 1.1.12 Distributed under the GNU Public License. See the file COPYING. Dedicated to the memory of William Schelter. The function bug_report() provides bug reporting information. (%i1) to_lisp(); Type (to-maxima) to restart, ($quit) to quit Maxima. MAXIMA> (open "/etc/passwd") #<SB-SYS:FD-STREAM for "file /etc/passwd" {1005CFC9D3}> MAXIMA> (with-open-file (stream "/etc/passwd")(read-line stream)) "# $FreeBSD: release/10.0.0/etc/master.passwd 256366 2013-10-12 06:08:18Z rpaulo $" NIL
and lisp in turn has full potential of accessing the complete system…
jm.evers
Participant::If there is a risk of incorrect marking in some OEF exercise (in case of NaN wims will return some error ‘bad’), you could change the « \range{min,max} » : the random values for substition in anstype function are chosen in this range…
Furhermore the compare precision \precision{} could be adjusted to suit some specific demands. If the difference between the substituted values e.g abs(student_answer – correct_answer) is smaller than 1/sqrt(precision) the answer is considered to be correct
jokejm.evers
Participant::Ok:the anstype ‘default’ is some sort of ‘switch board’, it may call:
1) if an ‘=’ is present in the correct answer : use anstype/equation
2) if a numerical evaluation is not NaN : use anstype/numeric
3) if there are math variables present : use anstype/function
4) else assume text : use anstype/atextSo you will end up using anstype/function…
This answer type will substitute the variables with some random values and do a numerical comparison…read ~/public_html/scripts/anstype/function
not a single call to maxima 🙂
kind regards,
Jokejm.evers
Participant::To study some examples of OEF modules using a localized ‘anstype’ , see
E1/number/oefnumber.fr/anstype E1/number/oefcalcul1.fr/anstype E1/number/oefcalcul2.fr/anstype E1/geometry/oefsquare.fr/anstype E1/geometry/oefsquare.fr/src/cpp/anstype E4/number/oefcalcul.fr/anstype E6/geometry/OEFprogConstr.fr/anstype E6/geometry/oefsymmetry.fr/anstype E6/geometry/oefsymmetry.nl/anstype E6/number/oefsymmetry.fr/anstype H1/geometry/OEFtriang5.fr/anstype H1/algebra/frac5.fr/anstype H2/geometry/oeffrieze.fr/anstype H2/geometry/oeffrieze.nl/anstype H2/number/oeflceb.fr/anstype H3/number/OEFevalwimsfrac.fr/anstype H3/algebra/oefqcm4.fr/anstype H3/algebra/oefqcm3.fr/anstype H3/arithmetic/oefarith.fr/anstype H4/stat/oefstatistiques.fr/anstype H4/algebra/oefresolalg.fr/anstype H4/analysis/OEFevalwimsgrph.fr/anstype H5/stat/OEFevalwimsstat.fr/anstype H5/geometry/OEFtransform.fr/anstype H6/geometry/OEFsimigeoTS.fr/anstype
succes !
jokejm.evers
Participant::I don’t use OEF , but in any case you should apply the same ‘maxima’ operations on both correct answer and student reply.
So for OEF you should build you own local ‘anstype’. (written in wims-phtml)
For example a single call to maxima :############# test=!exec maxima if trigrat(reply$i) = trigrat(answer$i) then yes else no;\ if float(reply$i) = float(answer$i) then yes else no;\ if some_operation_A(reply$i) = some_operation_A(answer$i) then yes else no;\ ....; if some_operation_Z(reply$i) = some_operation_Z(answer$i) then yes else no; !if yes isin $test score=1 !else score=0 !endif ############
But I guess Bernadette is the one you should consult about these specific OEF things.
jokejm.evers
Participant::Hi,
For the rational number use ‘float’:
if float(7/(10*t)) = float(0.7/t) then Y else N;
Y
float(7/(10*t));
0.7/tFor the other example, things are more complex; I sometimes use
trigrat(2/7 /tan(t/7));
2*cos(t/7)/(7*sin(t/7))
But it’s maybe not installed in all maxima versions? just try it
kind regards,
jokejm.evers
Participantjm.evers
Participantjm.evers
Participant::I’m not sure if I get the essence of « mark » , but since the ‘span’ element has a unique (?) id, you can allways use something like:
function setFocus(ID){document.getElementById(ID).focus();} <a href="#" style="text-decoration:none;" onclick="mark_bg_1(336,'mark_1_336') setFocus('mark_1_336)"><span style="background-color:none;color:#000090;text-decoration:none;" id="mark_1_336">moyen</span></a> But I don't know if this solves your issue...
jm.evers
Participant::Sorry, but something went really wrong in cutting & pasting here…
So forget previous ‘post’ and get the demo.oef at
http://84.83.123.204/demo.oefjm.evers
Participant::Some demo OEF shows it all 🙂
Just copy and paste in createxo on http://wims.math.leidenuniv.nl/wims
Use any browser you like…\statement{
<script type= »text/javascript »>
function read_mathml(){
var p=0;
var reply=new Array();
while(document.getElementById(« mathml »+p)){
reply[p] = document.getElementById(« mathml »+p).value;
p++;
};
alert(« r\statement{
<script type= »text/javascript »>
function read_mathml(){
var p=0;
var reply=new Array();
while(document.getElementById(« mathml »+p)){
reply[p] = document.getElementById(« mathml »+p).value;
p++;
};
alert(« reply = « +reply);
}
</script>\(
\left(
\frac{\sqrt{\input{2}{0}{background-color:red;color:yellow;text-align:center}{?}{0}^{2}}}
{\pi \cdot \input{2}{1}{background-color:red;color:yellow;text-align:center}{?}{0}}
\right)^{ \input{3}{2}{background-color:red;color:yellow;text-align:center}{?}{0}}
= \left(\input{4}{3}{background-color:lightgreen;color:red;text-align:center}{?}{0}\right)^{\frac{1}{\pi}} = \input{6}{4}{background-color:lightgreen;color:red;text-align:center}{?}{0}
)
<hr />
\(
\Huge{\bigggint}^{\input{2}{5}{background-color:red;color:yellow;text-align:center}{?}{0}}_{\input{2}{6}{background-color:red;color:yellow;text-align:center}{?}{0}} f(x) \bf{d}x
)
<hr />
\(
\left(
\begin{array}{ccc}
1 & \input{1}{6}{background-color:orange;color:yellow;text-align:center}{?}{0} & 3 \\
4 & 5 & \input{1}{7}{background-color:blue;color:yellow;text-align:center}{?}{0} \\
\input{1}{8}{background-color:lightgreen;color:blue;text-align:center}{?}{0} & 8 & 9 \\
10 & 11 & \input{1}{9}{background-color:black;color:yellow;text-align:center}{?}{0}
\end{array}
\right)
)<hr />
<input type= »button » onclick= »javascript:read_mathml() » value= »click me »>
}eply = « +reply);
}
</script>\(
\left(
\frac{\sqrt{\input{2}{0}{background-color:red;color:yellow;text-align:center}{?}{0}^{2}}}
{\pi \cdot \input{2}{1}{background-color:red;color:yellow;text-align:center}{?}{0}}
\right)^{ \input{3}{2}{background-color:red;color:yellow;text-align:center}{?}{0}}
= \left(\input{4}{3}{background-color:lightgreen;color:red;text-align:center}{?}{0}\right)^{\frac{1}{\pi}} = \input{6}{4}{background-color:lightgreen;color:red;text-align:center}{?}{0}
)
<hr />
\(
\Huge{\bigggint}^{\input{2}{5}{background-color:red;color:yellow;text-align:center}{?}{0}}_{\input{2}{6}{background-color:red;color:yellow;text-align:center}{?}{0}} f(x) \bf{d}x
)
<hr />
\(
\left(
\begin{array}{ccc}
1 & \input{1}{6}{background-color:orange;color:yellow;text-align:center}{?}{0} & 3 \\
4 & 5 & \input{1}{7}{background-color:blue;color:yellow;text-align:center}{?}{0} \\
\input{1}{8}{background-color:lightgreen;color:blue;text-align:center}{?}{0} & 8 & 9 \\
10 & 11 & \input{1}{9}{background-color:black;color:yellow;text-align:center}{?}{0}
\end{array}
\right)
)<hr />
<input type= »button » onclick= »javascript:read_mathml() » value= »click me »>
}`
jm.evers
Participant::No , I’m afraid this calls for another (new) command, like Bernadette proposed something like \special{mathml ….}
However you work on wims-phtml directly, you can simply use use
\begin{html} <span xmlns="http://www.w3.org/1999/xhtml"> <textarea xmlns="http://www.w3.org/1999/xhtml" id="mathml0" size="5" style="vertical-align:middle;overflow:hidden;resize:none;color:red" >?</textarea> </span> \end{html}
or even better, use
\input{0}{5}{color:red}{?}{0}
which generates the dame code as above
and use some simple javascript function to read the inputfield.
The « \input » may be used anywhere in latex (fractions,matrix etc etc etc)
The \begin{html}\end{html} may include any valid html-thing (images, etc), as long as you tell the system it’s encoding / namespace is xmlns= »http://www.w3.org/1999/xhtml »
joke -
Cette réponse a été modifiée le il y a 10 années et 10 mois par
-
AuteurMessages