Looking for a question type that is used for marking the correct text in a paragraph

Looking for a question type that is used for marking the correct text in a paragraph

av Nadav Kavalerchik -
Galle vástádusa: 15
Bilde av Core developers Bilde av Plugin developers Bilde av Testers Bilde av Translators

Hello Moodlers,

I am looking for a question type that could be used for asking the students to mark parts of in a paragraph that teacher previously defined as the correct text that should be marked.

Anyone knows such a question type?

(or have an idea how to hack a known question type to do what is described above)

Nadav

Gjennomsnittlig vurdering: -
Vástádussan geasa: Nadav Kavalerchik

Re: Looking for a question type that is used for marking the correct text in a paragraph

av Tim Hunt -
Bilde av Core developers Bilde av Documentation writers Bilde av Particularly helpful Moodlers Bilde av Peer reviewers Bilde av Plugin developers

When Jayesh was doing a GSoC project he stared work on https://github.com/jayeshanandani/moodle-qtype_highlightwords. I can't remember how far that got, but it is worth a look.

Vástádussan geasa: Tim Hunt

Re: Looking for a question type that is used for marking the correct text in a paragraph

av AL Rachels -
Bilde av Core developers Bilde av Particularly helpful Moodlers Bilde av Plugin developers Bilde av Testers

Unfortunately, it appears that development was never finished. A real shame as I could definitely see a use for this question type.

It installs okay...tried it in Moodle 2.8.10+ and 3.0.2+. In both, when you preview a question and submit an answer, you always get a fatal error: Fatal error: Call to undefined method qtype_highlightwords_question::discard_duplicates().

If you comment out the two lines that check for duplicates, then, whether you answer right or wrong, you always get: Warning: Division by zero.

I haven't experimented with it any further, except to note that the README.txt file is empty and there doesn't appear to be any usage notes anywhere. The en language file did give me the clue that answers are preceded by an asterisk.

Vástádussan geasa: AL Rachels

Re: Looking for a question type that is used for marking the correct text in a paragraph

av Marcus Green -
Bilde av Core developers Bilde av Particularly helpful Moodlers Bilde av Plugin developers Bilde av Testers

It's not exactly what Nadav was asking for but I worked on a similar project around the same time as Jayesh and didn't finish mine either

https://github.com/marcusgreen/moodle-qtype_textselect

A couple of weeks ago I was considering reviving my project so I tried installing Jayesh's code and it is neither finished nor near being finished.

I made a few brief notes last time I looked at it

https://github.com/marcusgreen/moodle-qtype_textselect/wiki

With two people attempting to develop such a question type, and Nadav asking about it there is clearly a requirement for such a question. However to take what has been written into a production question type would not be trivial. 

 Jayesh was doing other things as well at the same time such as the Question Practice module which possibly explains why she did not complete her highlightwords. A good GSOC student should be able to complete such a project over a summer, or as ever a bunch of money paid to the right person (not me).



Vástádussan geasa: Nadav Kavalerchik

Re: Looking for a question type that is used for marking the correct text in a paragraph

av Nadav Kavalerchik -
Bilde av Core developers Bilde av Plugin developers Bilde av Testers Bilde av Translators

To make it a little bit more clear... 

I am looking for something like: https://h5p.org/mark-the-words

Vástádussan geasa: Nadav Kavalerchik

Re: Looking for a question type that is used for marking the correct text in a paragraph

av Marcus Green -
Bilde av Core developers Bilde av Particularly helpful Moodlers Bilde av Plugin developers Bilde av Testers

Nice example, however there is currently no native Moodle question type that has that functionality. I frequently think about developing such a thing but I have a lot of ideas and a limited amount of time/talent.

Vástádussan geasa: Nadav Kavalerchik

Re: Looking for a question type that is used for marking the correct text in a paragraph

av Daniel Thies -
Bilde av Core developers Bilde av Plugin developers Bilde av Testers

This seems easier to me than one might think at first. The logic is essentially the same as multichoice with multiple correct answers. The only real differences is in the rendering of the options. If so, the qtype would only require a new renderer in worst case or  CSS in best.

Vástádussan geasa: Daniel Thies

Re: Looking for a question type that is used for marking the correct text in a paragraph

av Marcus Green -
Bilde av Core developers Bilde av Particularly helpful Moodlers Bilde av Plugin developers Bilde av Testers

I think a better analogy would be any if the gap filling questions, I.E. my gapfill or the OU equivalent. It's very doable but someone needs to have the time to do it. 

Vástádussan geasa: Daniel Thies

Re: Looking for a question type that is used for marking the correct text in a paragraph

av Daniel Thies -
Bilde av Core developers Bilde av Plugin developers Bilde av Testers

The following CSS works for turning multichoice into a select the words qtype. I placed it into custom css in the more theme. You would need to find away make it work in your context if you do not want to change all multichoice on your site.

.que.multichoice .formulation .answer input[type="checkbox"]:checked+label {color: red; background-color: #fdd}
.que.multichoice .formulation .answer input {display: none}
.que.multichoice .formulation .answer div {display: inline; padding: 0}

The web interface for entering the question is not ideal since each word will require a separate entry space, but questions can be easily imported using the GIFT syntax. Make sure shuffle answers and answer numbering are turned off in the question. Editing a question after it is loaded is problematic. This is a difficulty of the question type since each each word has to be treated as a different answer. Changing a few words would likely cause problems once the quiz started anyway.

Vástádussan geasa: Daniel Thies

Re: Looking for a question type that is used for marking the correct text in a paragraph

av Daniel Thies -
Bilde av Core developers Bilde av Plugin developers Bilde av Testers

I made a patch to hack this into the multichoice qtype. With this modification if a multichoice question is created with the numbering type set to 'As line of text', the answer options will appear as a sequence of words which can be selected by clicking. The text to be selected is entered into the answers with each word or other unit as a separate answer. Option shuffle answers should be off and 'Multiple answers allowed' must be set.

Vástádussan geasa: Daniel Thies

Re: Looking for a question type that is used for marking the correct text in a paragraph

av Nadav Kavalerchik -
Bilde av Core developers Bilde av Plugin developers Bilde av Testers Bilde av Translators

Wow! thank you very much for making it work smile
It is a very creative concept to solve this issue. 
I tried it and It works just fine!

Multichoice as Mark-the-words question type

Now that it works, It made me think we should push and improve it even further...

I think we should fork and refactor the following: https://moodle.org/plugins/qtype_oumultiresponse question and patch it with your code, and maybe convert all the "answers" to a single "textarea" and use php explode to split the words into multichoice answers. 
What do you think?

Vástádussan geasa: Nadav Kavalerchik

Re: Looking for a question type that is used for marking the correct text in a paragraph

av Daniel Thies -
Bilde av Core developers Bilde av Plugin developers Bilde av Testers

Using oumultiresponse would be an big usage improvement. You will need more syntax than explode. One has to distinguish the words to be selected/unselected. Also in some teaching situations you may wish to select phrases instead of words so there needs to be a way to escape spaces.

Some other simple improvements to be considered are hiding 'Select one or more' and defaulting shuffle answers to no.

Vástádussan geasa: Daniel Thies

Re: Looking for a question type that is used for marking the correct text in a paragraph

av Daniel Thies -
Bilde av Core developers Bilde av Plugin developers Bilde av Testers

I modified that patch to fit the oumultiresponse. It does not address the editing interface. That needs to be specified first.