Thursday, 15 October 2020

MCQ questions using the formulas question type in MOODLE.

 Formulas questions

This question type is great form setting STEM type multi-part questions in moodle.

They can even take in diagrams with data labels such as created using jsxgraph.


The questions accept a variety of answer types including algebra where.

MCQs

Sometimes multiple-choice questions are the best. However, learners are smart and will, as we want them to, ask each other for answers. Well, we actually want them to discuss how to work it out rather than to find out that the answer is choice A. 

In the core MCQ in MOODLE it is easy to shuffle answers so that the answer is not always the first choice but that creates fixed questions. With Formulas questions, it is possible to create more dynamic and variable questions which justify the effort in creating nonfixed scenarios for the learner... or example see the question below for probability language questions

When created with the formulas question type, the image can have a dynamic image which shows different numbers of each colour and the proportions are calculated separately to determine the correct answer. Sometimes in simplifying the question creation, for instance by creating "unlikely" questions, the question type could fall short by always showing the same order of options and leading to the a pattern where the learner could quickly determine that the answer is "always the first option".

The question is how to avoid the pattern. How to shuffle the answers.

Any suggestions and work-arounds please share.

Where do the jsxgraph images disappear to and how to find them?

Missing jsxgraph images?

In previous posts I have talked about the convenience of using jsxgraph code to create diagrams in questions in moodle.
I use this on my suremaths.com website where I can set up data in the diagram to vary each time the question is used in a quiz.  For instance I could insert two varying angles in a triangle diagram and ask for the value of the third angle.
The value of this is that, students who get this in homework cannot just ask their friends what the answer to that question is since they have different answers. The more valuable question they have to ask is how to find the answer and this difference fosters the intended social learning for which MOODLE is designed.

Missing diagrams

Previous experience for me was that while I could set up several questions with diagrams and varying data, the completed quizzes would only display one of the diagrams when reviewed at the end. 
Searches on the web did not lead to a satisfactory answer. The closest idea was to setup id numbers for each DIV, the HTML boxes in which the diagrams are placed on the question pages.  I never managed to implement that, for one thing,  because I would have had to go through all my questions and insert the id numbers.
Crucially the quiz review in moodle uses a single page in the quiz review, displaying all the questions in one continuous page to scroll. The effect of this that all the diagrams occupy the same location on the top left of the page as defined by DIV and that is why all other diagrams disappear leaving only the box in which they were placed. 
At least that is the appearance. In reality they are all at the same location in layers with only the last one showing at the top.

So how do I get the images back?

To get the images back requires splitting the review into one page per question. On the quiz review page scroll to the bottom and choose to display one question per page. The sacrifice is that the review is slightly longer but you do get back all your diagrams and proper review.
I don't have to give up using jsxgraph! It just keeps improving!

Saturday, 23 July 2016

Using jsxgraph to create a triangle in moodle

Below is a the diagram shown in my introductory post.
It also, incidentally, proves that jsxgraph can create diagrams in blogger.
I have left the delimiters on. They are used by moodle to filter the variables through the question type and mathjax so that the display has a maths look.
 In this instance the question type is formulas but this setup will work in calculated question type which has the same ability to pass variables into question text. Again in this instance, that would be OK as a single answer is prompted for.
In a later post I propose to look at the jsxgraph functions and/or modules used in this construction.


Not to scale.

`PQR` is an isosceles triangle, `PQ=PR`.

Friday, 22 July 2016

Why?

After several years of dabbling in Moodle, I have learnt a huge amount and know that there is far more to learn still.

The biggest issue I have come up against has been how to handle Mathematics in E-learning. There are different types of problems depending on whether the aim is to accept Mathematical input or display output. I will be concentrating on output, that is getting the LMS to display questions in a more media-rich way.

Displaying is relatively straightforward when creating questions as there are various filters ranging from latex, asciimathsml to the Mathjax. Some of these nowadays can optimize for the output device. Of course there are others but these are the ones I have used/explored before and of which I have some experience.

I have also explored using dynamic diagrams in questions. This arose because I did not want to create images which would, more often than not, be large and eat up bandwidth. My biggest headache though when using images was that I could not back-up/copy questions retaining the images. This is quite aside from the inadequacy of images which could not be labeled dynamically, meaning that if they were used that on one static question could be created. That meant I would have to replicate images and adjust the image-based labels if I wanted to create more questions of the same type. Come moodle 2, I stumbled on the use of "div" to place labels. At once this meant that I could create one instance of a question but allow the label to vary by introducing a variable label within the question. For instance I could use a sketch of a triangle to find the missing angle by labeling the two others with a range of values, contrasting with the previous case where the given angles were part of the image and so could only contain one set of values and therefore only produce one static question. I could vary the given angle. For instance the range of values 30 degrees to 40 degrees could be displayed with the over the diagram. This was progress but it came with other problems, notably the browser/theme dependencies which meant that if I changed browsers or themes the labels would migrate unacceptably around the page. Of course the inability to copy/backup either of these questions remained and I had to find the optimal coordinates by trial and error.

When I searched I found reference to the same user experiences but not many solutions. Occasionally I did notice some explanations but only found extremely complex work-arounds rather than solutions.

While struggling with these issues encouragement came from the coordinate question type, later renamed formula. This is a very clever question type which allows question parts to be asked so that the different parts can be answered in the same question. This was a departure from single answer questions. Asciimathml filter and code allowed a dynamic java-script-based diagrams to be included in html pages. I could create a script which would draw a triangle by defining the vertices and I could insert text labels in the code to label the vertices and angles including variable values. At once this meant I could copy/backup the questions and not worry about the images. There was not separate image file stored somewhere to be linked to but a chunk of text within the question which would be carried around and interpreted with no need to ensure that the image location was defined the link verified. Provided the user browsed with particular browser they could see my images and not necessarily be able to tell that they were generated by a small piece of code.

Moodle though, moved on and outgrew asciimathml... Next it was jsxgraph up to the plate... Here is an example of a question I produced using formulas question type to randomize the data; and jsxgraph to insert the labels, including varying data on the diagram. No image needs to be stored. No link needs to be verified. Its all a chunk of text...

The next persisting problem is when reviewing completed quizzes. All the "div's" overlap so effectively only one question can be reviewed.

This is my next bit of learning. Before that, or preferably while learning, I am proposing to show some of the questions I have made.