Picture of Sam Tsiu
_canShowModelAnswer setting in mcq not functioning properly in Assessment
by Sam Tsiu - Friday, 18 December 2015, 8:10 AM
 

I have an assessment with 31 MCQ questions (all yes/no single selection questions). I set `_canShowModelAnswer` to `false` for all the mcq components, but it's not working. The model answer button is active whenever you select the wrong option.

There's this alert message in chrome development console:

Assessment: Not enough unique questions to create a fresh assessment, using last selection.

When I move one of the mcq components outside this Assessment article, it works as expected, not showing the model answer.

If I move another mcq component which is correct (not showing model answer) into this assessment article, it has the same problem, the `_canShowModelAnswer` to false is not working.

It seems something is wrong with the assessment settings but I couldn't figure out what.

I'm building with the latest Framework on Mac with Chrome using rub.

Thanks for your help.

Picture of Matt Leathes
Re: _canShowModelAnswer setting in mcq not functioning properly in Assessment
by Matt Leathes - Friday, 18 December 2015, 10:20 AM
 

Hi Sam

The assessment has its own _showModelAnswer setting (on the article).

Unfortunately it looks as though if you leave this out, it forces _showModelAnswer on all the question components to true when it should - IMO - leave the value set on the question components.

So long as you want all your assessment question components to behave the same way you can fix this by adding the _showModelAnswer property to the assessment article (check the example.json to see exactly where it goes)

Picture of Sam Tsiu
Re: _canShowModelAnswer setting in mcq not functioning properly in Assessment
by Sam Tsiu - Friday, 18 December 2015, 11:40 AM
 

Thanks Matt

adding _showModelAnswer in the assessment article solves the problem. 

Many thanks.

and one more question, should the alert message be a concern? It doesn't seem to affect anything. Shall I just ignore it?

 

Picture of Matt Leathes
Re: _canShowModelAnswer setting in mcq not functioning properly in Assessment
by Matt Leathes - Friday, 18 December 2015, 12:07 PM
 

the console message is just warning you that it's going to have to recycle questions when generating the next random set.

Say you have 15 questions in your assessment in total and you have set it up to display 5 of those, the assessment engine will try to avoid reusing any questions that have previously be shown to the user when selecting the 5 to show - but, at some point, it will run out of unused questions and have to start 'recycling' them.

Picture of Sam Tsiu
Re: _canShowModelAnswer setting in mcq not functioning properly in Assessment
by Sam Tsiu - Friday, 18 December 2015, 12:57 PM
 

Matt,

Thanks for the explanation. 

I have 31 questions in the assessment article and I set the _randomisation _isEnabled to true with the _blockCount to 0 as I wanted it to show all the questions but in different order in each load.

I believe that why it shows that warning message.

When I set the _blockCount to 5 or turn off _randomisation, no more warning messages.

I think I'll just turn off the _randomisation.

 

Picture of Matt Leathes
Re: _canShowModelAnswer setting in mcq not functioning properly in Assessment
by Matt Leathes - Friday, 18 December 2015, 2:28 PM
 

If you want, you're safe to leave it on though. It is just an informative warning and not an error.

Picture of Matt Leathes
Re: _canShowModelAnswer setting in mcq not functioning properly in Assessment
by Matt Leathes - Friday, 18 December 2015, 12:03 PM
 

I've added a fix for this, please +1 it if it works for you

Picture of Sam Tsiu
Re: _canShowModelAnswer setting in mcq not functioning properly in Assessment
by Sam Tsiu - Friday, 18 December 2015, 12:58 PM
 

Yes, added my +1.