Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-70327

H5P embed preventredirect param not working

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Testing scenario 1: Redirect to login page

      1. Login as an admin.
      2. Create a course.
      3. Add a label activity and use the H5P Atto button to add the h5p attached in this issue named true-false-quiz.h5p and check the Embed button in the H5P options.
      4. Expected result: Confirm you can see the H5P displayed correctly.
      5. Click on the embed option in the H5P displayed.
      6. Copy only the URL which is inside the iframe code.
      7. Logout.
      8. Paste the URL in the browser adding "&preventredirect=false" param to the end of the URL, something like this:

        URL&preventredirect=false
        

        **

      9. Expected result: Confirm you could see the login page.

      Testing scenario 2: Error message

      1. Paste the URL in the browser without adding "&preventredirect=false" param to the end of the URL.
      2. Expected result: Confirm you could see this error message in the browser: 

        Course or activity not accessible. (You are not logged in)

      Show
      Testing scenario 1: Redirect to login page Login as an admin. Create a course. Add a label activity and use the H5P Atto button to add the h5p attached in this issue named true-false-quiz.h5p and check the Embed button in the H5P options. Expected result: Confirm you can see the H5P displayed correctly. Click on the embed option in the H5P displayed. Copy only the URL which is inside the iframe code. Logout. Paste the URL in the browser adding "&preventredirect=false" param to the end of the URL, something like this: URL&preventredirect= false ** Expected result: Confirm you could see the login page. Testing scenario 2: Error message Paste the URL in the browser without adding "&preventredirect=false" param to the end of the URL. Expected result: Confirm you could see this error message in the browser:  Course or activity not accessible. (You are not logged in)
    • Affected Branches:
      MOODLE_310_STABLE
    • Fixed Branches:
      MOODLE_310_STABLE, MOODLE_39_STABLE
    • Pull 3.9 Branch:
    • Pull 3.10 Branch:
      MDL-70327-310
    • Pull 3.11 Branch:
      MDL-70327-311
    • Pull Master Branch:
      MDL-70327-master
    • Sprint:
      Moppies Kanban

      Description

      While testing the app we noticed this stopped working, we don't know when.

      How to reproduce:

      1. In a course as teacher, create a new label.
      2. In the label, add an embedded H5P package using the Atto H5P button and uploading a new file.
      3. Save the changes. Check that the package is correctly displayed in the label.
      4. Copy the iframe link. It should be something like: YOURSITE/h5p/embed.php?url=...
      5. Open a browser where you aren't authenticated in the site, or an incognito window.
      6. Paste the URL from step 4, and add the following parameter at the end: &preventredirect=false.
      7. The page should redirect to login, but instead it displays an error message saying: "Course or activity not accessible."

        Attachments

          Activity

            People

            Assignee:
            cescobedo Carlos Escobedo
            Reporter:
            dpalou Dani Palou
            Peer reviewer:
            Dani Palou
            Integrator:
            Andrew Nicols
            Tester:
            Janelle Barcega
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              18/Jan/21

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 10 minutes
                1h 10m