A particular question functionality

Re: A particular question functionality

by Ray Morris -
Number of replies: 0

For some reason, that sample makes it more clear to me, even though I thought I was beginning to understand what you were trying to achieve. Looking at it now, it seems to me that it wouldn't be all that hard to make the question work, and work pretty reliably from the students' perspective, but the interface to create such questions might be more difficult. If you're okay with hand editing a template question, that might work.

 

Knowing what you want to achieve, I went back and re-read your initial post to see what you actually asked, to try to actually answer your question.  I didn't see a clear question, so I'm going to assume the question is "how can I achieve this goal?"

A simple, somewhat hackish way would be to have a simple new question type, probably based on short answer, in which Moodle doesn't know anything about the structure of the question.  As far as Moodle knows, the question is just some HTML. That HTML would contain some simple Javascript to manipulate the dropdowns.

For that approach, you'd probably build a working sample of the dropdowns independent of Moodle, that integrate it by having the script set the answer Moodle sees as a concatenation of the answers from each dropdown like this:

publicationanswer-chapteranswer-paragraphanswer

 

Probably better would be to use Cloze and some add some Javascript to hide or disable the drop down menus until they select "publication".

 

It occurs to me that thousands of other people have quizzed on the same thing, where you respondent has to list book, chapter, verse.  The answers are typically something like "Psalms 23:4" or "John 13:34".  Have you looked at the format some of them use?

 

On a side note, the name "Javascript" is intentionally misleading. Java and Javascript are like car and career - completely unrelated.  It's Javascript you'd use here.