Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
mod_lti\output\repost_crosssite_page Class Reference

Render a page containing a simple form which reposts to self via JS. More...

Inheritance diagram for mod_lti\output\repost_crosssite_page:
renderable templatable

Public Member Functions

 __construct (string $url, array $post)
 Constructor.
 
 export_for_template (renderer_base $output)
 Export this data so it can be used as the context for a mustache template.
 

Protected Attributes

array $params
 POST params.
 
string string $url
 URL to repost to.
 

Detailed Description

Render a page containing a simple form which reposts to self via JS.

The purpose of this form is to resend a cross-site request to self, which allows the browsers to include the Moodle session cookie alongside the original POST data, allowing LTI flows to function despite browsers blocking cross-site cookies.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

mod_lti\output\repost_crosssite_page::__construct ( string $url,
array $post )

Constructor.

Parameters
string$urlmoodle URL to repost to
array$postthe POST params to be re-posted

Member Function Documentation

◆ export_for_template()

mod_lti\output\repost_crosssite_page::export_for_template ( renderer_base $output)

Export this data so it can be used as the context for a mustache template.

Parameters
renderer_base$outputThe renderer
Return values
stdClassData to be used by the template

Implements templatable.


The documentation for this class was generated from the following file: