Having issues viewing H5P activites with Moodle

Hi everyone,

Moodle 3.7 | Latest H5P plugin | Ubuntu | Nginx | PHP 7.2 | MySql

So the issue happens only for students.
When i login as admin and view the activity it's working every time.
When i login as admin, then as a student, there is no error and activity is running fine.
Tried giving a student Admin role within the course, but he still could not see it.

Student has all H5P permissions available.
I deleted .htaccess from moodledata folder as suggested in some other topic.
Tried updating libraries for the activity. (happens also with other activites)

It looks like when there is nothing cached, student cannot see the activity, but admin can see it even when it's not cached.
When student is assigned as a System Role - everything works fine.

 Any help would be greatly appreciated.

 

Failed to load resource: the server responded with a status of 404 (Not Found)

h5p.js?ver=2019081600:372 GET /pluginfile.php/1/mod_hvp/cachedassets/ad7ccb6d15566714d4aeee3bc170d4f1659c89c6.css net::ERR_ABORTED 404 (Not Found)

ad7ccb6d15566714d4aeee3bc170d4f1659c89c6.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)

h5p.js?ver=2019081600:966 Unable to find constructor for: H5P.Column 1.10

 

Nginx error log:

Error code: filenotfound

* line 494 of /lib/setuplib.php: moodle_exception thrown

* line 2074 of /lib/filelib.php: call to print_error()

* line 4953 of /lib/filelib.php: call to send_file_not_found()

* line 44 of /pluginfile.php: call to file_pluginfile()" while reading response header from upstream, client: 108.60.227.9, server: *********, request: "GET /pluginfile.php/1/mod_hvp/cachedassets/5be084929c67d473740256647516c86a403060b8.js HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "********", referrer: "https://*************/mod/hvp/view.php?id=156"

2019/11/02 20:27:40 [error] 6186#6186: *107 FastCGI sent in stderr: "PHP message: Default exception handler: Sorry, the requested file could not be found Debug:

 

Nginx config:  

  location ~ \.php$ {

        fastcgi_split_path_info ^(.+\.php)(/.+)$;

        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

        fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;

        fastcgi_index index.php;

        include fastcgi_params;

    }

 

Alright, i think i found what was the issue...

Student or any other role had Archtypes set in permissions...

I set all Archtypes to None & assigned Student as a default front page role...

 

So far, looks like it's working, i will follow up (leave activities cached out for a day) & let you know the results...

icc's picture

Yes, this can mess up things. Be sure that everyone going to view H5P content has the 'mod/hvp:getcachedassets' permission.