Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Public Member Functions | List of all members
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. More...
 
 export_for_template (renderer_base $output)
 Export this data so it can be used as the context for a mustache template. More...
 

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: