Wiris CLoze Variable Question

Wiris CLoze Variable Question

by Susan Ware -
Number of replies: 19

Hi

I have a question that I am wanting to use - a wiris cloze question with variables.

I am obviously doing something wrong with the syntax, as I cannot get it to work.

I would love someone to look at it for me and let me know my error - or if there is another question type I should be using for this.

Kind Regards

Sue

Attachment Wiris variable quiz.PNG
Average of ratings: -
In reply to Susan Ware

Re: Wiris CLoze Variable Question

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi Susan,

Have you tried the Moodle core Cloze question?

https://docs.moodle.org/34/en/Embedded_Answers_(Cloze)_question_type

In reply to Dominique Bauer

Re: Wiris CLoze Variable Question

by Susan Ware -
Thank you Dominique, I have but can't get the variables to work, I must be

doing something wrong.



Thanks for your input.



On Sun, 13 May 2018, 13:53 Dominique Bauer (via Moodle.org) <
In reply to Susan Ware

Re: Wiris CLoze Variable Question

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Please could you include the xml file for the Moodle core Cloze question.

In reply to Dominique Bauer

Re: Wiris CLoze Variable Question

by Susan Ware -
HI Dominique


I included the xml file in the first post - and have attached it here again.

Thank you.


In reply to Susan Ware

Re: Wiris CLoze Variable Question

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

It's a Wiris question and I'm not sure if I can read it. What I would need is the non Wiris, Moodle core Cloze question. 

In reply to Dominique Bauer

Re: Wiris CLoze Variable Question

by Susan Ware -

Hi Dominique

I have copied the syntax of the wiris cloze question to a normal cloze question.

The attached file therefore has the wiris cloze and a normal cloze question.  Hopefully you can read both.

Using a variable in a cloze question would be awesome - thank you for assisting.

Regards

Sue

In reply to Susan Ware

Re: Wiris CLoze Variable Question

by Jean-Michel Védrine -

Hello Susan,

I am quite sure that this kind of question is doable with the formulas question type.

I have seen your screenshot but I have trouble understanding the calculations between the variables #O,  #S, #B, #C, #, #E and the answers #1, #2, #3

If you send me a private message with the relations between them, I can try to make a version of this question with the Formulas question type. It has both random and global variables (strings, numbers, list of strings and list of numbers) and answers can be drop down menus, multichoice or field

Formulas question type can be difficult to master at the beginning but it is very powerful.

The only condition to use it is to be able to install plugins on your Moodle website as Formulas and the associated adaptivemultipart behaviour (made by Tim Hunt) are not part of core Moodle. So it depends a lot on how your Moodle website is hosted.

Average of ratings: Useful (1)
In reply to Jean-Michel Védrine

Re: Wiris CLoze Variable Question

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Further to Jean-Michel's suggestion:

https://moodleformulas.org/mod/quiz/view.php?id=2122

Note that there are more than 67 million possible permutations with the parametrization of the given data.


Formulas20180516-0102.png

In reply to Dominique Bauer

Re: Wiris CLoze Variable Question

by Susan Ware -
​Hi Dominique





This is exactly what I wanted any chance of sending thru the xml

​?​



Thank you so much.



​Cheers

Sue​





On Wed, 16 May 2018, 18:05 Dominique Bauer (via Moodle.org) <
In reply to Susan Ware

Re: Wiris CLoze Variable Question

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Susan,

The xml file is attached. The question is of the Formulas type. To make it work, you will have to install the plugin as Jean-Michel explained. 

Would you mind if I put this example on the documentation site https://MoodleFormulas.org (page Other examples)? If so, visitors will be able to try the example, download the xml file and get some explanations.

Average of ratings: Useful (2)
In reply to Dominique Bauer

Re: Wiris CLoze Variable Question

by Susan Ware -

Hi Dominique

I think it would be very helpful to have it posted on the forum.  I use the formula question but could not get the mulutchouce strings to work ~ so pleased I can do it now.


Thank you ~  your help was really appreciated.

