Formulas Question - Multiple Answers with a column of Radio Buttons

Formulas Question - Multiple Answers with a column of Radio Buttons

by Daniel Gandolfo -
Number of replies: 0

(this question is also asked on the francophone forum : https://moodle.org/mod/forum/discuss.php?d=419075 )

Hello,

I have limited experience with Moodle Formula Questions which I find really interesting for their flexibility.

I would like to get help/advice on how to create a question with check mark buttons (radio) for the answer, but with only one radio button per answer.  I have seen the clever example (from Dominique Bauer: https://moodle.org/mod/forum/discuss.php?d=369814) where several columns of radio buttons are created to answer several questions, but I would like to build the same type of question with only one column of radio buttons.

Technical background
    Moodle version: 3.8.7
    Moodle theme used: Thematic
    Web browser: Firefox 86.0
    Mac OSX Catalina 10.15.7

Current attempt
The following images summarize the situation I have reached (texts are in French but should not pose problems) :

  1. the question as it appears :          

  2. the (correct) answers checked :   

  3. the result after evaluation :          


Behaviour observed and suggestions hoped for.

So clearly, the code allows to recognize the correct answers with only one column of radio buttons.

Now, what I can't do :

– Although all 4 answers are correct (2 are right, 2 are wrong), the system indicates a Score of 2 out of 4 (it should be 4 out of 4 here) and if I check 1 right answer only, it gives me a Score of 1 out of 4 (it should indicate a Score of 3 out of 4). I don't know how to adjust this...
– Format the display of the questions. In my code, I have inserted the questions in a table, but I find the spacing between the questions too large and irregular. Don't know how to change this...

The (very simple) xml code of my example is added below:

https://moodle.org/pluginfile.php/134/mod_forum/post/1688872/quiz-test%20plusieurs%20boutons%20radio.xml?time=1614704121095


Suggestions are greatly appreciated.
Have a nice day.

Daniel.


Average of ratings: -