Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
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 qbank_viewquestiontext/question_text_format
19
 
20
    Example context (json):
21
    {
22
        "label": "Question text format",
23
        "options": [
24
          {
25
             "value": 1,
26
             "label": "Plain text",
27
             "selected": true
28
          },
29
          {
30
             "value": 2,
31
             "label": "Fully rendered",
32
             "selected": false
33
          }
34
        ]
35
    }
36
}}
1441 ariadna 37
<form class="question-text-format ms-1" action="{{formaction}}">
1 efrain 38
    <input type="hidden" name="sesskey" value="{{sesskey}}">
39
    <input type="hidden" name="returnurl" value="{{returnurl}}">
40
    <div class="input-group">
1441 ariadna 41
        <label class="input-group-text" for="question-text-format">
42
            {{label}}
1 efrain 43
        </label>
1441 ariadna 44
        <select class="form-select" name="format" id="question-text-format">
1 efrain 45
        {{#options}}
46
            <option value="{{value}}"{{#selected}} selected{{/selected}}>{{label}}</option>
47
        {{/options}}
48
        </select>
1441 ariadna 49
        <button class="btn btn-outline-secondary">{{#str}} save {{/str}}</button>
1 efrain 50
    </div>
51
</form>
52
{{#js}}
53
    require(['qbank_viewquestiontext/question_text_format'], QuestionTextFormat => {
54
        QuestionTextFormat.init('questionscontainer');
55
    });
56
{{/js}}