Student error and attempts

Student error and attempts

by Caryl Gordon -
Number of replies: 6

Hi!

I have a hot potato quiz with two attempts. One student encountered this error when submitting her quiz for each attempt:

"Can not find data record in database table hotpot_attempts"

I do not see her attempts in the results table, so I cannot delete her attempts so she can retake the quiz. She has successfully taken 2 other hot potato quizzes.

Any suggestions?

Thanks,

Caryl Gordon

 

Average of ratings: -
In reply to Caryl Gordon

Re: Student error and attempts

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Caryl,
I can't think of a way to reset this user via the Moodle user-interface, but maybe you could remove the malformed attempt data if you have access to the Moodle DB using an administration tool such as phpMyAdmin.

  1. get the "course_modules" id for this HotPot activity
    • click on HotPot activity on the course page
    • the URL of the HotPot activity is something like:
      http://myserver.com/mod/hotpot/view.php?id=999
    • the numbers after "id=" are the "course_modules" id
  2. get the "user" id for this user
    • go to the user profile for this user
    • the URL for the user's profile page will be something like:
      http://myserver.com/user/view.php?id=888&course=777
    • the numbers after "id=" are the "user" id
  3. execute the following SQL (using your favorite DB admin tool)
    • DELETE FROM mdl_hotpot_attempts
      WHERE userid=888 
      AND hotpotid IN (SELECT instance FROM mdl_course_modules WHERE id=999)
    • Notes:
      • the above SQL assumes the prefix on your Moodle database is the default "mdl_"
      • change 888 to the actual user id (see step 2 above)
      • change 999 to the actual course_modules id  (see step 1 above)

best regards
Gordon

In reply to Gordon Bateson

Vastus: Re: Student error and attempts

by Tõnis Tartes -
Picture of Core developers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Gordon,

I encountered the same problem today and removing broken or incomplete attempt data by hand is painful.

I made this little hotpot report script - https://github.com/t6nis/moodle-mod_hotpot_report_attempts

Could you please have a look at this?

Basically it adds a new report to hotpot module which shows all attempts(broken, abandoned etc) from all users(teachers,admins) and from there teachers are able to delete the broken attempts.

In reply to Tõnis Tartes

Re: Vastus: Re: Student error and attempts

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Tonis,
thanks for your contribution.

Perhaps the motivation for creating this report unfinished attempts were not appearing on the HotPot reports. I have just made a fix to the main HotPot report renderer class which will now show ALL HotPot attempts, so this may affect the report which you have created. Perhaps you could check how your new report works with the modifications I have made.

best regards
Gordon

In reply to Gordon Bateson

Vastus: Re: Vastus: Re: Student error and attempts

by Tõnis Tartes -
Picture of Core developers Picture of Plugin developers Picture of Testers Picture of Translators

Thank you for your response. 

If the original HotPot report is showing all attempts then, there is no need for this extra report which is basically the same as Overview report with just a minor query modification.

Thank you for fixing the original report and i will remove this report from github.

In reply to Gordon Bateson

Re: Vastus: Re: Student error and attempts

by Mike Algozzine -

Gordon, is your fix included in the most recent version of the HotPot module available in the Moodle plugins directory?

In reply to Mike Algozzine

Re: Vastus: Re: Student error and attempts

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Mike, yes the "fix" you asked about is included in the most recent version of the HotPot module available in the Moodle Plugins directory. regards, Gordon