local:tabbedquickform:technique
Table des matières
Tabbed forms: Technical guide
Capabilities
- local/tabbedquickform:canswitchfeatured: users with this capability can switch between the different form modes.
Component limits
Technical note: This component requires JQuery so that filtering and tab activation work correctly. Some Moodle pages may not load JQuery. Integrating the quickTabbedForm into an “upstream” library does not fix this problem.
Solution 1:
Disable the renderer on the page type concerned.
- Note the offending page type
- Go to the global configuration of the “Tabbed forms” local plugin
- Add the page type to the pages excluded from form processing
Solution 2:
Add an instruction
$PAGE->requires->jquery();
to the page concerned, using a “customscripts” technique or an appropriate patch technique.
Solution 3:
Integrate the above instruction into an override of the “core” renderer in the theme in use, in a redefinition of the “header” function.
class theme_mytheme_core_renderer extends core_renderer {
...
public function header() {
global $PAGE;
$PAGE->requires->jquery();
return parent::header();
}
...
}
Solution 4:
In the theme's lib.php file, implement the page pre-initialisation function:
function theme_mytheme_page_init(moodle_page $page) {
$page->requires->jquery();
}
Back to the component summary - Plugins index - Back to catalogue
local/tabbedquickform/technique.txt · Dernière modification : de 127.0.0.1
