Quiz

Formulas question type

 
 
Picture of mana mboh
Re: Formulas question type - problem found
 

Hi  Jean-Michel,

Just to say that I still following developments even if I don't appear to be here.

Well done for the work developing the latest Formulas plugin. 

I have managed to install it on a clean moodle 2.4.1 setup but cannot manage to get it to install on plugin-laden oft-upgraded setups...

Mana

 
Average of ratings: -
Picture of Jean-Michel Védrine
Re: Formulas question type - problem found
Group DevelopersGroup Particularly helpful Moodlers

Hello mana,

It's good to see you are still following this thread smile

As I said I found you idea to use asciimathml and asciisvg with formulas questions excellent and I never had this idea before seeing your post some time ago.

And now that global (and local variables too for part's feedback) can be included in general feedback, combined feedback and hints I use it quite a lot because it permit me to show the solution to the students with the values they get for the question, including in math formulas and in graphics. Very cool !

Some important note to users of formulas 2.0 for Moodle 1.9, formulas 3.0 for Moodle 2.0, and the beta version I released for Moodle 2.3/2.4.

If you go to my github account, you will see that there are now different branchs. This is because after finding bugs in backup/restore of 2.0 and 3.0 versions of formulas, I decided to fix them. Be sure to download the right version or you will be in big trouble !

branch MOODLE_19_STABLE -> formulas 2.x for Moodle 1.9.x

branch MOODLE_20_STABLE -> formulas 3.x for Moodle 2.0.x

branch master -> formulas 4.x for Moodle 2.3/2.4

The other branchs are not in a stable state and should not be used.

One branch is not done yet and is important : the branch for Moodle 2.2.x

It is important because this is the step that will permit people to upgrade from older branchs

For people using Moodle 1.9, the steps will be

Moodle 1.9 -> Moodle 2.2 -> Moodle 2.3 or 2.4

For people using Moodle 2.0 the steps will be

Moodle 2.0 -> Moodle 2.2 -> Moodle 2.3/2.4

But as long as the branch for Moodle 2.2 is not done, don't attempt to upgrade because it will not work !!!!

 

 
Average of ratings: -
Picture of mana mboh
Re: Formulas question type - problem found
 

Hi Jean-Michel,

You may recallmy issues installing "formulas" on my establised.

I finally decided it is worth starting over with a new installation to include "formulas" and then plugin other modules.  I think its worth exporting other questions (though not formulas yet!) from my old server.

As a maths teacher you will understand when I say I think you are working on possibly the should-be core maths question type - respect to Hon Wai who first created it.

I read from your post that you are using drawing scripts such as asciisvg? I would be interested to know which you are using and how they are set up as I have not been able to use them in any moodle ≥ 2.0.

As a work-around I investigated how to place text on an image(jpg,png...) using div tags but fell foul of css styles in themes displacing the text. Also to mention, the tedium of having to iterate trial-and-error to find the right coordinates.

Mana

 

 
Average of ratings: -
Picture of Jean-Michel Védrine
Re: Formulas question type - problem found
Group DevelopersGroup Particularly helpful Moodlers

Hello mana,

Here is the setup I use both on my local test install (Moodle 2.5 dev branch) and on my production server (Moodle 2.4.1).

I know I should not run formulas on my production server, but:

  • I like living dangerously
  • I am prepared to deal with problems when they appear
  • My students help me to find the bugs
  • It was interesting to build new formulas questions about probability (this is the subject of my courses this semester)

For all TeX and Asciimathml stuff I use MathJax. I find mimetex awfull;

But as I also want to use ASCIIsvg, and mathjax is currently not processing it, I can't get rid of the asciimath script.

I also use jsxgraph

So here si what is in my head additionnal HTML:

<script type="text/javascript" src="http://mywebsite/lib/asciimath/AM.js"></script>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/2.0-latest/MathJax.js?config=TeX-MML-AM_HTMLorMML-full"></script>
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/jsxgraph/0.94/jsxgraphcore.js"></script>
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/jsxgraph/0.94/GeonextReader.min.js"></script>
<link rel="stylesheet" type="text/css" href="http://mywebsite/lib/jsxgraph/distrib/jsxgraph.css" media="screen" />
<script type="text/javascript">
var AScgiloc = "http://mywebsite/lib/asciimath/php/svgimg.php";
var ASdloc ="http://mywebsite/lib/asciimath/d.svg";
var dsvglocation = "http://mywebsite/lib/asciimath/";
</script>

With this setup to make asciisvg create a drawing, I insert for instance:

<embed type="image/svg+xml" src="http://mywebsite/lib/asciimath/d.svg" script="
 initPicture(-6,6,-6,6);
 a = [-1,0];
 b = [-3,0.5];
 c = [3,0.5];
 d = [2,-5];
 text(a,&quot;{tc}&quot;,belowright);
 text(b,&quot;{t}&quot;,above);
 text(c,&quot;x&quot;,above);
 text(d,&quot;{u}&quot;,above);
 stroke = &quot;red&quot; ;
 circle([-2,0],3.5);
 stroke = &quot;blue&quot; ;
 rect([-5.8,-5],[5.8,5],null,.5,1);
stroke = &quot;purple&quot; ;
 circle([2,0],3.5);
 " class="ASCIIsvg" height="200" width="200" />

And when {tc}, {c} and {u} have values randomized by formulas I get a little diagram like:

diagram

 
Average of ratings: -
Picture of mana mboh
Re: Formulas question type - problem found
 

Thanks Jean-Michel,

This exactly what I needed to completely upgrade. As it happens I have recently taught venn diagrams and would have loved to add to my question bank then.

I will try to replicate your diagram but for that I will need to disable tinymce's security. My experience is that it does not allow me to save any html including the embed tag for one, and possibly other apparent "open doors".

How did you overcome that?

Mana

 
Average of ratings: -
Picture of Stephen Webb
Re: Formulas question type - problem found
 

Hi Jean-Michel,

Just wanted to let you know that we've been testing the formulas question type on Moodle 2.3.3, and it's wonderful!

Thank you for all your hard work on this: it's opening up lots of possibilities for us.

 
Average of ratings: -
Picture of Bernat Martinez
Formulas question type and graphs
 

Hi Jean-Michel, 
I have tried to include graphs in the formulas question using the chart.apis.google and including random variables {x1},{x2} and it works fine.

This is the code and the result is in the attachment

 <b>A partir de la gráfica escribe la ecuación de la recta</b><br /> <img vspace="0" hspace="0" border="0" title="a" alt="a" src="http://chart.apis.google.com/chart?cht=lc&chd=t:{x1},{x2}&chco=FF0000&chg=10,10&chs=300x300&chxt=x,y,x,y&chxl=0:%7C0%7C2%7C4%7C6%7C8%7C10%7C1:%7C0%7C2%7C4%7C6%7C8%7C10%7C2:%7C%7Cx%7C3:%7C%7Cy<http://chart.apis.google.com/chart?cht=lc&chd=t:%7Bx1%7D,%7Bx2%7D&chco=FF0000&chg=10,10&chs=300x300&chxt=x,y,x,y&chxl=0:%7C0%7C2%7C4%7C6%7C8%7C10%7C1:%7C0%7C2%7C4%7C6%7C8%7C10%7C2:%7C%7Cx%7C3:%7C%7Cy>" /><br />


 
Average of ratings: -