{{! This file is part of Moodle - http://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 . }} {{! @template qbank_columnsortorder/column_sort_ui Display a list of enable columns with customisation controls, and a list of columns from disabled plugins, with a link to the question bank plugin management screen. Context variables required for this template: * contextid - Current context id. * formaction - The URL of the actions controller to submit the form to. * sesskey - The current sesskey. * previewurl - The URL of the question bank preview page. * addcolumn - The context for the qbank_columnsortorder/add_column template. * resetcolumns - The context for the qbank_columnsortorder/reset_columns template. * names - A list of the currently active columns * name - The display name of the column * tiptitle - The tooltip text for the move handle. * colname - The unique class name for the column from the plugin. * escapedclass - The class name with \ replaced by __. * widthlabel - The label text of for this column's width field. * minwidth - The minimum value for the width field. * width - The current value for the width field. * actionmenu - The context for core/action_menu, a list of actions for the column. * columnsdisabled - Are the any columns defined by disabled plugins? * disabled - A list of disabled column names. * disabledname - The disabled column's name. * urltomanageqbanks - Link to the page for managing qbank plugins. Example context (json): { "contextid": 1, "formaction": "https://example.com/question/bank/columnsortorder/actions.php", "sesskey": "12345abcde", "previewurl": "https://example.com/question/bank/columnsortorder/sortcolumns.php?preview=1", "addcolumn": { "hashiddencolumns": true, "hiddencolumns": [ { "name": "Column A", "class": "class_name_A", "addurl": "/question/bank/columnsortorder/actions.php?action=add&column=class_name_A" }, { "name": "Column B", "class": "class_name_B", "addurl": "/question/bank/columnsortorder/actions.php?action=add&column=class_name_B" } ] }, "resetcolumns": { "reseturl": "https://example.com/question/bank/columnsortorder/actions.php?action=reset" }, "names": [ { "name": "Column A", "tiptitle": "Move Column A", "columnid": "qbank_example\\col_name_A-col_name_A", "escapedid": "qbank_example__col_name_A-col_name_A", "widthlabel": "Width of Column A", "minwidth": "10", "width": "" }, { "name": "Column B", "tiptitle": "Move Column B", "columnid": "qbank_example\\col_name_B-col_name_B", "escapedid": "qbank_example__col_name_B-col_name_B", "minwidth": "10", "width": "200" } ], "columnsdisabled": true, "disabled": [ { "disabledname": "disabled_1" }, { "disabledname": "disabled_2" } ], "urltomanageqbanks": "Manage qbank plugins" } }}

{{#str}}qbanksortdescription, qbank_columnsortorder{{/str}}

{{! }}
{{#str}}preview{{/str}} {{#addcolumn}} {{>qbank_columnsortorder/add_column}} {{/addcolumn}}
{{#resetcolumns}} {{>qbank_columnsortorder/reset_columns}} {{/resetcolumns}}
{{#names}} {{/names}}
{{#str}}name{{/str}} {{#str}}plugin{{/str}} {{#str}}columnwidth, qbank_columnsortorder{{/str}} {{#str}}action{{/str}}
{{>core/drag_handle}} {{name}} {{colname}}
{{#str}}invalidwidth, qbank_columnsortorder, {{minwidth}}{{/str}}
{{#actionmenu}}{{>core/action_menu}}{{/actionmenu}}
{{#columnsdisabled}} {{#str}}qbankcolumnsdisabled, qbank_columnsortorder{{/str}}
{{/columnsdisabled}} {{#disabled}}
{{disabledname}}
{{/disabled}}
{{{urltomanageqbanks}}}
{{#js}} require(['qbank_columnsortorder/admin_actions'], function(AdminTable) { AdminTable.init("qbank_columnsortorder-{{uniqid}}"); }); {{/js}}