Can you prevent answers from being randomized in Lessons?

Can you prevent answers from being randomized in Lessons?

by Dave Braet -
Number of replies: 3

I have not found a solution to my problem...

My lesson author would like to have the possible Answers in the multiple-choice-question-pages in her Lessons presented in the same order each time, instead of randomised. 

Quizes have a setting called "Shuffle within Questions", which does things like randomise the order in which the possible Answers in a multiple choice are presented to students.  Switching this to "No" makes the Answers appear in the same order each time. 

Does anyone know how to achieve this effect in Lessons?  How hard is it?

Thanks,

Dave

Average of ratings: -
In reply to Dave Braet

Re: Can you prevent answers from being randomized in Lessons?

by Chris Collman -
Picture of Documentation writers
Hi Dave,
Thought I responded to this earlier. Too many open windows, too few hairs on the head.

No there is not a switch to turn of the random answer factor in a lesson question.

Since it is open source, anything is possible. I would guess you would want to tweak the lesson settings to add a switch so when lesson view.php (or what ever) wants to randomize answers, it sees the variable set to no. Otherwise, if you tweak a lesson php file, it will carry over for your entire site (of course). As to the specifics, that is way over me.

Any chance in getting this particular teacher to put questions in a branch table? They don't sort smile My content providers don't like some of my workarounds either.

Hope this was of some help. Chris
In reply to Chris Collman

Re: Can you prevent answers from being randomized in Lessons?

by Dave Braet -

Thanks for the advice Chris!

What I think I'm going to try and do is use the Flashcards feature of the Lessons. This does allow for random cards (questions) to be chosen from a bank of cards.

Thanks again,

Dave

In reply to Dave Braet

Re: Can you prevent answers from being randomized in Lessons?

by Margaret Richards -
I found a posting from 2005 that addresses this issue. The solution still works... I used the directions (below) to disable shuffling in multiple choice and t/f questions.

Re: Keep order of multichoice answers
by Mark Nielsen - Wednesday, July 27, 2005, 01:18 PM
Group Core DevelopersGroup Moodle Partners As of now, the shuffling of answers is not configurable. As always, I'll provide some instructions on how you can change this in your code just in case you really need this.

go to /mod/lesson/view.php

In view.php go to about line number 624. You will see the following code:

case LESSON_MULTICHOICE :
$i = 0;
shuffle($answers);
foreach ($answers as $answer) {

Change it to this:
case LESSON_MULTICHOICE :
$i = 0;
//shuffle($answers); <-- comment it out
foreach ($answers as $answer) {