Picture of Martin Sandberg
Assessment
by Martin Sandberg - Thursday, 30 October 2014, 3:26 PM
 

Hi all,

Working on a course that will consist of three pages and a test on a forth page.

Now, it works as it should except I cannot figure out how to let the user try the test a second time.

I have removed all but the "answer" button from the components so the user will not see the correct answers to the question. However if the user goes to the menu and back to the test again he/she will not be able to answer the questions again but will actually be presented with the correct answers to the questions.

 

How do I change this behaviour? Is there a setting to change this on the assessment?

/ Martin

 

 

Picture of Martin Sandberg
Re: Assessment
by Martin Sandberg - Thursday, 30 October 2014, 3:59 PM
 

Found the answer that it is not possible within this thread:

https://community.adaptlearning.org/mod/forum/discuss.php?d=328

So I guess I will have to come up with a way to solve this myself as I need it running in the beginning of next week.

 

Picture of Martin Sandberg
Re: Assessment
by Martin Sandberg - Thursday, 30 October 2014, 6:01 PM
 

OK.... I have come a little bit on the way here but need some help.

I am getting a bit more where I need to go by making changes to:

src\extensions\adapt-contrib-assessment\js\adapt-contrib-assessment-quizArticle.js

Adding this in initialize function sets the assessment back to _isComplete = false on a return visit

---------------------

this.model.set({
'_isComplete': false
});

--------------------

Making changes in the setUpQuiz function makes the questions work on the return visit.

---------------

_.each(this.getQuestionComponents(), function(component) {
// component.set({'_isEnabledOnRevisit': false, '_canShowFeedback': false}, {pluginName: "_assessment"}); // MSA remmed to test
component.set({'_isEnabledOnRevisit': true, '_canShowFeedback': false , '_isComplete': false, '_isSubmitted':false}, {pluginName: "_assessment"});

});

---------------

Setting _isEnabledOnRevisit to true makes the questions work on the return visit. But nothing triggers the assessmentComplete function.

Why is this? What triggers the assessmentComplete function? Which other variables do I need to change here to make it work?

Any help would be much appreciated...

 

 

 

 

 

 

Picture of Himanshu Rajotia
Re: Assessment
by Himanshu Rajotia - Friday, 31 October 2014, 5:36 AM
 

Hi Martin Sandberg,

 

I think you're looking for this:- https://github.com/CrediPointSolutions/adapt-contrib-assessment/blob/develop/js/adapt-contrib-assessment-quizArticle.js#L48

 

As of now the Assessment extension won't allow you to Review/Retry, so I have update the extension for one of my project, you can get that using:- https://github.com/CrediPointSolutions/adapt-contrib-assessment/tree/develop

I have added two buttons Review and Retake, which will appears on closing Assessment completion feedback screen. If user clicks on Retake button then I reset all variables and navigate to same page using Backbone history, which allow me to get the assessmentComplete event.

 

This is only a workaround till the Core team officially resolve this issue:- https://github.com/adaptlearning/adapt-contrib-assessment/issues/10

 

I hope this will be helpful to you!

Thanks

Himanshu Rajotia

Picture of Martin Sandberg
Re: Assessment
by Martin Sandberg - Friday, 31 October 2014, 7:44 AM
 

Hi Himanshu Rajotia 

Thank you very much for that resetModel function. Very helpful indeed....

I implemented that in my assessment code on initialize so that it gets reset every time the user enters the testpage again.

It works but for some reason the second time the user takes the test the feedback does not appear immediately, scrolling down makes it appear though. Have you had the same issue?

Thank you again,

Martin