Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 18... Línea 18...
18
    @template core_question/column_header
18
    @template core_question/column_header
Línea 19... Línea 19...
19
 
19
 
Línea 20... Línea 20...
20
    Displays the <th> header cell for a column in the question bank.
20
    Displays the <th> header cell for a column in the question bank.
21
 
21
 
22
    Context variables required for this template:
22
    Context variables required for this template:
Línea 23... Línea 23...
23
        * extraclasses: CSS classes to add to the th. E.g. "questionstatus pr-3".
23
        * extraclasses: CSS classes to add to the th. E.g. "questionstatus pe-3".
Línea 24... Línea 24...
24
        * help: (optional, may be omitted) help icon. The structure here needs to be as from help_icon::export_for_template().
24
        * help: (optional, may be omitted) help icon. The structure here needs to be as from help_icon::export_for_template().
Línea 31... Línea 31...
31
            * sorttip: (optional) must be true if tip is present.
31
            * sorttip: (optional) must be true if tip is present.
32
            * tip: (optional) a tool tip to show, if the title needs explanation. E.g. "Select questions for bulk actions".
32
            * tip: (optional) a tool tip to show, if the title needs explanation. E.g. "Select questions for bulk actions".
Línea 33... Línea 33...
33
 
33
 
34
        Sortable column, with a single type of sort (e.g. question type)
34
        Sortable column, with a single type of sort (e.g. question type)
35
            * sortable: true
35
            * sortable: true
Línea 36... Línea 36...
36
            * sortlinks: HTML of the title, in a link to sort by this. E.g. "<a href=\"http:\/\/localhost\/moodle_head\/question\/edit.php?courseid=100000&amp;qbs1=-qbank_viewquestiontype%5Cquestion_type_column&amp;qbs2=qbank_viewquestionname%5Cquestion_name_idnumber_tags_column-name\" title=\"Sort by Question type descending\">\n    T<i class=\"icon fa fa-sort-asc fa-fw iconsort\"  title=\"Ascending\" role=\"img\" aria-label=\"Ascending\"><\/i>\n<\/a>"
36
            * sortlinks: HTML of the title, in a link to sort by this. E.g. "<a href=\"http:\/\/localhost\/moodle_head\/question\/edit.php?courseid=100000&amp;qbs1=-qbank_viewquestiontype%5Cquestion_type_column&amp;qbs2=qbank_viewquestionname%5Cquestion_name_idnumber_tags_column-name\" title=\"Sort by Question type descending\">\n    T<i class=\"icon fa fa-sort-asc fa-fw\"  title=\"Ascending\" role=\"img\" aria-label=\"Ascending\"><\/i>\n<\/a>"
37
 
37
 
38
        Sortable column, with an overall title, and multiple sort types (e.g. question name/idnumber)
38
        Sortable column, with an overall title, and multiple sort types (e.g. question name/idnumber)
39
            * sortable: true
39
            * sortable: true
Línea 40... Línea 40...
40
            * title: "Question"
40
            * title: "Question"
41
            * sortlinks: Several sort links concatenated. E.g. "<a href=\"http:\/\/localhost\/moodle_head\/question\/edit.php?courseid=100000&amp;qbs1=qbank_viewquestionname%5Cquestion_name_idnumber_tags_column-name&amp;qbs2=qbank_viewquestiontype%5Cquestion_type_column\" title=\"Sort by Question name ascending\">\n    Question name\n<\/a> \/ <a href=\"http:\/\/localhost\/moodle_head\/question\/edit.php?courseid=100000&amp;qbs1=qbank_viewquestionname%5Cquestion_name_idnumber_tags_column-idnumber&amp;qbs2=qbank_viewquestiontype%5Cquestion_type_column&amp;qbs3=qbank_viewquestionname%5Cquestion_name_idnumber_tags_column-name\" title=\"Sort by ID number ascending\">\n    ID number\n<\/a>"
41
            * sortlinks: Several sort links concatenated. E.g. "<a href=\"http:\/\/localhost\/moodle_head\/question\/edit.php?courseid=100000&amp;qbs1=qbank_viewquestionname%5Cquestion_name_idnumber_tags_column-name&amp;qbs2=qbank_viewquestiontype%5Cquestion_type_column\" title=\"Sort by Question name ascending\">\n    Question name\n<\/a> \/ <a href=\"http:\/\/localhost\/moodle_head\/question\/edit.php?courseid=100000&amp;qbs1=qbank_viewquestionname%5Cquestion_name_idnumber_tags_column-idnumber&amp;qbs2=qbank_viewquestiontype%5Cquestion_type_column&amp;qbs3=qbank_viewquestionname%5Cquestion_name_idnumber_tags_column-name\" title=\"Sort by ID number ascending\">\n    ID number\n<\/a>"
42
 
42
 
43
    Example context (json):
43
    Example context (json):
44
    {
44
    {
45
        "sortable": false,
45
        "sortable": false,
46
        "extraclasses": "checkbox pr-1",
46
        "extraclasses": "checkbox pe-1",
47
        "tiptitle": "<input id=\"qbheadercheckbox\" name=\"qbheadercheckbox\" type=\"checkbox\"  value=\"1\" data-action=\"toggle\" data-toggle=\"master\" data-togglegroup=\"qbank\" data-toggle-selectall=\"Select all\" data-toggle-deselectall=\"Deselect all\"><label for=\"qbheadercheckbox\" class=\"accesshide\">Select all<\/label>",
47
        "tiptitle": "<input id=\"qbheadercheckbox\" name=\"qbheadercheckbox\" type=\"checkbox\"  value=\"1\" data-action=\"toggle\" data-toggle=\"master\" data-togglegroup=\"qbank\" data-toggle-selectall=\"Select all\" data-toggle-deselectall=\"Deselect all\"><label for=\"qbheadercheckbox\" class=\"accesshide\">Select all<\/label>",
48
        "sorttip": true,
48
        "sorttip": true,
Línea 58... Línea 58...
58
    data-columnid="{{columnid}}"
58
    data-columnid="{{columnid}}"
59
    {{#width}}style="width: {{width}};"{{/width}}>
59
    {{#width}}style="width: {{width}};"{{/width}}>
60
    <div class="header-container">
60
    <div class="header-container">
61
        <div class="header-text">
61
        <div class="header-text">
62
        {{#title}}
62
        {{#title}}
63
            <div class="title mr-1">{{title}}</div>
63
            <div class="title me-1">{{title}}</div>
64
        {{/title}}
64
        {{/title}}
65
        {{^sortable}}
65
        {{^sortable}}
66
            {{^sorttip}}
66
            {{^sorttip}}
67
                <span class="mr-1">{{tiptitle}}</span>
67
                <span class="me-1">{{tiptitle}}</span>
68
            {{/sorttip}}
68
            {{/sorttip}}
69
            {{#sorttip}}
69
            {{#sorttip}}
70
                <span class="mr-1" title="{{tip}}">{{{tiptitle}}}</span>
70
                <span class="me-1" title="{{tip}}">{{{tiptitle}}}</span>
71
            {{/sorttip}}
71
            {{/sorttip}}
72
        {{/sortable}}
72
        {{/sortable}}
73
        {{#help}}
73
        {{#help}}
74
            {{>core/help_icon}}
74
            {{>core/help_icon}}
75
        {{/help}}
75
        {{/help}}