Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)
|
Render a page containing a simple form which reposts to self via JS. More...
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. | |
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.
mod_lti\output\repost_crosssite_page::__construct | ( | string | $url, |
array | $post ) |
Constructor.
string | $url | moodle URL to repost to |
array | $post | the POST params to be re-posted |
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.
renderer_base | $output | The renderer |
stdClass | Data to be used by the template |
Implements templatable.