Graphs for Quizzes

Graphs for Quizzes

by Peter Halverson -
Number of replies: 4

Hello everyone,

I am happy to submit to you a way to include graphs in quizzes that is OK for systems with limited resources.  (It does not use LISP and it does not use gnuplot) 

It will allow you to create randomly variable graphs, if you choose to do so, via the randomization features built into the Calculated and Formulas question types.

Unfortunately, the 100 kB limit prevents me from uploading the new software to this forum.

Instead, you can download it by pointing your browser to this address:

http://halverchemphysics.net/jsxgraph1.zip

Alternatively, the same software is available, unpacked, here:

http://halverchemphysics.net/moodle/jsxgraph1

Please look at the readme.pdf file for details.

Enjoy!!!

---Peter Halverson

PS: thanks to Bernat Martinez for his helpful suggestions.

PPS:  I tested this code with Moodle 2.4, but I think it will work with ANY version of moodle.

Average of ratings: -
In reply to Peter Halverson

Re: Graphs for Quizzes

by Peter Halverson -

I just want to tell anyone interested that I improved the documentation for the previously mentioned jsxgraph1 graphing software, and added a utility to help encode characters into escape code.

The download addresses are still the same.

Peter Halverson

In reply to Peter Halverson

Re: Graphs for Quizzes

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Thanks for making this available.

To integrate this better with Moodle, you could try packaging it up as a filter plug-in (http://docs.moodle.org/dev/Filters). Then the teacher would just have to type something like:

[jsx:x*x:name=parabola:minx=-5:maxy=30]

and the filter would deal with creating the iframe code and the full URL.

In reply to Tim Hunt

Re: Graphs for Quizzes

by Peter Halverson -

Hi everyone,

I posted a You Tube video explaining how to use a Formulas type question to achieve randomly varying graphs.

Tim, the idea of a filter is something that the people at Bayreuth University want to provide.  More to come...

---Halverson

In reply to Peter Halverson

Re: Graphs for Quizzes

by Peter Halverson -

Hi all,

I was just informed by Bernat that for Moodle 1.9 to use the jsxgraph interface with random variables such as in Calculated and Formulas questions, the permissions of certain files in the jsxgraph1 directory have to be changed.  Initially they are 644.  Change them to 755.

This applies to jsxgraphcore.js and jsxgraph.css.  (I don't see any harm in just changing them all to 755.)

---Peter