Documentation addition to invitations

This commit is contained in:
PMKuipers 2024-12-30 20:59:57 +01:00
parent c64b7f765f
commit 21c7bef975
3 changed files with 47 additions and 4 deletions

View file

@ -50,8 +50,6 @@ foreach ($mappings as $cfg) {
}
}
print $OUTPUT->header();
$action = optional_param("action","",PARAM_TEXT);
if ($action == "update") {
// First loop through the scales to see which need to be updated.
@ -193,6 +191,8 @@ foreach ($scales as $scale) {
$data[] = $row;
}
print $OUTPUT->header();
print html_writer::start_tag("form", ["method" => "post"]);
print html_writer::tag("input", null, ['name' => "action", 'value' => 'update', 'type' => 'hidden']);

View file

@ -0,0 +1,38 @@
{{!
This file is part of Moodle - https://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template local_treestudyplan/cfg_grades
D
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* none
Example context (json):
{
"invites": array_values($DB->get_records('local_treestudyplan_invit', ['user_id' => $USER->id]));
"hasinvites": true,
}
}}
<div class="local_treestudyplan_cfg_grades">
</div>

View file

@ -19,10 +19,15 @@
Template for rendering the invitations page
Classes required for JS:
* none
* m-action-resend
* m-action-confirm
* m-action-delete
* m-action-view
Data attributes required for JS:
* none
* data-confirmtext
* data-confirmbtn
* data-actionhref
Context variables required for this template:
* none