Add interactive html5 javascript question type to lessons

Add interactive html5 javascript question type to lessons

by Utz Späth -
Number of replies: 0

As for obvious reason I won't be using flash nor Java (use on  Tablets e.g.) 


In the next few weeks I would like to accomplish the following:


Being able to use self-written interactive tasks (based on Javascript (+CSS+HTML5) like as a simple example: Battery, Wire, Lamp.. have to be connected the right way to make the Lamp shine. -> Task completed. This should - of course - be communicated back to moodle.


It should be usable and evaluateable just like e.g. a multiple choice question in Lesson (and maybe test).


The question is: Where to start? Any recommendation which question-type I could use as a sort of "template"?


So far (i just started this morning) my plan is as following: 


Change one of the not needed old question-types (probably easier than creating a new one, or?).

Make it supply div/canvas and include libraries for image manipulation/animation etc.. 

Then write a Javascript function that communicates back to moodle, when the task has been finished or timed out or whatever.


The actual individual script for each of these tasks could be just written in a textfield.


As I am not yet really into all of this, any feedback is very welcome. What is already possible? Similar Attempts? Limitations? Ideas?

Average of ratings: -