Feature Suggestion for category display/'meta question'

Feature Suggestion for category display/'meta question'

by Thomas Hawkins -
Number of replies: 8
I've been working with Moodle for a while now, and this semester it has been opened to more professors to use as well. This has helped me realize a few features that would be nice to have.

Category display/Question sharing:
For some classes, we share questions among many different sections of the course. For this reason, I make the categories shared, so when I add new answers, I don't have to update it 15 times for each section of the course. But, this creates complications for other professors who (teaching different courses) see a series of questions that have no meaning to them. My suggestion is to display the categories, not alphabetically, but rather display local' question categories first, and then have a solid line, and display all the shared questions below.

Another possible (but more complicated suggestion) would be to share questions with certain courses, or within certain groups of courses (Like French or German or whatever). Or alternatively allow professors to choose which shared categories they would like to see.

I believe for simplicity, option 1 is the best to implement. What does everyone else think?


Also, we use randomization a lot in our quizzes because we have 400+ students taking a test over the span of a week. There are reading and listening exercises and we want to be able to chose from a number of activities. However, I cannot introduce randomization between say 1 description (of the text or sound file) and 5 of 10 multiple choice because there is no way to ensure that the correct questions would be choosen from that exercise from the pool. Also, descriptions are not randomized, making it impossible anyway. So what I have been doing is lumping all questions into a Cloze type of exercise and picking one or the other for the test. But I lose the randomization among multiple choice, and it limits my options all around. (if this is difficult to understand, I can try to explain better)

What I suggest is a meta type of question. Basically, I would assign to the meta question, a description and 5 of 10 multiple choice questions. I could then make three of these, and for the quiz, I can pick one of 3 of the meta questions, which would pull in the appropiate description and multiple choice questions.

If there is a way to pull these off with the current Moodle (1.7 is what we are using) then please let me know. Otherwise, if people think they are good ideas, I'll submit them as feature requests.
Average of ratings: -
In reply to Thomas Hawkins

Re: Feature Suggestion for category display/'meta question'

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Of course it should put categories from this course first, before all the published ones. Why did no one think of that before?

I've just implemented it in Moodle 1.8. In the process, I found some very horrible categories-related code that I was able to clean up.

Recorded in the tracker as MDL-8764.


More sophisticated options for sharing questions would be nice, but that is a much bigger job.
In reply to Tim Hunt

Re: Feature Suggestion for category display/'meta question'

by Thomas Hawkins -
Excellent job. smile I'll see if I can merge the changes into our 1.7.

The sharing options would be a much bigger job but I thought I would throw that out there.

Thanks for the quick response.
In reply to Thomas Hawkins

Re: Feature Suggestion for category display/'meta question'

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
The problem is that in 1.7, the list of categories was loaded from the database in about 4 different places. grep the code for 'question_categories' to see where the table is referenced.

In 1.8, I changed it so that there was a single function for getting the list of categories, but that is a big change to merge into 1.7.
In reply to Thomas Hawkins

Re: Feature Suggestion for category display/'meta question'

by Vikram Solia -
hi Thomas!

Regarding 'However, I cannot introduce randomization between say 1 description (of the text or sound file) and 5 of 10 multiple choice because there is no way to ensure that the correct questions would be choosen from that exercise from the pool.'

I have been working on that i.e. lumping some questions into a question block without turning them into a cloze quiz and make these questions accessible for randomisation.

The problems that I encountered were that random questions as implemented now disregard the grade and length of the question i.e. a random question might choose a question with length / grade five one time and replace it for other student or in another attempt with a question with length / grade 1.

What we need is a random question type / or a new functionality which works as under:

if we create a random question with some length / grade, it is able to choose some number of questions which add up to that length / grade. These might contain normal questions as well as these question blocks.

To implement this, I am creating two new questiontypes for this -
(i) sticky questiontype (for a question block allowing one to lump arbitrary questions); and
(ii) random block questiontype which chooses random questions with proper consideration to grade and length of the questions

I am developing on Moodle 1.6.4+
In reply to Vikram Solia

Re: Feature Suggestion for category display/'meta question'

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
That's a good point. Random questions currently assume that all the questions in the category they pick from have the same score. And if they don't they behave as you observe, which is not really useful.

How do you all think it should work?
In reply to Tim Hunt

Re: Feature Suggestion for category display/'meta question'

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
As I recall, questions have a default point value. For random questions I would say that that value should be the value used for how many points that question is worth. However, that leads to the issue of whether the quiz should be based on 50 points or 50 questions.

Another option would be to use the mark value for the random question (default 1) on the quiz and to randomly select from the category one of the questions with a default value equal to that question. Then for example, I could have 3 different 10 part matching questions in a category with a bunch of T/F, multiple choice questions. I could have one random question worth 10 marks and it would select 1 of the 3 matching questions and then for the other questions that are worth 1 mark it would select from the questions with a default mark of 1. In the case where the user requests a 2 mark question and there are none then it would return the error that there are not enough random questions to satisfy the quiz.

I have previously separated out my questions into sub-categories so that my 10 point questions are in one category and my 5 point questions in another, etc. This lets me select the ones that I want and define the point value. So far, this has worked for me but I can see that it is somewhat of a limitation. But if we program around separating the questions by point, it really could get tricky.
In reply to Tim Hunt

Re: Feature Suggestion for category display/'meta question'

by Vikram Solia -
Actually these are two issues:

(i) Inability to allow questions of the already existing type to stick together;

(ii) Inability or random questions to consider grade or choose more than one question at a time.

I will give you some context which will help you understand the issue better.

There exists a question bank which contains the following ten questions with one grade each:
B, C, D, a, e, i, o, u, F, G

However, the questions {a,e,i} and {o,u} actually form part of a question block, that is a quiz should either include all three {a,e,i} or none from this group and similarly both o and u or none of o and u.

Right now, Moodle does not allow this.

Now, suppose a composite questiontype is created which can cause these blocks of questions to stick together.

However, if a quiz is to be created drawing five questions out of these ten, the current random question could end up selecting 5, 6, 7 or 8 questions like this:

[B, C, D, F, G] : 5 questions

[B, C, D, F, o, u] : 6 questions

[B, C, D, F, a, e, i]: 7 questions

[B, C, D, a, e, i, o, u]: 8 questions

and will never choose

[a, e, i, o, u]: 5 questions

This happens randomisation will choose either individual questions or the composite questiontype without regard to the grades. More generally, random question chooses just one question at a time.

To handle the above, we need a random block question type which can choose multiple questions so that the sum of the grades of the questions stays constant.

Hope I have not confused you.

In reply to Vikram Solia

Re: Feature Suggestion for category display/'meta question'

by Vikram Solia -
In fact, my analysis is driving me towards a solution in which randomisation is achieved not as a plug-in questiontype but through core functionality.

Similarly, for keeping a block of questions stick together, I suggest making changes in the core, changing the attempt->layout field by simple string replacement.

I also presume that random questions, as a plug-in, hinder proper question analysis though haven't actually looked up that aspect.

Hoping you don't dismiss me as retrograde. shy