Posts made by Ray Morris

Can you give some examples of what types of "auto tags" you have in mind, and specifically how they would be used?

 

> Allow multiple tags (max. 5) to a question.

 

I've come to believe that in software delopment, there are three useful numbers:

0

1

as many as you want

 

So we should allow either:

a) zero tags per question (questions can't be tagged)
b) exactly one tag per question (this is the current implementation of categories - a question is always in exactly one category)
c) questions can have many tags 

Is there some logical requirement that five works, and six doesn't?

 

 

 

 

Thank you very much for your comments, Tim.  I was hoping you would reply.

 

I do not think that the way random questions currently work is the right way to implement this,

> so don't copy that model when implemented random selection of questions by tag.

 

Are you planning on re-doing any of that as part of what OU is doing?  If so, we may wish to coordinate efforts, as I may need to start before you finish.

I'd really like to find the simplest way to achieve the goal, which is to a) have questions tat match multiple tags/categories/labels and b) require a question which meets some combination of tags/categories/labels.

 

 

Just as one can currently select a random question from a given category, I'm looking at adding a random question from a given set of tags.  I'd like to ask if that might be useful to others, and for some thoughts on implementation.

 As an example, suppose you had a quiz about Moodle development. One of the questions is "which directory contains question types?"  That question might be tagged with these tags:

Directory/folder structure  Quiz  Extending Moodle  

 

You could then add a random Extending Moodle question and that one might be chosen.  That question would also fill a requirement for a random Directory / Folder structure question. Does that sound useful to anyone?

I see that "random" is a question type in question/type/random/ , so  that suggests that I should be able to create a very similar type called question/type/randombytag/ .  That would be great if it could be done as a question type, like random is, because that would allow the new feature to be self-contained, without affecting any code from mainline. Hacking Quiz core has a number of challenges that make it expensive in terms of time and effort, and new features may not be accepted into mainline.  

On the other hand, within mod/quiz/ I see addrandom.php and addrandomform.php.  Drats!  Before I spend a couple of hours groking the code in both to see how they interact, I figured I'd ask here if someone already familiar with the how that works can say whether or not you'd think it could be done purely as a new qtype.

 

PS - allowing questions to be in multiple categories might be a cleaner way to accomplish the same thing, but that would definitely involve significant changes to the question bank and to Quiz, changes which I'm not currently able to steer to completion and acceptance.

 

Average of ratings: -

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.