"Fill a form" question type ?

"Fill a form" question type ?

by Yann Chachkoff -
Number of replies: 13

Hello,

I'm developing a course for people working as safety officers in a railway company. In many situations, they have to properly fill standard paper forms. Here is an example of the kind of document:

Sample form

To fill such a form, one has to add a cross mark in the white square besides each required topic number; some topics may also require filling a field with a short text (like the time of the day, the location of the train, and so on). I'd like to create questions in which the student would be given a situation and be asked to properly fill the form according to the case at hand.

Is there a way to directly add checkboxes and textboxes at the proper places of the form to fill ? Or am I better just showing the picture of the form and list answers under it (I guess Cloze would be the proper type for such a question) ?

I'm uising Moodle version 3.11.

Average of ratings: -
In reply to Yann Chachkoff

Re: "Fill a form" question type ?

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

You can replicate the form and insert checkboxes and input fields into it. The core Cloze question is multi-part and would work well. The Formulas question, a third-party plugin, is also multi-part and would be better suited if you want to have random data.

With a little work, you will be able to reproduce the form fairly faithfully. To make the form user-friendly and function as a form, you need some extra work to create custom checkboxes and input fields.

This is what the form might look like. It is still a draft, but it already has most of the key features required::

ForumQuiz_20210716_0132.png

You can try it out at https://moodleformulas.org/course/view.php?id=89&section=18 ↗.

If you would like help with this form, please contact me by email.


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

Re: "Fill a form" question type ?

by Yann Chachkoff -
Thanks for your answer. I'm glad to know it is possible to craft something like that, that's exactly what's needed, I think.

Could you explain the way you handle the checkboxes ? Does it involve custom JS code ?
In reply to Dominique Bauer

Re: "Fill a form" question type ?

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Hi Dominique, how do you do that automatically login as student thing on your web site?
Average of ratings: Useful (1)
In reply to Marcus Green

Re: "Fill a form" question type ?

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Dominique, how do you do that automatically login as student thing on your web site?

I have the same question!

Average of ratings: Useful (1)
In reply to Joseph Rézeau

Re: "Fill a form" question type ?

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Hello Marcus and Joseph,

Here is what I posted last year:

https://moodle.org/mod/forum/discuss.php?d=407509#p1648379 ↗

Please wait until tomorrow, I need to see if I have a newer version and if I have included all the necessary explanations.

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

Re: "Fill a form" question type ?

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

Yes, it involves custom JS code. If you want this form to be a quiz question, many features of it will not be off-the-shelf. An HTML table with unequal column widths is not standard. Persistent checkboxes and empty input boxes are a bit tricky, especially if you are not familiar with JavaScript.

I believe you will get there with a little help. I have already spent a whole day preparing what I presented to you. Now I can't go any further because I don't know what exactly you need.

It seems to me that you should clarify this last question, namely what exactly you want to get, i.e. not only what are the right and wrong answers, but also how they should be marked, with all the details since the question should reflect them.

You should also convince the authorized person that you may need some assistance if you want this form as a realistic and user-friendly quiz question. Such a question will contribute to the excellent training of the employees, for the benefit of the company and the safety of the users.
In reply to Dominique Bauer

Re: "Fill a form" question type ?

by Yann Chachkoff -
Hello,

Understood about JS - that's what I guessed from inspection of the sample form.

To clarify my original question a bit: I was not really asking for someone to develop the whole forms - that's actually part of my job smile I was merely asking about the "how" - in particular custom checkboxes as answers. My initial guess had been that Cloze didn't allow those and that custom code was required (either some JS manipulation or writing a new question type to handle such a use-case).

We do not plan to hire an external developer to work on this at this time.
In reply to Yann Chachkoff

Re: "Fill a form" question type ?

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

The style and JavaScript for a checkbox are probably very simple:

  • Size the width and height of the Cloze input box you want as a checkbox.
  • Prevent keystrokes using "onkeydown".
  • Toggle insert/remove an "X" on mouse "click".

I'll try to prepare an example tonight.

In reply to Dominique Bauer

Re: "Fill a form" question type ?

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
There are a few small twists in the code, but basically it's like I mentioned in my previous post.




The question file is attached.
Average of ratings: Useful (1)
In reply to Dominique Bauer

Re: "Fill a form" question type ?

by Yann Chachkoff -
Thanks, this is a good example that, I think, will help a lot of people (myself included). I see many cases where something like that can lead to nicer-looking questions and quizzes.
In reply to Yann Chachkoff

Re: "Fill a form" question type ?

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
There are a few other small issues with a form like yours, such as how to grade empty answer boxes. Stay in touch here, I will mention them by the end of the week with the solutions that I propose.
In reply to Dominique Bauer

Re: "Fill a form" question type ?

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Here is your form, fully functional. You will still need to insert the correct and incorrect answers, and make adjustments as needed. Hope you find it useful, at least as an example.

You can try the question at https://moodleformulas.org/course/view.php?id=89&section=18 ↗The question file is attached below.



Average of ratings: Useful (3)