(local)plugin who determines next question based on CUSTOM RULES?

(local)plugin who determines next question based on CUSTOM RULES?

by Michel Schilder -
Number of replies: 7

Is it possible to create a (local) plugin that determines the next question in a test, based on custom rules?

Those rules are like 'after wrong answer in question from category 1,  loads a next question from that category, with a label 'controle question' and other rules we want to define in the plugin.

Who can send me in the right direction?  (I'm working with PHP for more then 10years, but plugin/moodle development is new to me)

Thanks in advance!

Average of ratings: -
In reply to Michel Schilder

Re: (local)plugin who determines next question based on CUSTOM RULES?

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi Michel,

So far as I know, what you want is not currently possible with a quiz, but can be done with a Lesson activity. In a lesson, each answer can be set take you to another specific page tailored to the selected answer.

Average of ratings: Useful (1)
In reply to Michel Schilder

Re: (local)plugin who determines next question based on CUSTOM RULES?

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
In reply to Marcus Green

Re: (local)plugin who determines next question based on CUSTOM RULES?

by Michel Schilder -

I found that plugin before, but was asking myself if there where other ways to go. 

The combination of this plugin and the documentation 'Using_the_question_engine_from_module' is opening some doors.

I think it's best to re-use most of the code of this plugin because my needs are simulair, which of course also saves me a lot of time. 

Thanks!

In reply to Michel Schilder

Re: (local)plugin who determines next question based on CUSTOM RULES?

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

You might also look at the Simple Lesson Module from Richard Jones

https://www.elearningworld.org/author/rjones/

That doesn't implement question based branching at the moment but the author seems to have been thinking about it because there is a branch that refers to question branching.

https://github.com/richardjonesnz/moodle_mod_simplelesson/tree/question_branching

For me one of the issues with this is to make the selection of the next question and the interface to setting it up easy enough for normal people to understand. The problem is that if you have the knowledge to build something like this and are reading this thread then you are probably not in my definition of normal (grins)


In reply to Marcus Green

Re: (local)plugin who determines next question based on CUSTOM RULES?

by Michel Schilder -

I will definately take a look at that!
Seems also promising to me, and perhaps another great starting point.


Thanks!

In reply to Michel Schilder

Re: (local)plugin who determines next question based on CUSTOM RULES?

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

I have been meaning to ask Richard about his thoughts on branching, heloooooo Richard!