Sorry, but you do not currently have permissions to do that (View the entry page of a HotPot activity).

Re: Sorry, but you do not currently have permissions to do that (View the entry page of a HotPot activity).

by Denise Hoyle -
Number of replies: 5

Gordon's permissions


So sorry to keep posting, just checked your permissions in this course and wanted to share.

In reply to Denise Hoyle

Re: Sorry, but you do not currently have permissions to do that (View the entry page of a HotPot activity).

by Denise Hoyle -
Hello again! I'm still having the same issues - have checked and re-checked all permissions in Moodle admin and server side, they are fine. Here is the error message from the log:

[18-Oct-2021 16:30:07 America/New_York] Default exception handler: Sorry, but you do not currently have permissions to do that (View the entry page of a HotPot activity). Debug:
Error code: nopermissions
* line 870 of /lib/accesslib.php: required_capability_exception thrown
* line 45 of /mod/hotpot/view.php: call to require_capability()

I've uninstalled and reinstalled the plugin. I've re-made and re-imported the quizzes. Any ideas on what to try next would be greatly appreciated!!
In reply to Denise Hoyle

Re: Sorry, but you do not currently have permissions to do that (View the entry page of a HotPot activity).

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

Hi Denise,

I reread your earlier message, and you said that you had enabled Guest access to the course. I think this means that anyone who is not enrolled in the course, can still access the course, but they will be viewing it as a guest.

This applies to the Student user you created, and even the Admin user too. Am I right in thinking that neither of those users is actually "enrolled" in the course?

By default, the guest user cannot view HotPot activies. The workaround is to either (1) enrol the Student and Admin users in the course, or (2) change the HotPot permissions to allow guest users to view and attempt the HotPot activity.

Please let me know which workaround you try, and whether or not the behavior chanegs to what you expect.

Best regards,
Gordon

In reply to Gordon Bateson

Re: Sorry, but you do not currently have permissions to do that (View the entry page of a HotPot activity).

by Denise Hoyle -
Yes - I would like for guests to be able to take this course without enrolling. After months of (weekend warrior) working on this issue I've finally located the problem and have fixed it in the code. There are only two HotPot permissions in the Moodle admin:

mod/hotpot:attempt or
mod/hotpot:addinstance

but line 45 of /mod/hotpot/view.php is this

require_capability('mod/hotpot:view', $PAGE->context);

There is NO permission for "view" so I changed it to:

require_capability('mod/hotpot:attempt', $PAGE->context);

and now all is well! Please let me know if there is a better way to do this as I'm aware that future updates to the plugin could break my "fix". Thank you very much for your time and your response!
In reply to Denise Hoyle

Re: Sorry, but you do not currently have permissions to do that (View the entry page of a HotPot activity).

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

Hi Denise,
I'm afraid the HotPot module is not installed properly on your Moodle site, because there should be 8 capabilities for the HotPot module, including 'mod/hotpot:view' (see screensnip below of Student permissions within the HotPot activity)

Permissions for student within HotPot activity.

Could you tell me the version of the HotPot module you are using, and where you got it from?

Thanks,
Gordon

In reply to Gordon Bateson

Re: Sorry, but you do not currently have permissions to do that (View the entry page of a HotPot activity).

by Denise Hoyle -
Wow - can't imagine how that has happened. I've uninstalled and reinstalled only to get the same results. I've downloaded the plugin from right here https://moodle.org/plugins/mod_hotpot and am running version 2020-06-05 (44) (2020060544). Is there another version somewhere else that I should try?