Retake only incorrect questions in subsequent quiz attempts

Re: Retake only incorrect questions in subsequent quiz attempts

by Dominique Bauer -
Number of replies: 11
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hello Divya,

Another moodler had essentially the same question last April ↗. I had written her a little script ↗ which isn't too bad, but it only works if the attempts are made on the same machine.

I think this would make a good plugin but unfortunately no one has time to do it.

Average of ratings: Useful (2)
In reply to Dominique Bauer

Re: Retake only incorrect questions in subsequent quiz attempts

by Marie-Louise Goudeau -
Hi Dominique,

Awesome that you made a script so students only have to retake questions that were answered incorrect. I would like to work with random questions, do you know if the script would also work to not let them do a random questions in a specific category. I tried it with the option build on last attempt (yes), but noticed that they have to redo all questions. I have also tried the option with No as option for build on last attempt, and noticed they indeed have to answer no questions they have answered correctly, but they also are not rewarded later on. I think this may be the case because I am working with random questions. Is there a solution?
In reply to Marie-Louise Goudeau

Re: Retake only incorrect questions in subsequent quiz attempts

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hello Marie-Louise,

The Hide questions answered correctly (builds: Yes) ↗ example quiz consists of four random questions drawn from the same category.

If I understand correctly, you want multiple questions each drawn from different categories, and once a question is answered correctly, no other question from its category is displayed. Is this what you want?

In reply to Dominique Bauer

Re: Retake only incorrect questions in subsequent quiz attempts

by Marie-Louise Goudeau -
Ha Dominique,

Thank you for you quick reply. That is exactly what I want. I only noticed students are not able to achieve a passing grade.
I have the feeling I am missing something here. Hope you can help!
In reply to Marie-Louise Goudeau

Re: Retake only incorrect questions in subsequent quiz attempts

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Hello Marie-Louise,

What version of Moodle are you using?

On second thought, it shouldn't make a difference which categories the questions are drawn from. But I'll check, give me a few days. In the meantime, make sure to follow each step of the method.
In reply to Dominique Bauer

Re: Retake only incorrect questions in subsequent quiz attempts

by Marie-Louise Goudeau -
Hi Dominique,

I am currently working in 3.9.14. I retried to start with everything and now it appears all questions are hidden. Moreover I am missing the following sentence.: 
Correctly answered questions are presently:hidden. (see below).  Would be great if you can tell me where I am going wrong.
  

In reply to Marie-Louise Goudeau

Re: Retake only incorrect questions in subsequent quiz attempts

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hello Marie-Louise,

Here is what I just checked:

  • Method as per https://moodleformulas.org/course/view.php?id=77&section=37 ↗.
  • Four subcategories, each containing four questions.
  • The quiz has four random questions, each drawn from a different subcategory:
    • question 1 is random from subcategory 1
    • question 2 is random from subcategory 2
    • question 3 is random from subcategory 3
    • question 4 is random from subcategory 4

Everything works as expected, except for a small bug that should be easy to fix (on re-attempt, a choice in the second multiple choice question is selected when a choice is selected in the first mc question).


In reply to Dominique Bauer

Re: Retake only incorrect questions in subsequent quiz attempts

by Leo Guo -

Hi Dominique,

I am using Moodle 4.0.4, and the code you provided in this seems not work. Is this code working on Moodle 4.0 ? Also, how can I access your site moodlefomulas.org? A lot of references you referred to I can't access, asking for login. Many thanks smile

In reply to Leo Guo

Re: Retake only incorrect questions in subsequent quiz attempts

by Jonathan Curro -
I am in exactly the same boat I am afraid. We have recently set up a brand new Moodle 4.0.4 after many years supporting our old v2.9, and we were hoping to get our new LMS off the ground with reattempts of only incorrectly answered questions working in our quizzes from the outset.

Unfortunately I've hit a similar wall in that the script doesn't appear to be working when inserted into the HTML of the text of a description question, or when inserted into the site Javascript section (theme_adaptable | jssection). I hope I'm in the right area for the script text to go.


I have taken the script text from the page linked above (this didn't work), and directly from the link contained at the page which points to the original script source here: https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js (which also did not work).

I've also hit an issue trying to access any links to moodleformulas.org, but my issue is that the site never loads at all, and results in the following error:
The connection has timed out
The server at moodleformulas.org is taking too long to respond.

I'm running out of things to try to make this work. Any assistance at all would be greatly appreciated.

Thanks for your time.

Jonathan
In reply to Jonathan Curro

Re: Retake only incorrect questions in subsequent quiz attempts

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hello Leo and Jonathan,

moodleformulas.org has been renamed DynamicCourseware.org

Please replace "moodleformulas.org" with "dynamiccourseware.org" in the URL of previous links.

For example, if the link is

https://moodleformulas.org/course/view.php?id=22&section=23

instead use

https://dynamiccourseware.org/course/view.php?id=22&section=23

I'll check the code for 4.0 later.

Average of ratings: Useful (1)
In reply to Dominique Bauer

Re: Retake only incorrect questions in subsequent quiz attempts

by Jonathan Curro -
Thanks so much Dominique,

Yes, I did discover your important notice to change all instances of moodleformulas to dynamiccourseware and was thus able to test your Moodle 3.10 example site with guest access. That is exactly what we want to achieve, so I've gone ahead and created another Moodle to try your script again from scratch. 

We're starting with v3. 8 however, as this is the highest version that supports the simple certificate plugin that we've made significant use of in previous years. I haven't yet had success with the script placed in either suggested location yet, but it's very early days and possible I've done something wrong. 

I will be trying again tomorrow so will report back with how I go. 

Thanks for all your help. It is very much appreciated. 

Regards 

Jonathan
In reply to Dominique Bauer

Re: Retake only incorrect questions in subsequent quiz attempts

by Leo Guo -

Hi Dominique,

It's been a while, I hope you are doing well. I just wanted to know have you gotten a chance to review the code for Moodle 4.0+? I tested today on 4.0.7 and it seems like the code is still not working. It would be appreciated if you can have a look on the code to make it work on Moodle 4.0+ as this function is very useful for my Moodle site, many thanks.