Direct URL to Moodle page with H5P content redirects to login page

Would you have any idea why a direct URL link to a H5P activity (column) on Moodle doesn’t work? We want to be able to email users a direct link/post the link on social media etc. This bug seems to occur for all H5P content types on our Moodle site.

If you click on this link it will redirect to the login page (but you shouldn’t need to login to view this page and resource)

http://learninghub.royalblind.org/mod/hvp/view.php?id=630

 You can get to the resource “Guidelines for Blind or Partially Sighted Pupils’ via this page, and following the link:

http://learninghub.royalblind.org/course/index.php?categoryid=12

 Is this a permission problem with the mod/hvp activity module? 

Moodle 3.1

Desktop and Mobile

All browsers

H5P Moodle plugin V1.5

Content type: Column

Thanks! 

Content types: 
thomasmars's picture

Hi,
The reason why the direct link does not work is that the page requires at least guest access. With a direct link you don't have guest access, so you're redirected to the login page. If you click "Log in as guest" here you'll get redirected back to the H5P page.

In the overview/course page you're using a different link "http://learninghub.royalblind.org/course/view.php?id=136", which includes auto-enrollment or auto-login of guests, which is why it works, then redirects you to the H5P page at "http://learninghub.royalblind.org/mod/hvp/view.php?id=630". So if you just use the same link that you're using on that page and send that to the user it should take care of logging them in automatically so they wont have to click the "Log in as guest" button first, if this is what you want.

Hope that helps. Best regards, Thomas

Thanks, Thomas. Yes, this is what our Moodle partner service said too - the H5P activity is not inheriting the guest access properties. Any idea why the activity doesn't inherit these from the course? The moodle resources do, i.e. the Page resource or Book. Is it to do with using the 'single activity format' for course format?

thomasmars's picture

Hi, not sure how your setup of Moodle is, but if you have enabled auto-login of guests like the documentation suggests: https://docs.moodle.org/34/en/Guest_access, then you don't have to go through the login page and click "Log in as guest". If you have not enabled this, then both the Page resource and the H5P activity module must go through the login page in order to get to the content. Could it be that you have any special plugins that bypasses this mechanic, and this is why you're site is acting differently ? I've tested this with a fresh installation of Moodle.