Mahara portfolio as Moodle assignment cannot be previewed

Bug #1859605 reported by Peter Spicer on 2020-01-14
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mahara
Status tracked in 20.04
18.10
Medium
Unassigned
19.04
Medium
Unassigned
19.10
Medium
Unassigned
20.04
Medium
Unassigned

Bug Description

When using the assignsubmission_mahara plugin to connect Moodle assignments to Mahara, the link to view the portfolio works fine to open Mahara, but the preview iframe in Moodle doesn't.

This is because MNET auth doesn't set up the session in the same way as LTI does with the CSP being set to allow such things. Fixing this is mostly a matter of copying the setup code into the MNET landing page:

    $parts = parse_url($remotewwwroot);
    $cspurl = $parts['scheme'] . '://' . $parts['host'];
    $SESSION->set('csp-ancestor-exemption', $cspurl);

I am mindful that LTI is considered the future direction of Mahara, but we have customers who use MNET and can't move to LTI because it does not meet their needs at this time, and this improves the workflow a tiny bit for them without a significant overhaul of anything.

Happy to submit as a formal patch for all currently supported versions of Mahara if that would help.

Mahara Bot (dev-mahara) wrote :

Patch for "19.10_STABLE" branch: https://reviews.mahara.org/10714

Mahara Bot (dev-mahara) wrote :

Patch for "19.04_STABLE" branch: https://reviews.mahara.org/10715

Mahara Bot (dev-mahara) wrote :

Patch for "18.10_STABLE" branch: https://reviews.mahara.org/10716

Peter Spicer (peter.spicer) wrote :

On reflection, I've just pushed the changes for review as-is for 18.10, 19.04, 19.10 and master.

Changed in mahara:
status: New → In Progress
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers