graph question types

graph question types

by David Willington -
Number of replies: 10
I've been asked to look into turning British GCSE maths papers (taken by 16 year olds) into quizzes. I reckon that we can cover about half the questions, but I can't see how to do questions of the type 'Draw a graph to...', 'draw a pie chart to ...' etc, in other words questions which don't fit into the regular expression / short answer type. My thoughts were that there may be a flash / javascript solution and I've found discussions around this sort of thing but nothing that works. I've not programmed flash, but I have some javascript experience. Can anyone tell me if I'm barking up the wrong tree, if what I'm trying to do is or isn't technically feasible. I've attached one of the questions. Most of it can be done with moodle as it is, but 'Draw the line of best fit' is a problem

Thanks
Attachment graph_question.jpg
Average of ratings: -
In reply to David Willington

Re: graph question types

by John Isner -
Students can use desktop applications to create graphs and other mathematical artifacts. Everybody's current favorite (including mine) seems to be free program GeoGebra.

Suppose you want students to create a graph of some equation. Students create a "worksheet" using the GeoGebra desktop application, then press the save button, creating a ggb file, which they can then upload to Moodle. Typically, you will use an "Upload a single file" Assignment for this.

Added benefit: GeoGebra worksheets can be displayed in Moodle using the GeoGebra filter.

In your example, students were given a set of points and asked to draw a line of best fit. You (the teacher) would plot the points in GeoGebra, save the ggb file, upload it to Moodle, and link to it from an assignment. Students would then download your file, load it into GeoGebra, plot the line, re-save the ggb file and submit it to the assignment.

In the future (Moodle 1.9?) Essay questions will allow attachments, so students will be able to submit GeoGebra worksheets on quizzes.
In reply to John Isner

Re: graph question types

by Daniel Grosso -
Hi,

Has John said, there are several desktop applications to create graphs. There's a solution named Cinderella (www.cinderella.de) where we can create exercises that can be solved directly in the applets (instead of submiting pictures). We can create an exercise, publish it in a applet, upload the applet to moodle and users work directly in the applet. The same applet gives feedback when the goal is reached and can give some tips too. I've been doing that but moodle don't seem to accept very well Cinderella generated applets, it messes with moodle sessions and i don't know why.

Hope it helps.

best regards,

Daniel Grosso
In reply to Daniel Grosso

Re: graph question types

by John Isner -
Cinderella seems to have the same architecture as GeoGebra. There is a Cinderella applet that you (as teacher) can embed in an html page; the applet displays a .cdy file which resides on the server. Users can interact with the applet, but no information about this interaction is transmitted back to Moodle. You can embed the applet in a context such as an Essay question or an Assignment, in which you instruct the student to interact with the applet in a certain way and then report the results to Moodle (for example, describe what they learned).

Regardless of whether we use Cinderella or GeoGebra. we have the following interactions

student <-> applet
student <-> Moodle

but not

applet <-> Moodle

If you want the applet to interact with Moodle, you need to do a LOT of work. You must create an HTML page that embeds the Cinderella applet. Then package HTML page together with the applet in a SCORM package and load the SCORM package into Moodle as a new SCORM/AICC activity. You'll need to write a lot of javascript to (a) interact with the applet through its public interface ("user properties") (b) communicate with Moodle through the SCORM API. And when you're finished, you'll have a SINGLE exercise. Your work may not be very reusable.

For an example of a project that has done these things with physics applets, have a look at the PADS project.


In reply to John Isner

Re: graph question types

by Jeff Forssell -
The PAD suite includes diagrams (as well as vectors (which can be lines) and motion and video analysis) and I have used them for math questions with diagrams and they work very well. The student draws simply in the grid on the page and submits and the submission is compared (with teacher chosen tolerance) to the expected answer(s) and deemed CORRECT or Not, and It can give very detailed corrective feedback if you wish (and want to sweat some in the the construction!). Making PAD questions into a Moodle qType is one thing I would very much like to see/help with/do. PADs work through Java-Script working on the Java applet. Maybe one could steal code from the "Image target" qType. Just getting Correct or not might even be easy. If one could save the query string that would be great. (Constructing a question (building the Java-script that steers the applet), if not just a straight line can be "quite a lot of fun" [=work])

Here's an example I've done. It's in Swedish, but I can translate the problem here:
You are cycling to a swimming pool 6 km away. It takes 13 minutes for the first kilometer which is uphill. Then you get a wind from behind and downhill so the rest only takes 17 minutes.
b) Describe this in a distance(time), s(t), diagram.
Short usage description: click on the point where you wish to start the curve. (You may have to hold the mouse button down a momment before the first pointmarker comes) then continue clicking for new points. When you have the whole graph, click on the Kontrollera arbetet button ...


In reply to John Isner

Re: graph question types

by David Willington -
I've read lots of references to GeoGebra on the forums. I'm looking for a mechanism that will allow this sort of question to be automatically marked, eg a question type for the quiz module, or possible a standalone, gradeable activity. I thought Hot Potatoes might provide this sort of functionality, but after a quick look it doesn't look as though it does.
In reply to David Willington

Re: graph question types

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Essay questions with attachments is this: http://docs.moodle.org/en/Student_projects/New_question_types#File_Response, which is a third-party plugin you can download and install.

The coolest solution would be for someone to make a new Moodle question type that combines this sort of interface with this sort of grading. But don't hold your breath for that.
In reply to Tim Hunt

Re: graph question types

by David Willington -
The coolest solution would be for someone to make a new Moodle question type that combines this sort of interface with this sort of grading. But don't hold your breath for that.

That was the sort of thing I had in mind! Is javascript the route to consider, or would flash be more appropriate? I suspect that the most likely outcome is that it's going to be too big a job for me to take on at the moment, but I'm not giving up just yet. My main question at the moment is, is there an insurmountable technical barrier because of the way the quiz module is built, or is it just a question of getting on with it, and if so, which is likely to be the best route to pursue?
In reply to David Willington

Re: graph question types

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Well, look at the Image Target question type that I linked to. That uses Javascript to cope with positioning the marker on the client side, but the rest of the code is PHP on the server.

The other approach is to make a question type that allows arbitrary Javascript or Flash on the client side, which does all the processing, and then does the minimal amount of work on the server side. That would also be a question type worth having.

This sort of discussion more often happens in the quiz forum: http://moodle.org/mod/forum/view.php?f=121
In reply to Tim Hunt

Re: graph question types

by David Willington -
I've had a look, and also had a play with your new question type template (which was excellent - thanks for making it). I've now got the answer to my original question of 'Is it possible' - thanks for all your help. I'll have to decide what sort of question(s) to have a go at and if I've got time.
In reply to Tim Hunt

Re: graph question types

by Bob Robertson -
Thinking about the OP's example, it shouldn't be too difficult to create an applet that lets the student drag a pair of bullseyes. Draw a line, or a line segment, between the bullseyes; For checking correctness, it should be a fairly simple matter of calculating the each bullseye's distance from the solution line.

A more general, and perhaps more useful solution, would almost have to involve flash. The student's input can be expressed as a large collection of tangent lines, as can the solution. The (difficult!) problem here is to figure out if the student's input can be transformed into the solution. I'm not at all familiar with the literature on this topic, but that's how I would tackle it.

-Bob