first commit

This commit is contained in:
CHIEFSOFT\ameye
2024-09-30 18:11:26 -04:00
commit e592ca6823
27270 changed files with 5002257 additions and 0 deletions
@@ -0,0 +1,43 @@
{{!
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 <http://www.gnu.org/licenses/>.
}}
{{!
@template core_question/bulk_actions_ui
Example context (json):
{
"displaydata": [
{
"bulkactionitems": "<input value='Move to'>",
"actionname": "Move to",
"actionkey": "deleteselected",
"actionurl": "/question/bank/bulkmove/move.php?courseid=2"
}
]
}
}}
<div class="btn-group dropup mt-2" id="bulkactionsui-container">
<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" id="bulkactionsui-selector">
{{#str}} withselected, question{{/str}}
</button>
<div class="dropdown-menu" aria-labelledby="bulkactionsui-selector">
{{#bulkactionitems}}
<input type="submit" value="{{actionname}}" class="dropdown-item" name="{{actionkey}}" data-action="toggle" data-togglegroup="qbank"
data-toggle="action" form="questionsubmit" formaction="{{{actionurl}}}" disabled="disabled">
{{/bulkactionitems}}
</div>
</div>
+84
View File
@@ -0,0 +1,84 @@
{{!
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 <http://www.gnu.org/licenses/>.
}}
{{!
@template core_question/column_header
Displays the <th> header cell for a column in the question bank.
Context variables required for this template:
* extraclasses: CSS classes to add to the th. E.g. "questionstatus pr-3".
* help: (optional, may be omitted) help icon. The structure here needs to be as from help_icon::export_for_template().
Other fields vary, depending on whether the column is sortable.
Column with plain title, not sortable:
* sortable: false
* tiptitle: Column name (e.g. "Status")
* sorttip: (optional) must be true if tip is present.
* tip: (optional) a tool tip to show, if the title needs explanation. E.g. "Select questions for bulk actions".
Sortable column, with a single type of sort (e.g. question type)
* sortable: true
* 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>"
Sortable column, with an overall title, and multiple sort types (e.g. question name/idnumber)
* sortable: true
* title: "Question"
* 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>"
Example context (json):
{
"sortable": false,
"extraclasses": "checkbox pr-1",
"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>",
"sorttip": true,
"tip": "Select questions for bulk actions",
"class": "plugin_class",
"name": "plugin_name"
}
}}
<th class="header align-top {{extraclasses}}"
scope="col"
data-pluginname="{{class}}"
data-name="{{name}}"
data-columnid="{{columnid}}"
{{#width}}style="width: {{width}};"{{/width}}>
<div class="header-container">
<div class="header-text">
{{#title}}
<div class="title mr-1">{{title}}</div>
{{/title}}
{{^sortable}}
{{^sorttip}}
<span class="mr-1">{{tiptitle}}</span>
{{/sorttip}}
{{#sorttip}}
<span class="mr-1" title="{{tip}}">{{{tiptitle}}}</span>
{{/sorttip}}
{{/sortable}}
{{#help}}
{{>core/help_icon}}
{{/help}}
{{#actionmenu}}{{>core/action_menu}}{{/actionmenu}}
</div>
</div>
{{#sortable}}
<div class="sorters">
{{{sortlinks}}}
</div>
{{/sortable}}
</th>
+36
View File
@@ -0,0 +1,36 @@
{{!
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 <http://www.gnu.org/licenses/>.
}}
{{!
@template core_question/column_sort
Example context (json):
{
"sortdata": [
{
"sorturl": "url",
"sortname": "Sort name",
"sortorder": "Sort order when activate this sort",
"sorttip": "Sort according to first name",
"sortcontent": "Sort title sort icon"
}
]
}
}}
<a href="{{{sorturl}}}" data-sortname="{{sortname}}" data-sortorder="{{sortorder}}" title="{{sorttip}}">
{{{sortcontent}}}
</a>
@@ -0,0 +1,77 @@
{{!
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 <http://www.gnu.org/licenses/>.
}}
{{!
@template core_question/qbank_action_menu
Question bank tertiary navigtion.
Classes required for JS:
* none
Context variables required for this template:
* see question/classes/output/qbank_actionbar.php
Example context (json):
{
"questionbankselect": {
"action": "http://localhost/moodle/course/jumpto.php",
"classes": "urlselect",
"formid": "questionbankaction",
"id": "url_select61a85bc543dca7",
"label": "Question bank tertiary navigation",
"options": [{
"name": "Questions",
"selected": true,
"value": "/question/edit.php?courseid=7"
},
{
"name": "Categories",
"selected": false,
"value": "/question/bank/managecategories/category.php?courseid=7"
},
{
"name": "Import",
"selected": false,
"value": "/question/bank/importquestions/import.php?courseid=7"
},
{
"name": "Export",
"selected": false,
"value": "/question/bank/exportquestions/export.php?courseid=7"
}
]
},
"actionbutton": {
"url": "http://localhost/moodle/question/bank/managecategories/addcategory.php?cmid=71",
"label": "Add category"
}
}
}}
<div class="container-fluid tertiary-navigation">
<div class="row">
{{#questionbankselect}}
<div class="navitem">
{{>core/url_select}}
</div>
{{/questionbankselect}}
{{#actionbutton}}
<div class="navitem">
<a class="btn btn-primary ml-2" href="{{url}}">{{label}}</a>
</div>
{{/actionbutton}}
</div>
</div>
+29
View File
@@ -0,0 +1,29 @@
{{!
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 <http://www.gnu.org/licenses/>.
}}
{{!
Question bank chooser.
}}
{{> core/chooser }}
{{#js}}
require([
'core/yui'
], function(Y) {
Y.use('moodle-question-chooser', function() {
M.question.init_chooser();
});
});
{{/js}}
@@ -0,0 +1,32 @@
{{!
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 <http://www.gnu.org/licenses/>.
}}
{{!
@template core_question/question_bank_controls
Flex container for displaying plugin controls at the top of the question bank table.
Context variables required for this template:
* controls - Rendered HTML for controls.
Example context (json):
{
"controls": "<div><button class=\"btn btn-secondary\">Control 1</button><button class=\"btn btn-secondary\">Control 2</button></div>"
}
}}
<div class="d-grid gap-2 d-md-flex justify-content-start mb-2">
{{{controls}}}
</div>
@@ -0,0 +1,45 @@
{{!
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 <http://www.gnu.org/licenses/>.
}}
{{!
@template core_question/qbank_filter
Template for the form containing one or more filter rows.
Example context (json):
{
"tableregionid": "qbank-table",
"courseid": "1",
"categoryid": "2",
"perpage": "100",
"contextid": "3",
"component": "core_quiz",
"callback": "get_question_data",
"view": "\\\\core\\\\question\\\\local\\\\bank\\\\view",
"cmid": "4",
"pagevars": "[]",
"extraparams": "[]"
}
}}
{{> core/datafilter/filter}}
{{#js}}
require(['core_question/filter'], function(Filter) {
Filter.init('core-filter-{{uniqid}}', {{courseid}}, {{categoryid}}, {{perpage}}, {{contextid}},
'{{component}}', '{{callback}}', '{{view}}', {{cmid}}, '{{{pagevars}}}', '{{{extraparams}}}');
});
{{/js}}
@@ -0,0 +1,48 @@
{{!
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 <http://www.gnu.org/licenses/>.
}}
{{!
@template core_question/question_pagination
Example context (json):
{
"sortdata": [
{
"extraclasses": "classes",
"pagination": "pagination html",
"showall": "true/false",
"showallurl": "moodle url",
"biggertotal": "true/false",
"totalnumber": "number of questions"
}
]
}
}}
<div class="categorypagingbarcontainer {{extraclasses}}">
{{{pagination}}}
</div>
{{#showall}}
<div class="question-showall-text">
<a href="{{{showallurl}}}">
{{^biggertotal}}
{{#str}} showall, moodle, {{totalnumber}} {{/str}}
{{/biggertotal}}
{{#biggertotal}}
{{#str}} showperpage, moodle, {{totalnumber}} {{/str}}
{{/biggertotal}}
</a>
</div>
{{/showall}}
@@ -0,0 +1,26 @@
{{!
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 <http://www.gnu.org/licenses/>.
}}
{{!
@template core_question/question_version_info
Displays a badge containing the version information of a question
* versioninfo - The version information string, including the number and whether it is the latest verision.
Example context (json):
{
"versioninfo": "Version 2 (latest)"
}
}}
<span class="badge bg-primary text-light">{{versioninfo}}</span>
@@ -0,0 +1,41 @@
{{!
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 <http://www.gnu.org/licenses/>.
}}
{{!
@template core_question/question_version_selection
The version selection for question bank.
* options - Versions of the question
* uniqueidentifier - identifier to target the change from js
Example context (json):
{
"options": [{
"name": "Version 1",
"selected": true,
"value": "10"
},
{
"name": "Version 2",
"selected": false,
"value": "20"
}],
"uniqueidentifier": "question_comment_version_selection"
}
}}
<select class="question_version_dropdown custom-select mb-3" aria-label="{{#str}}question_version, core_question{{/str}}" name="question_version_dropdown" id="{{uniqueidentifier}}">
{{#options}}
<option value="{{questionid}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/options}}
</select>
@@ -0,0 +1,32 @@
{{!
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 <http://www.gnu.org/licenses/>.
}}
{{!
@template core_question/showtext_option
Example context (json):
{
"selected1": true
}
}}
<div>
<label for="qbshowtext">{{#str}} showquestiontext, question {{/str}}</label>
<select id="qbshowtext" name="qbshowtext" class="searchoptions custom-select align-baseline">
<option value="0"{{#selected0}} selected{{/selected0}}>{{#str}} showquestiontext_off, question {{/str}}</option>
<option value="1"{{#selected1}} selected{{/selected1}}>{{#str}} showquestiontext_plain, question {{/str}}</option>
<option value="2"{{#selected2}} selected{{/selected2}}>{{#str}} showquestiontext_full, question {{/str}}</option>
</select>
</div>