Average of ratings: Useful (1)
In reply to Dominique Bauer

Re: Wiris CLoze Variable Question

by Susan Ware -
Hi Dominque


Yes more than happy for the question to be posted in the Moodle formlas.org page - see the attached xml.

The question has variables and drop down lists in a formula question.

Thanks again for all your help with this.


In reply to Susan Ware

Re: Wiris CLoze Variable Question

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi Susan,

Thank you for contributing with your question. I put it on MoodleFormulas.org (https://moodleformulas.org/course/view.php?id=22&section=9#id201805220004).

Do the students have to select DR or CR in the last column?

In reply to Dominique Bauer

Re: Wiris CLoze Variable Question

by Jean-Michel Védrine -

Whaou I think I have done it !

Can you spot the change on this screenshot (this is in fact the unmodified question send by Dominique but the display show something different)

Hint 1 : the change is related to multichoice question

Hint 2 : It's something that was not working and is now fixed

new feature in formulas

I must admit I am quite proud of my work this morning because it's something that had a comment in the code saying "// And it would be very difficult to calculate ..." .

So if I wrote this some years ago when I was fully immersed in the Formulas code and I am now able to do it in 2 hours it means that my coding abilities are still here and I still remember the formulas code quite well.

I must also say that I was pushed to do that seeing the wonderful questions with multichoice parts that users are able to create. Thank you all for making my work useful.

This change will be in the next release fixing the bug of multichoice menu not displayed inline.

Average of ratings: Useful (1)
In reply to Jean-Michel Védrine

Re: Wiris CLoze Variable Question

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Jean-Michel,

All I can see is that the multiple-choice answer boxes are grayed out and the marks are displayed for the first question only.

Could you explain what you did?

In reply to Dominique Bauer

Re: Wiris CLoze Variable Question

by Jean-Michel Védrine -

Hello Dominique,

No the new feature is that the "one possible correct answer is" is working even for part with multichoice answer previously nothing was displayed for part with a multichoice question because the answer in that case is not the real correct response but the index of the correct response in the list of string used.

Correct answer for multichoice

Some years ago when I tried, I didn't manage to correctly compute the real right answer from the index but this morning, looking at how choices are constructed in the question text I realized that a slight variation of this code would return the array of choice in the function that return the correct response, that done it was easy to extract the correct one.

If anybody is interested in the code it is here

https://github.com/jmvedrine/moodle-qtype_formulas/blob/master/question.php#L511

in the new function correct_response_formatted

It is not that long and complicated and I think all these lines are already in other places of the formulas code but before today I didn't had the idea to write it like that.

Average of ratings: Useful (1)
In reply to Jean-Michel Védrine

Re: Wiris CLoze Variable Question

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Jean-Michel,

I'm sorry I did not see this. It could not have been more obvious.

Congratulations, you did another great job.

If anybody is interested in the code... If one day I seriously look at the code, I hope it will be less difficult than it seems.

In reply to Dominique Bauer

Re: Wiris CLoze Variable Question

by Bernat Martinez -

Congratulations, Jean-Michel. 

I never could have imagined this were  possible to  be achieved!!

In reply to Susan Ware

Re: Wiris CLoze Variable Question

by WIRIS team -
Picture of Plugin developers

Hi Susan,


First of all, apologies for the delayed answer.


Regarding the question, what you want to do is perfectly possible with Wiris Quizzes. However, we have detected some minor errors:

1. The Cloze syntax is almost OK. You have written {1:SHORTANSWER:%100%~=\#O#Well done}, but you should write just %100%, instead of %100%~=

2. You are using the assertion 'has unit equivalent to', but you are no writing a quantity. This property works as explained here: http://www.wiris.net/demo/quizzes/assertions.xml#Has%20unit%20equivalent%20to. We recommend you to just unselect this option.

3. We think you have selected a tolerance too big. With your current settings, any answer between 0 and 2*(the correct answer) will be graded as correct. 


We attach the question with the changes.


Best regards