I have an activity plugin that works just fine as long as nothing extraordinary is attempted. At the top of one of the pages that get visited I have:
<?php require_once("mod_mediasite_site_form.php"); $siteid = required_param('site', PARAM_INT); // site $context = context_system::instance(); require_login();
. . . . . .
I control going to this page but for one thing this page has a form that inherits from moodleform and as such has a cancel button. If I click on that button the page gets revisted without the required argument even though I explicitly try to catch the cancellation:
if ($mform->is_cancelled()) { // Go home redirect("Configuration.php"); }
So as can be seen I want the redirection to 'Configuration.php' and not a postback to the current page (edit.php). Can this be done? What am I missing with Moodle forms?
Thank you.