This repository has been archived on 2025-01-01. You can view files and clone it, but cannot push or open issues or pull requests.
moodle-local_treestudyplan/templates/cfg_grades.mustache
2024-12-30 22:29:38 +01:00

127 lines
No EOL
4.8 KiB
Text

{{!
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
Template for rendering configuration page for grades and scales.
Classes required for JS:
* float
Data attributes required for JS:
* none
Context variables required for this template:
* none
Example context (json):
{
"scales": [
{
id: 1,
title: "Scale name",
options: [
{
title: "Scale value",
value: 1,
disabled: false,
selected: true
}
]
}
],
"grades": [
{
points: 100,
threshold: 55,
}
],
}
}}
<div class="local_treestudyplan_cfg_grades">
<form method="post">
<input name="action" value="update" type="hidden">
<h2>{{#str}} cfg_grades_desc_head, local_treestudyplan {{/str}}</h2>
<p>{{#str}} cfg_grades_desc, local_treestudyplan {{/str}}</p>
<h2>{{#str}} cfg_grades_scales, local_treestudyplan {{/str}}</h2>
<div class="flexible-wrap"><div class="table-responsive">
<table class="generaltable m-roomtable">
<thead>
<tr>
<th class="header c0" scope="col">{{#str}} scale, core {{/str}}</td>
<th class="header c1 lastcol" scope="col">{{#str}} min_completed, local_treestudyplan {{/str}}</td>
</tr>
</thead>
<tbody>
{{#scales}}
<tr>
<td class="cell c0">{{name}}</td>
<td class="cell c1 lastcol">
<select name="s_{{id}}_min_completed" autocomplete="off">
{{#options}}
<option value="{{value}}"
{{#disabled}} disabled {{/disabled}}
{{#selected}} selected {{/selected}}
>{{title}}</option>
{{/options}}
</select>
</td>
</tr>
{{/scales}}
</tbody>
</table>
</div></div>
<h2>{{#str}} cfg_grades_grades, local_treestudyplan {{/str}}</h2>
<div class="flexible-wrap"><div class="table-responsive">
<table class="generaltable m-roomtable">
<thead>
<tr>
<th class="header c0" scope="col">{{#str}} grade_points, local_treestudyplan {{/str}}</td>
<th class="header c1" scope="col">{{#str}} min_completed, local_treestudyplan {{/str}}</td>
<th class="header c2 lastcol" scope="col">{{#str}} delete, core {{/str}}</td>
</tr>
</thead>
<tbody>
{{#grades}}
<tr>
<td class="cell c0" scope="col">{{points}}</td>
<td class="cell c1" scope="col">
<input class="float"
autocomplete="off"
type="text"
name="g_{{points}}_min_completed"
value="{{threshold}}">
</td>
<td class="cell c2 lastcol" scope="col">
<input name="g_{{points}}_delete" type="checkbox">
</td>
</tr>
{{/grades}}
<tr class="lastrow">
<td class="cell c0" scope="col">
<input name="g_new_gradepoints" value="" type="number" min="0" pattern="/d+" step="1" autocomplete="off">
</td>
<td class="cell c1 lastcol" scope="col">
<input name="g_new_min_completed" value="" type="text" class="float" autocomplete="off">
</td>
</tr>
</tbody>
</table>
</div></div>
<input value="{{#str}} save, core {{/str}}" type="submit" class="btn btn-primary">
</form>
</div>