2024-12-30 20:59:57 +01:00
|
|
|
{{!
|
|
|
|
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
|
|
|
|
|
2024-12-30 22:29:38 +01:00
|
|
|
Template for rendering configuration page for grades and scales.
|
|
|
|
|
2024-12-30 20:59:57 +01:00
|
|
|
Classes required for JS:
|
2024-12-30 22:17:45 +01:00
|
|
|
* float
|
2024-12-30 20:59:57 +01:00
|
|
|
|
|
|
|
Data attributes required for JS:
|
|
|
|
* none
|
|
|
|
|
|
|
|
Context variables required for this template:
|
|
|
|
* none
|
|
|
|
|
|
|
|
Example context (json):
|
|
|
|
{
|
2024-12-30 22:17:45 +01:00
|
|
|
"scales": [
|
|
|
|
{
|
|
|
|
id: 1,
|
|
|
|
title: "Scale name",
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
title: "Scale value",
|
|
|
|
value: 1,
|
|
|
|
disabled: false,
|
|
|
|
selected: true
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"grades": [
|
|
|
|
{
|
|
|
|
points: 100,
|
|
|
|
threshold: 55,
|
|
|
|
}
|
|
|
|
],
|
2024-12-30 20:59:57 +01:00
|
|
|
}
|
|
|
|
}}
|
|
|
|
<div class="local_treestudyplan_cfg_grades">
|
2024-12-30 22:17:45 +01:00
|
|
|
<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>
|
2024-12-30 20:59:57 +01:00
|
|
|
</div>
|