moodle-mod_hvp
moodle-mod_hvp copied to clipboard
Error loading libraries for non-teachers
Hi there, I have a customer who uses H5P in Moodle 3.8.2. Having the role "Manager" in a course he is able to create new H5P activities and to set everything up. However, after saving: when he tries to edit the activity again he gets the error: unable to load libraries in the H5P section of the editing page. the rest of the course editing page works as expected. Adding the teacher role to his user account in the affected courses solves this issue. Looking at the role definition the manager has even more rights in the H5P section like the teacher. Have the impression there is a bug somewhere in the role definition of the activity.
Please enable php error logging/debugging for Moodle to see if you're getting any errors: https://h5p.org/documentation/troubleshooting-php#php-error-log-header
Error message stays the same: no additional debugging information:
can you check the response from the 'content-type-cache' or 'libraries' request in the network tab in the developer tools/console of your browser ?
The console says:
[Error] Failed to load resource: the server responded with a status of 403 (Forbidden) (ajax.php, line 0)
http://
In the network tab it says: ajax.php: { "success": false, "message": "You do not have permission to view the content types." }
Summary URL: http://academy.kumonkea.com/mod/hvp/ajax.php?contextId=177&token=c70a9b8fae4fb&action=content-type-cache Status: 403 Forbidden Source: Network Address: 85.214.189.226:80 Initiator: jquery.js:4:17824
Request
GET /mod/hvp/ajax.php HTTP/1.1
Cookie: MOODLEID1_=%259D%25DA55%25FD%2526G; MoodleSession=jchd35ff521k6j5aubflt62e1a
Accept: /
Host:
Response HTTP/1.1 403 Forbidden Transfer-Encoding: Identity Content-Type: application/json; charset=utf-8 Pragma: no-cache Cache-Control: no-cache Date: Fri, 15 May 2020 15:24:54 GMT Keep-Alive: timeout=5, max=95 Expires: Thu, 19 Nov 1981 08:52:00 GMT Connection: Keep-Alive X-Powered-By: PHP/7.3.17, PleskLin Server: Apache
Query String Parameters contextId: 177 token: c70a9b8fae4fb action: content-type-cache
Is this sufficient?
Yes, it appears the user does not have enough privileges for the action they're performing. Make sure the user has the mod/hvp:addinstance
capability if this is within the context of a course or the mod/hvp:manage
capability if outside a course context.
Hi, I have the same problem: with the admin account, the libraries are loaded, with the user account, they are not. However, the capabilities are set correctly. Any more ideas? Thank you!
Hi there, are there any updates on this? We are now a couple of years later and I still have this issue ...