1 |
efrain |
1 |
{{!
|
|
|
2 |
This file is part of Moodle - http://moodle.org/
|
|
|
3 |
|
|
|
4 |
Moodle is free software: you can redistribute it and/or modify
|
|
|
5 |
it under the terms of the GNU General Public License as published by
|
|
|
6 |
the Free Software Foundation, either version 3 of the License, or
|
|
|
7 |
(at your option) any later version.
|
|
|
8 |
|
|
|
9 |
Moodle is distributed in the hope that it will be useful,
|
|
|
10 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
11 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
12 |
GNU General Public License for more details.
|
|
|
13 |
|
|
|
14 |
You should have received a copy of the GNU General Public License
|
|
|
15 |
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
|
|
16 |
}}
|
|
|
17 |
{{!
|
|
|
18 |
@template tool_lp/progress_bar
|
|
|
19 |
|
|
|
20 |
Moodle progress bar template for tool_lp.
|
|
|
21 |
|
|
|
22 |
The purpose of this template is to render a progress bar with a brief description.
|
|
|
23 |
|
|
|
24 |
Classes required for JS:
|
|
|
25 |
* none
|
|
|
26 |
|
|
|
27 |
Data attributes required for JS:
|
|
|
28 |
* none
|
|
|
29 |
|
|
|
30 |
Context variables required for this template:
|
|
|
31 |
* progresstextvalue A brief text that describes the progress bar.
|
|
|
32 |
* percentagevalue The numeric value for the progress bar's percentage.
|
|
|
33 |
* percentlabelvalue The progress bar's label that shows the percentage value.
|
|
|
34 |
|
|
|
35 |
Example context (json):
|
|
|
36 |
{
|
|
|
37 |
"progresstextvalue": "Progress:",
|
|
|
38 |
"percentagevalue": "50",
|
|
|
39 |
"percentlabelvalue": "50.00 %"
|
|
|
40 |
}
|
|
|
41 |
|
|
|
42 |
}}
|
|
|
43 |
<div id="progress-{{uniqid}}" class="mt-2">
|
|
|
44 |
<div class="badge badge-xs badge-sq badge-dark">{{$progresstext}}{{progresstextvalue}}{{/progresstext}}</div>
|
|
|
45 |
</div>
|
|
|
46 |
<progress class="progress mt-2" aria-describedby="progress-{{uniqid}}"
|
|
|
47 |
value="{{$percentage}}{{percentagevalue}}{{/percentage}}" max="100"></progress>
|