diff --git a/amd/build/drawer.min.js b/amd/build/drawer.min.js index fe36c9b..10c7f5c 100644 --- a/amd/build/drawer.min.js +++ b/amd/build/drawer.min.js @@ -1 +1 @@ -define(["jquery","core/custom_interaction_events","core/log"],function(a,b,c){var d={TOGGLE_REGION:'[data-region="drawer-toggle"]',TOGGLE_ACTION:'[data-action="toggle-drawer"]',TOGGLE_TARGET:"aria-controls",TOGGLE_SIDE:"left",BODY:"body",SECTION:'.list-group-item[href*="#section-"]'},e=a(document).width()<768,f=function(){a(d.TOGGLE_REGION).length||c.debug("Page is missing a drawer region"),a(d.TOGGLE_ACTION).length||c.debug("Page is missing a drawer toggle link"),a(d.TOGGLE_REGION).each(function(b,c){var f=a(c).find(d.TOGGLE_ACTION),g=f.attr("aria-controls"),h=a(document.getElementById(g)),i="false"==f.attr("aria-expanded"),j=f.attr("data-side"),k=a(d.BODY),l=f.attr("data-preference");e&&M.util.set_user_preference(l,"false"),h.on("mousewheel DOMMouseScroll",this.preventPageScroll),i?f.attr("aria-expanded","false"):(k.addClass("drawer-open-"+j),f.attr("aria-expanded","true"))}.bind(this)),this.registerEventListeners(),e&&this.closeAll()};return f.prototype.closeAll=function(){a(d.TOGGLE_REGION).each(function(b,c){var f=a(c).find(d.TOGGLE_ACTION),g=f.attr("data-side"),h=a(d.BODY),i=f.attr("aria-controls"),j=a(document.getElementById(i)),k=f.attr("data-preference");f.attr("aria-expanded","false"),h.removeClass("drawer-open-"+g),j.attr("aria-hidden","true"),j.addClass("closed"),e||M.util.set_user_preference(k,"false")})},f.prototype.toggleDrawer=function(b){var c=a(b.target).closest("[data-action=toggle-drawer]"),f=c.attr("aria-controls"),g=a(document.getElementById(f)),h=a(d.BODY),i=c.attr("data-side"),j=c.attr("data-preference");e&&M.util.set_user_preference(j,"false"),h.addClass("drawer-ease");var k="true"==c.attr("aria-expanded");k?(h.removeClass("drawer-open-"+i),c.attr("aria-expanded","false"),g.attr("aria-hidden","true"),g.addClass("closed"),e||M.util.set_user_preference(j,"false")):(c.attr("aria-expanded","true"),g.attr("aria-hidden","false"),g.focus(),h.addClass("drawer-open-"+i),g.removeClass("closed"),e||M.util.set_user_preference(j,"true"))},f.prototype.preventPageScroll=function(b){var c=b.wheelDelta||b.originalEvent&&b.originalEvent.wheelDelta||-b.originalEvent.detail,d=this.scrollTop+a(this).outerHeight()-this.scrollHeight>=0,e=this.scrollTop<=0;(c<0&&d||c>0&&e)&&b.preventDefault()},f.prototype.registerEventListeners=function(){a(d.TOGGLE_ACTION).each(function(c,d){b.define(a(d),[b.events.activate]),a(d).on(b.events.activate,function(a,b){this.toggleDrawer(b.originalEvent),b.originalEvent.preventDefault()}.bind(this))}.bind(this)),a(d.SECTION).click(function(){e&&this.closeAll()}.bind(this))},{init:function(){return new f}}}); \ No newline at end of file +define(["jquery","core/custom_interaction_events","core/log","core/pubsub"],function(a,b,c,d){var e={TOGGLE_REGION:'[data-region="drawer-toggle"]',TOGGLE_ACTION:'[data-action="toggle-drawer"]',TOGGLE_TARGET:"aria-controls",TOGGLE_SIDE:"left",BODY:"body",SECTION:'.list-group-item[href*="#section-"]',DRAWER:"#nav-drawer"},f=a(document).width()<768,g=function(){a(e.TOGGLE_REGION).length||c.debug("Page is missing a drawer region"),a(e.TOGGLE_ACTION).length||c.debug("Page is missing a drawer toggle link"),a(e.TOGGLE_REGION).each(function(b,c){var d=a(c).find(e.TOGGLE_ACTION),g=d.attr("aria-controls"),h=a(document.getElementById(g)),i="false"==d.attr("aria-expanded"),j=d.attr("data-side"),k=a(e.BODY),l=d.attr("data-preference");f&&M.util.set_user_preference(l,"false"),h.on("mousewheel DOMMouseScroll",this.preventPageScroll),i?d.attr("aria-expanded","false"):(k.addClass("drawer-open-"+j),d.attr("aria-expanded","true"))}.bind(this)),this.registerEventListeners(),f&&this.closeAll()};return g.prototype.closeAll=function(){a(e.TOGGLE_REGION).each(function(b,c){var d=a(c).find(e.TOGGLE_ACTION),g=d.attr("data-side"),h=a(e.BODY),i=d.attr("aria-controls"),j=a(document.getElementById(i)),k=d.attr("data-preference");d.attr("aria-expanded","false"),h.removeClass("drawer-open-"+g),j.attr("aria-hidden","true"),j.addClass("closed"),f||M.util.set_user_preference(k,"false")})},g.prototype.toggleDrawer=function(b){var c=a(b.target).closest("[data-action=toggle-drawer]"),g=c.attr("aria-controls"),h=a(document.getElementById(g)),i=a(e.BODY),j=c.attr("data-side"),k=c.attr("data-preference");f&&M.util.set_user_preference(k,"false"),i.addClass("drawer-ease");var l="true"==c.attr("aria-expanded");l?(i.removeClass("drawer-open-"+j),c.attr("aria-expanded","false"),h.attr("aria-hidden","true"),h.addClass("closed"),f||M.util.set_user_preference(k,"false")):(c.attr("aria-expanded","true"),h.attr("aria-hidden","false"),h.focus(),i.addClass("drawer-open-"+j),h.removeClass("closed"),f||M.util.set_user_preference(k,"true")),d.publish("nav-drawer-toggle-start",l)},g.prototype.preventPageScroll=function(b){var c=b.wheelDelta||b.originalEvent&&b.originalEvent.wheelDelta||-b.originalEvent.detail,d=this.scrollTop+a(this).outerHeight()-this.scrollHeight>=0,e=this.scrollTop<=0;(c<0&&d||c>0&&e)&&b.preventDefault()},g.prototype.registerEventListeners=function(){a(e.TOGGLE_ACTION).each(function(c,d){b.define(a(d),[b.events.activate]),a(d).on(b.events.activate,function(a,b){this.toggleDrawer(b.originalEvent),b.originalEvent.preventDefault()}.bind(this))}.bind(this)),a(e.SECTION).click(function(){f&&this.closeAll()}.bind(this)),a(e.DRAWER).on("webkitTransitionEnd msTransitionEnd transitionend",function(b){var c=a(b.target).closest(e.DRAWER),f="false"==c.attr("aria-hidden");d.publish("nav-drawer-toggle-end",f)})},{init:function(){return new g}}}); diff --git a/amd/build/loader.min.js b/amd/build/loader.min.js index 8fd81c7..3201c60 100644 --- a/amd/build/loader.min.js +++ b/amd/build/loader.min.js @@ -1 +1 @@ -define(["jquery","./tether","core/event"],function(a,b,c){return window.jQuery=a,window.Tether=b,require(["theme_ilb/aria","theme_ilb/util","theme_ilb/alert","theme_ilb/button","theme_ilb/carousel","theme_ilb/collapse","theme_ilb/dropdown","theme_ilb/modal","theme_ilb/scrollspy","theme_ilb/tab","theme_ilb/tooltip","theme_ilb/popover"],function(b){a("body").popover({trigger:"focus",selector:"[data-toggle=popover][data-trigger!=hover]"}),a("html").popover({container:"body",selector:"[data-toggle=popover][data-trigger=hover]",trigger:"hover",delay:{hide:500}}),c.getLegacyEvents().done(function(b){a(document).on(b.FILTER_CONTENT_UPDATED,function(){a("body").popover({selector:'[data-toggle="popover"]',trigger:"focus"})})}),b.init()}),{}}); \ No newline at end of file +define(["jquery","./tether","core/event"],function(a,b,c){return window.jQuery=a,window.Tether=b,require(["theme_ilb/aria","theme_ilb/pending","theme_ilb/util","theme_ilb/alert","theme_ilb/button","theme_ilb/carousel","theme_ilb/collapse","theme_ilb/dropdown","theme_ilb/modal","theme_ilb/scrollspy","theme_ilb/tab","theme_ilb/tooltip","theme_ilb/popover"],function(b){a("body").popover({trigger:"focus",selector:"[data-toggle=popover][data-trigger!=hover]"}),a("html").popover({container:"body",selector:"[data-toggle=popover][data-trigger=hover]",trigger:"hover",delay:{hide:500}}),c.getLegacyEvents().done(function(b){a(document).on(b.FILTER_CONTENT_UPDATED,function(){a("body").popover({selector:'[data-toggle="popover"]',trigger:"focus"})})}),b.init()}),{}}); diff --git a/amd/build/pending.min.js b/amd/build/pending.min.js new file mode 100644 index 0000000..9174b51 --- /dev/null +++ b/amd/build/pending.min.js @@ -0,0 +1 @@ +define(["jquery"],function(a){var b={alert:[{start:"close",end:"closed"}],carousel:[{start:"slide",end:"slid"}],collapse:[{start:"hide",end:"hidden"},{start:"show",end:"shown"}],dropdown:[{start:"hide",end:"hidden"},{start:"show",end:"shown"}],modal:[{start:"hide",end:"hidden"},{start:"show",end:"shown"}],popover:[{start:"hide",end:"hidden"},{start:"show",end:"shown"}],tab:[{start:"hide",end:"hidden"},{start:"show",end:"shown"}],tooltip:[{start:"hide",end:"hidden"},{start:"show",end:"shown"}]};Object.keys(b).forEach(function(c){b[c].forEach(function(b){var d=b.start+".bs."+c,e=b.end+".bs."+c;a(document.body).on(d,function(){M.util.js_pending(e)}),a(document.body).on(e,function(){M.util.js_complete(e)})})})}); \ No newline at end of file diff --git a/amd/src/pending.js b/amd/src/pending.js new file mode 100644 index 0000000..1878a0b --- /dev/null +++ b/amd/src/pending.js @@ -0,0 +1,120 @@ +// 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 . + +/** + * Add Pending JS checks to stock Bootstrap transitions. + * + * @module theme_boost/pending + * @copyright 2019 Andrew Nicols + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +define(['jquery'], function($) { + var moduleTransitions = { + alert: [ + // Alert. + { + start: 'close', + end: 'closed', + }, + ], + + carousel: [ + { + start: 'slide', + end: 'slid', + }, + ], + + collapse: [ + { + start: 'hide', + end: 'hidden', + }, + { + start: 'show', + end: 'shown', + }, + ], + + dropdown: [ + { + start: 'hide', + end: 'hidden', + }, + { + start: 'show', + end: 'shown', + }, + ], + + modal: [ + { + start: 'hide', + end: 'hidden', + }, + { + start: 'show', + end: 'shown', + }, + ], + + popover: [ + { + start: 'hide', + end: 'hidden', + }, + { + start: 'show', + end: 'shown', + }, + ], + + tab: [ + { + start: 'hide', + end: 'hidden', + }, + { + start: 'show', + end: 'shown', + }, + ], + + tooltip: [ + { + start: 'hide', + end: 'hidden', + }, + { + start: 'show', + end: 'shown', + }, + ], + }; + + Object.keys(moduleTransitions).forEach(function(key) { + moduleTransitions[key].forEach(function(pair) { + var eventStart = pair.start + '.bs.' + key; + var eventEnd = pair.end + '.bs.' + key; + $(document.body).on(eventStart, function() { + M.util.js_pending(eventEnd); + }); + + $(document.body).on(eventEnd, function() { + M.util.js_complete(eventEnd); + }); + }); + }); +}); diff --git a/classes/output/block_settings_renderer.php b/classes/output/block_settings_renderer.php deleted file mode 100644 index a27bf8d..0000000 --- a/classes/output/block_settings_renderer.php +++ /dev/null @@ -1,50 +0,0 @@ -. - -/** - * Overriden block settings renderer. - * - * @package theme_ilb - * @copyright 2016 Frédéric Massart - FMCorz.net - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - */ - -namespace theme_ilb\output; -defined('MOODLE_INTERNAL') || die(); - -require_once($CFG->dirroot . '/blocks/settings/renderer.php'); - -use moodle_url; - -/** - * Overriden block settings renderer. - * - * @package theme_ilb - * @copyright 2016 Frédéric Massart - FMCorz.net - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - */ -class block_settings_renderer extends \block_settings_renderer { - - public function search_form(moodle_url $formtarget, $searchvalue) { - $data = [ - 'action' => $formtarget->out(false), - 'label' => get_string('searchinsettings', 'admin'), - 'searchvalue' => $searchvalue - ]; - return $this->render_from_template('block_settings/search_form', $data); - } - -} diff --git a/classes/output/core/files_renderer.php b/classes/output/core/files_renderer.php deleted file mode 100644 index 2f7c889..0000000 --- a/classes/output/core/files_renderer.php +++ /dev/null @@ -1,140 +0,0 @@ -. - -namespace theme_ilb\output\core; - -use plugin_renderer_base; - -defined('MOODLE_INTERNAL') || die(); - -require_once($CFG->dirroot . '/files/renderer.php'); - -/** - * Rendering of files viewer related widgets. - * @package theme_ilb - * @copyright 2016 Damyon Wiese - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - */ - -/** - * Rendering of files viewer related widgets. - * @package theme_ilb - * @copyright 2016 Damyon Wiese - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - */ -class files_renderer extends \core_files_renderer { - /** - * FileManager JS template for window with file information/actions. - * - */ - protected function fm_js_template_fileselectlayout() { - $context = [ - 'helpicon' => $this->help_icon('setmainfile', 'repository') - ]; - return $this->render_from_template('core/filemanager_fileselect', $context); - } - - /** - * FileManager JS template for popup confirm dialogue window. - * - * @return string - */ - protected function fm_js_template_confirmdialog() { - return $this->render_from_template('core/filemanager_confirmdialog', []); - } - - /** - * Template for FilePicker with general layout (not QuickUpload). - * - * - * @return string - */ - protected function fp_js_template_generallayout() { - return $this->render_from_template('core/filemanager_modal_generallayout', []); - } - - /** - * Returns html for displaying one file manager - * - * @param form_filemanager $fm - * @return string - */ - protected function fm_print_generallayout($fm) { - $context = [ - 'client_id' => $fm->options->client_id, - 'helpicon' => $this->help_icon('setmainfile', 'repository'), - 'restrictions' => $this->fm_print_restrictions($fm) - ]; - return $this->render_from_template('core/filemanager_page_generallayout', $context); - } - - /** - * Returns HTML for default repository searchform to be passed to Filepicker - * - * This will be used as contents for search form defined in generallayout template - * (form with id {TOOLSEARCHID}). - * Default contents is one text input field with name="s" - */ - public function repository_default_searchform() { - return $this->render_from_template('core/filemanager_default_searchform', []); - } - - /** - * FilePicker JS template for 'Upload file' repository - * - * @return string - */ - protected function fp_js_template_uploadform() { - return $this->render_from_template('core/filemanager_uploadform', []); - } - - /** - * FilePicker JS template for repository login form including templates for each element type - * - * @return string - */ - protected function fp_js_template_loginform() { - return $this->render_from_template('core/filemanager_loginform', []); - } - - /** - * FilePicker JS template for window appearing to select a file. - * - * @return string - */ - protected function fp_js_template_selectlayout() { - return $this->render_from_template('core/filemanager_selectlayout', []); - } - - /** - * FilePicker JS template for popup dialogue window asking for action when file with the same name already exists - * (multiple-file version). - * - * @return string - */ - protected function fp_js_template_processexistingfilemultiple() { - return $this->render_from_template('core/filemanager_processexistingfilemultiple', []); - } - - /** - * FilePicker JS template for popup dialogue window asking for action when file with the same name already exists. - * - * @return string - */ - protected function fp_js_template_processexistingfile() { - return $this->render_from_template('core/filemanager_processexistingfile', []); - } -} diff --git a/classes/output/core_course/management/renderer.php b/classes/output/core_course/management/renderer.php deleted file mode 100644 index 521dff0..0000000 --- a/classes/output/core_course/management/renderer.php +++ /dev/null @@ -1,749 +0,0 @@ -. - -/** - * Renderers to align Moodle's HTML with that expected by Bootstrap - * - * @package theme_ilb - * @copyright 2018 Bas Brands - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - */ - -namespace theme_ilb\output\core_course\management; -defined('MOODLE_INTERNAL') || die(); - -require_once($CFG->dirroot . "/course/classes/management_renderer.php"); - -use html_writer; -use core_course_category; -use moodle_url; -use core_course_list_element; -use lang_string; -use context_system; -use stdClass; -use action_menu; -use action_menu_link_secondary; - -/** - * Main renderer for the course management pages. - * - * @package theme_ilb - * @copyright 2013 Sam Hemelryk - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - */ -class renderer extends \core_course_management_renderer { - - /** - * Opens a grid. - * - * Call {@link core_course_management_renderer::grid_column_start()} to create columns. - * - * @param string $id An id to give this grid. - * @param string $class A class to give this grid. - * @return string - */ - public function grid_start($id = null, $class = null) { - $gridclass = 'grid-start grid-row-r d-flex flex-wrap row'; - if (is_null($class)) { - $class = $gridclass; - } else { - $class .= ' ' . $gridclass; - } - $attributes = array(); - if (!is_null($id)) { - $attributes['id'] = $id; - } - return html_writer::start_div($class, $attributes); - } - - /** - * Opens a grid column - * - * @param int $size The number of segments this column should span. - * @param string $id An id to give the column. - * @param string $class A class to give the column. - * @return string - */ - public function grid_column_start($size, $id = null, $class = null) { - - if ($id == 'course-detail') { - $size = 12; - $bootstrapclass = 'col-md-'.$size; - } else { - $bootstrapclass = 'd-flex flex-wrap px-3 mb-3'; - } - - $yuigridclass = "col-sm"; - - if (is_null($class)) { - $class = $yuigridclass . ' ' . $bootstrapclass; - } else { - $class .= ' ' . $yuigridclass . ' ' . $bootstrapclass; - } - $attributes = array(); - if (!is_null($id)) { - $attributes['id'] = $id; - } - return html_writer::start_div($class . " grid_column_start", $attributes); - } - - /** - * Renderers detailed course information. - * - * @param core_course_list_element $course The course to display details for. - * @return string - */ - public function course_detail(core_course_list_element $course) { - $details = \core_course\management\helper::get_course_detail_array($course); - $fullname = $details['fullname']['value']; - - $html = html_writer::start_div('course-detail card'); - $html .= html_writer::start_div('card-header'); - $html .= html_writer::tag('h3', $fullname, array('id' => 'course-detail-title', - 'class' => 'card-title', 'tabindex' => '0')); - $html .= html_writer::end_div(); - $html .= html_writer::start_div('card-body'); - $html .= $this->course_detail_actions($course); - foreach ($details as $class => $data) { - $html .= $this->detail_pair($data['key'], $data['value'], $class); - } - $html .= html_writer::end_div(); - $html .= html_writer::end_div(); - return $html; - } - - /** - * Renders html to display a course search form - * - * @param string $value default value to populate the search field - * @param string $format display format - 'plain' (default), 'short' or 'navbar' - * @return string - */ - public function course_search_form($value = '', $format = 'plain') { - static $count = 0; - $formid = 'coursesearch'; - if ((++$count) > 1) { - $formid .= $count; - } - - switch ($format) { - case 'navbar' : - $formid = 'coursesearchnavbar'; - $inputid = 'navsearchbox'; - $inputsize = 20; - break; - case 'short' : - $inputid = 'shortsearchbox'; - $inputsize = 12; - break; - default : - $inputid = 'coursesearchbox'; - $inputsize = 30; - } - - $strsearchcourses = get_string("searchcourses"); - $searchurl = new moodle_url('/course/management.php'); - - $output = html_writer::start_div('row'); - $output .= html_writer::start_div('col-md-12'); - $output .= html_writer::start_tag('form', array('class' => 'card', 'id' => $formid, - 'action' => $searchurl, 'method' => 'get')); - $output .= html_writer::start_tag('fieldset', array('class' => 'coursesearchbox invisiblefieldset')); - $output .= html_writer::tag('div', $this->output->heading($strsearchcourses.': ', 2, 'm-0'), - array('class' => 'card-header')); - $output .= html_writer::start_div('card-body'); - $output .= html_writer::start_div('input-group col-sm-6 col-lg-4 m-auto'); - $output .= html_writer::empty_tag('input', array('class' => 'form-control', 'type' => 'text', 'id' => $inputid, - 'size' => $inputsize, 'name' => 'search', 'value' => s($value))); - $output .= html_writer::start_tag('span', array('class' => 'input-group-btn')); - $output .= html_writer::tag('button', get_string('go'), array('class' => 'btn btn-primary', 'type' => 'submit')); - $output .= html_writer::end_tag('span'); - $output .= html_writer::end_div(); - $output .= html_writer::end_div(); - $output .= html_writer::end_tag('fieldset'); - $output .= html_writer::end_tag('form'); - $output .= html_writer::end_div(); - $output .= html_writer::end_div(); - - return $output; - } - - /** - * Presents a course category listing. - * - * @param core_course_category $category The currently selected category. Also the category to highlight in the listing. - * @return string - */ - public function category_listing(core_course_category $category = null) { - - if ($category === null) { - $selectedparents = array(); - $selectedcategory = null; - } else { - $selectedparents = $category->get_parents(); - $selectedparents[] = $category->id; - $selectedcategory = $category->id; - } - $catatlevel = \core_course\management\helper::get_expanded_categories(''); - $catatlevel[] = array_shift($selectedparents); - $catatlevel = array_unique($catatlevel); - - $listing = core_course_category::get(0)->get_children(); - - $attributes = array( - 'class' => 'ml-1 list-unstyled', - 'role' => 'tree', - 'aria-labelledby' => 'category-listing-title' - ); - - $html = html_writer::start_div('category-listing card w-100'); - $html .= html_writer::tag('h3', get_string('categories'), - array('class' => 'card-header', 'id' => 'category-listing-title')); - $html .= html_writer::start_div('card-body'); - $html .= $this->category_listing_actions($category); - $html .= html_writer::start_tag('ul', $attributes); - foreach ($listing as $listitem) { - // Render each category in the listing. - $subcategories = array(); - if (in_array($listitem->id, $catatlevel)) { - $subcategories = $listitem->get_children(); - } - $html .= $this->category_listitem( - $listitem, - $subcategories, - $listitem->get_children_count(), - $selectedcategory, - $selectedparents - ); - } - $html .= html_writer::end_tag('ul'); - $html .= $this->category_bulk_actions($category); - $html .= html_writer::end_div(); - $html .= html_writer::end_div(); - return $html; - } - - /** - * Renders a category list item. - * - * This function gets called recursively to render sub categories. - * - * @param core_course_category $category The category to render as listitem. - * @param core_course_category[] $subcategories The subcategories belonging to the category being rented. - * @param int $totalsubcategories The total number of sub categories. - * @param int $selectedcategory The currently selected category - * @param int[] $selectedcategories The path to the selected category and its ID. - * @return string - */ - public function category_listitem(core_course_category $category, array $subcategories, $totalsubcategories, - $selectedcategory = null, $selectedcategories = array()) { - - $isexpandable = ($totalsubcategories > 0); - $isexpanded = (!empty($subcategories)); - $activecategory = ($selectedcategory === $category->id); - $attributes = array( - 'class' => 'listitem listitem-category list-group-item list-group-item-action', - 'data-id' => $category->id, - 'data-expandable' => $isexpandable ? '1' : '0', - 'data-expanded' => $isexpanded ? '1' : '0', - 'data-selected' => $activecategory ? '1' : '0', - 'data-visible' => $category->visible ? '1' : '0', - 'role' => 'treeitem', - 'aria-expanded' => $isexpanded ? 'true' : 'false' - ); - $text = $category->get_formatted_name(); - if ($category->parent) { - $a = new stdClass; - $a->category = $text; - $a->parentcategory = $category->get_parent_coursecat()->get_formatted_name(); - $textlabel = get_string('categorysubcategoryof', 'moodle', $a); - } - $courseicon = $this->output->pix_icon('i/course', get_string('courses')); - $bcatinput = array( - 'type' => 'checkbox', - 'name' => 'bcat[]', - 'value' => $category->id, - 'class' => 'bulk-action-checkbox', - 'aria-label' => get_string('bulkactionselect', 'moodle', $text), - 'data-action' => 'select' - ); - - if (!$category->can_resort_subcategories() && !$category->has_manage_capability()) { - // Very very hardcoded here. - $bcatinput['style'] = 'visibility:hidden'; - } - - $viewcaturl = new moodle_url('/course/management.php', array('categoryid' => $category->id)); - if ($isexpanded) { - $icon = $this->output->pix_icon('t/switch_minus', get_string('collapse'), - 'moodle', array('class' => 'tree-icon', 'title' => '')); - $icon = html_writer::link( - $viewcaturl, - $icon, - array( - 'class' => 'float-left', - 'data-action' => 'collapse', - 'title' => get_string('collapsecategory', 'moodle', $text), - 'aria-controls' => 'subcategoryof'.$category->id - ) - ); - } else if ($isexpandable) { - $icon = $this->output->pix_icon('t/switch_plus', get_string('expand'), - 'moodle', array('class' => 'tree-icon', 'title' => '')); - $icon = html_writer::link( - $viewcaturl, - $icon, - array( - 'class' => 'float-left', - 'data-action' => 'expand', - 'title' => get_string('expandcategory', 'moodle', $text) - ) - ); - } else { - $icon = $this->output->pix_icon( - 'i/empty', - '', - 'moodle', - array('class' => 'tree-icon')); - $icon = html_writer::span($icon, 'float-left'); - } - $actions = \core_course\management\helper::get_category_listitem_actions($category); - $hasactions = !empty($actions) || $category->can_create_course(); - - $html = html_writer::start_tag('li', $attributes); - $html .= html_writer::start_div('clearfix'); - $html .= html_writer::start_div('float-left ba-checkbox'); - $html .= html_writer::empty_tag('input', $bcatinput).' '; - $html .= html_writer::end_div(); - $html .= $icon; - if ($hasactions) { - $textattributes = array('class' => 'float-left categoryname'); - } else { - $textattributes = array('class' => 'float-left categoryname without-actions'); - } - if (isset($textlabel)) { - $textattributes['aria-label'] = $textlabel; - } - $html .= html_writer::link($viewcaturl, $text, $textattributes); - $html .= html_writer::start_div('float-right d-flex'); - if ($category->idnumber) { - $html .= html_writer::tag('span', s($category->idnumber), array('class' => 'dimmed idnumber')); - } - if ($hasactions) { - $html .= $this->category_listitem_actions($category, $actions); - } - $countid = 'course-count-'.$category->id; - $html .= html_writer::span( - html_writer::span($category->get_courses_count()) . - html_writer::span(get_string('courses'), 'accesshide', array('id' => $countid)) . - $courseicon, - 'course-count dimmed', - array('aria-labelledby' => $countid) - ); - $html .= html_writer::end_div(); - $html .= html_writer::end_div(); - if ($isexpanded) { - $html .= html_writer::start_tag('ul', - array('class' => 'ml', 'role' => 'group', 'id' => 'subcategoryof'.$category->id)); - $catatlevel = \core_course\management\helper::get_expanded_categories($category->path); - $catatlevel[] = array_shift($selectedcategories); - $catatlevel = array_unique($catatlevel); - foreach ($subcategories as $listitem) { - $childcategories = (in_array($listitem->id, $catatlevel)) ? $listitem->get_children() : array(); - $html .= $this->category_listitem( - $listitem, - $childcategories, - $listitem->get_children_count(), - $selectedcategory, - $selectedcategories - ); - } - $html .= html_writer::end_tag('ul'); - } - $html .= html_writer::end_tag('li'); - return $html; - } - - /** - * Renderers the actions that are possible for the course category listing. - * - * These are not the actions associated with an individual category listing. - * That happens through category_listitem_actions. - * - * @param core_course_category $category - * @return string - */ - public function category_listing_actions(core_course_category $category = null) { - $actions = array(); - - $cancreatecategory = $category && $category->can_create_subcategory(); - $cancreatecategory = $cancreatecategory || core_course_category::can_create_top_level_category(); - if ($category === null) { - $category = core_course_category::get(0); - } - - if ($cancreatecategory) { - $url = new moodle_url('/course/editcategory.php', array('parent' => $category->id)); - $actions[] = html_writer::link($url, get_string('createnewcategory'), array('class' => 'btn btn-default')); - } - if (core_course_category::can_approve_course_requests()) { - $actions[] = html_writer::link(new moodle_url('/course/pending.php'), get_string('coursespending')); - } - if (count($actions) === 0) { - return ''; - } - return html_writer::div(join(' ', $actions), 'listing-actions category-listing-actions mb-3'); - } - - /** - * Renders a course listing. - * - * @param core_course_category $category The currently selected category. This is what the listing is focused on. - * @param core_course_list_element $course The currently selected course. - * @param int $page The page being displayed. - * @param int $perpage The number of courses to display per page. - * @param string|null $viewmode The view mode the page is in, one out of 'default', 'combined', 'courses' or 'categories'. - * @return string - */ - public function course_listing(core_course_category $category = null, core_course_list_element $course = null, - $page = 0, $perpage = 20, $viewmode = 'default') { - - if ($category === null) { - $html = html_writer::start_div('select-a-category'); - $html .= html_writer::tag('h3', get_string('courses'), - array('id' => 'course-listing-title', 'tabindex' => '0')); - $html .= $this->output->notification(get_string('selectacategory'), 'notifymessage'); - $html .= html_writer::end_div(); - return $html; - } - - $page = max($page, 0); - $perpage = max($perpage, 2); - $totalcourses = $category->coursecount; - $totalpages = ceil($totalcourses / $perpage); - if ($page > $totalpages - 1) { - $page = $totalpages - 1; - } - $options = array( - 'offset' => $page * $perpage, - 'limit' => $perpage - ); - $courseid = isset($course) ? $course->id : null; - $class = ''; - if ($page === 0) { - $class .= ' firstpage'; - } - if ($page + 1 === (int)$totalpages) { - $class .= ' lastpage'; - } - - $html = html_writer::start_div('card course-listing w-100'.$class, array( - 'data-category' => $category->id, - 'data-page' => $page, - 'data-totalpages' => $totalpages, - 'data-totalcourses' => $totalcourses, - 'data-canmoveoutof' => $category->can_move_courses_out_of() && $category->can_move_courses_into() - )); - $html .= html_writer::tag('h3', $category->get_formatted_name(), - array('id' => 'course-listing-title', 'tabindex' => '0', 'class' => 'card-header')); - $html .= html_writer::start_div('card-body'); - $html .= $this->course_listing_actions($category, $course, $perpage); - $html .= $this->listing_pagination($category, $page, $perpage, false, $viewmode); - $html .= html_writer::start_tag('ul', array('class' => 'ml course-list', 'role' => 'group')); - foreach ($category->get_courses($options) as $listitem) { - $html .= $this->course_listitem($category, $listitem, $courseid); - } - $html .= html_writer::end_tag('ul'); - $html .= $this->listing_pagination($category, $page, $perpage, true, $viewmode); - $html .= $this->course_bulk_actions($category); - $html .= html_writer::end_div(); - $html .= html_writer::end_div(); - return $html; - } - - /** - * Renderers a course list item. - * - * This function will be called for every course being displayed by course_listing. - * - * @param core_course_category $category The currently selected category and the category the course belongs to. - * @param core_course_list_element $course The course to produce HTML for. - * @param int $selectedcourse The id of the currently selected course. - * @return string - */ - public function course_listitem(core_course_category $category, core_course_list_element $course, $selectedcourse) { - - $text = $course->get_formatted_name(); - $attributes = array( - 'class' => 'listitem listitem-course list-group-item list-group-item-action', - 'data-id' => $course->id, - 'data-selected' => ($selectedcourse == $course->id) ? '1' : '0', - 'data-visible' => $course->visible ? '1' : '0' - ); - - $bulkcourseinput = array( - 'type' => 'checkbox', - 'name' => 'bc[]', - 'value' => $course->id, - 'class' => 'bulk-action-checkbox', - 'aria-label' => get_string('bulkactionselect', 'moodle', $text), - 'data-action' => 'select' - ); - if (!$category->has_manage_capability()) { - // Very very hardcoded here. - $bulkcourseinput['style'] = 'visibility:hidden'; - } - - $viewcourseurl = new moodle_url($this->page->url, array('courseid' => $course->id)); - - $html = html_writer::start_tag('li', $attributes); - $html .= html_writer::start_div('clearfix'); - - if ($category->can_resort_courses()) { - // In order for dnd to be available the user must be able to resort the category children.. - $html .= html_writer::div($this->output->pix_icon('i/move_2d', get_string('dndcourse')), 'float-left drag-handle'); - } - - $html .= html_writer::start_div('ba-checkbox float-left'); - $html .= html_writer::empty_tag('input', $bulkcourseinput).' '; - $html .= html_writer::end_div(); - $html .= html_writer::link($viewcourseurl, $text, array('class' => 'float-left coursename')); - $html .= html_writer::start_div('float-right'); - if ($course->idnumber) { - $html .= html_writer::tag('span', s($course->idnumber), array('class' => 'dimmed idnumber')); - } - $html .= $this->course_listitem_actions($category, $course); - $html .= html_writer::end_div(); - $html .= html_writer::end_div(); - $html .= html_writer::end_tag('li'); - return $html; - } - - /** - * Renderers actions for the course listing. - * - * Not to be confused with course_listitem_actions which renderers the actions for individual courses. - * - * @param core_course_category $category - * @param core_course_list_element $course The currently selected course. - * @param int $perpage - * @return string - */ - public function course_listing_actions(core_course_category $category, core_course_list_element $course = null, $perpage = 20) { - $actions = array(); - if ($category->can_create_course()) { - $url = new moodle_url('/course/edit.php', array('category' => $category->id, 'returnto' => 'catmanage')); - $actions[] = html_writer::link($url, get_string('createnewcourse'), array('class' => 'btn btn-default')); - } - if ($category->can_request_course()) { - // Request a new course. - $url = new moodle_url('/course/request.php', array('return' => 'management')); - $actions[] = html_writer::link($url, get_string('requestcourse')); - } - if ($category->can_resort_courses()) { - $params = $this->page->url->params(); - $params['action'] = 'resortcourses'; - $params['sesskey'] = sesskey(); - $baseurl = new moodle_url('/course/management.php', $params); - $fullnameurl = new moodle_url($baseurl, array('resort' => 'fullname')); - $fullnameurldesc = new moodle_url($baseurl, array('resort' => 'fullnamedesc')); - $shortnameurl = new moodle_url($baseurl, array('resort' => 'shortname')); - $shortnameurldesc = new moodle_url($baseurl, array('resort' => 'shortnamedesc')); - $idnumberurl = new moodle_url($baseurl, array('resort' => 'idnumber')); - $idnumberdescurl = new moodle_url($baseurl, array('resort' => 'idnumberdesc')); - $timecreatedurl = new moodle_url($baseurl, array('resort' => 'timecreated')); - $timecreateddescurl = new moodle_url($baseurl, array('resort' => 'timecreateddesc')); - $menu = new action_menu(array( - new action_menu_link_secondary($fullnameurl, - null, - get_string('sortbyx', 'moodle', get_string('fullnamecourse'))), - new action_menu_link_secondary($fullnameurldesc, - null, - get_string('sortbyxreverse', 'moodle', get_string('fullnamecourse'))), - new action_menu_link_secondary($shortnameurl, - null, - get_string('sortbyx', 'moodle', get_string('shortnamecourse'))), - new action_menu_link_secondary($shortnameurldesc, - null, - get_string('sortbyxreverse', 'moodle', get_string('shortnamecourse'))), - new action_menu_link_secondary($idnumberurl, - null, - get_string('sortbyx', 'moodle', get_string('idnumbercourse'))), - new action_menu_link_secondary($idnumberdescurl, - null, - get_string('sortbyxreverse', 'moodle', get_string('idnumbercourse'))), - new action_menu_link_secondary($timecreatedurl, - null, - get_string('sortbyx', 'moodle', get_string('timecreatedcourse'))), - new action_menu_link_secondary($timecreateddescurl, - null, - get_string('sortbyxreverse', 'moodle', get_string('timecreatedcourse'))) - )); - $menu->set_menu_trigger(get_string('resortcourses')); - $actions[] = $this->render($menu); - } - $strall = get_string('all'); - $menu = new action_menu(array( - new action_menu_link_secondary(new moodle_url($this->page->url, array('perpage' => 5)), null, 5), - new action_menu_link_secondary(new moodle_url($this->page->url, array('perpage' => 10)), null, 10), - new action_menu_link_secondary(new moodle_url($this->page->url, array('perpage' => 20)), null, 20), - new action_menu_link_secondary(new moodle_url($this->page->url, array('perpage' => 50)), null, 50), - new action_menu_link_secondary(new moodle_url($this->page->url, array('perpage' => 100)), null, 100), - new action_menu_link_secondary(new moodle_url($this->page->url, array('perpage' => 999)), null, $strall), - )); - if ((int)$perpage === 999) { - $perpage = $strall; - } - $menu->attributes['class'] .= ' courses-per-page'; - $menu->set_menu_trigger(get_string('perpagea', 'moodle', $perpage)); - $actions[] = $this->render($menu); - return html_writer::div(join(' ', $actions), 'listing-actions course-listing-actions'); - } - - /** - * Displays a search result listing. - * - * @param array $courses The courses to display. - * @param int $totalcourses The total number of courses to display. - * @param core_course_list_element $course The currently selected course if there is one. - * @param int $page The current page, starting at 0. - * @param int $perpage The number of courses to display per page. - * @param string $search The string we are searching for. - * @return string - */ - public function search_listing(array $courses, $totalcourses, core_course_list_element $course = null, $page = 0, $perpage = 20, - $search = '') { - $page = max($page, 0); - $perpage = max($perpage, 2); - $totalpages = ceil($totalcourses / $perpage); - if ($page > $totalpages - 1) { - $page = $totalpages - 1; - } - $courseid = isset($course) ? $course->id : null; - $first = true; - $last = false; - $i = $page * $perpage; - - $html = html_writer::start_div('course-listing w-100', array( - 'data-category' => 'search', - 'data-page' => $page, - 'data-totalpages' => $totalpages, - 'data-totalcourses' => $totalcourses - )); - $html .= html_writer::tag('h3', get_string('courses')); - $html .= $this->search_pagination($totalcourses, $page, $perpage); - $html .= html_writer::start_tag('ul', array('class' => 'ml')); - foreach ($courses as $listitem) { - $i++; - if ($i == $totalcourses) { - $last = true; - } - $html .= $this->search_listitem($listitem, $courseid, $first, $last); - $first = false; - } - $html .= html_writer::end_tag('ul'); - $html .= $this->search_pagination($totalcourses, $page, $perpage, true, $search); - $html .= $this->course_search_bulk_actions(); - $html .= html_writer::end_div(); - return $html; - } - - /** - * Renderers a search result course list item. - * - * This function will be called for every course being displayed by course_listing. - * - * @param core_course_list_element $course The course to produce HTML for. - * @param int $selectedcourse The id of the currently selected course. - * @return string - */ - public function search_listitem(core_course_list_element $course, $selectedcourse) { - - $text = $course->get_formatted_name(); - $attributes = array( - 'class' => 'listitem listitem-course list-group-item list-group-item-action', - 'data-id' => $course->id, - 'data-selected' => ($selectedcourse == $course->id) ? '1' : '0', - 'data-visible' => $course->visible ? '1' : '0' - ); - $bulkcourseinput = ''; - if (core_course_category::get($course->category)->can_move_courses_out_of()) { - $bulkcourseinput = array( - 'type' => 'checkbox', - 'name' => 'bc[]', - 'value' => $course->id, - 'class' => 'bulk-action-checkbox', - 'aria-label' => get_string('bulkactionselect', 'moodle', $text), - 'data-action' => 'select' - ); - } - $viewcourseurl = new moodle_url($this->page->url, array('courseid' => $course->id)); - $categoryname = core_course_category::get($course->category)->get_formatted_name(); - - $html = html_writer::start_tag('li', $attributes); - $html .= html_writer::start_div('clearfix'); - $html .= html_writer::start_div('float-left'); - if ($bulkcourseinput) { - $html .= html_writer::empty_tag('input', $bulkcourseinput).' '; - } - $html .= html_writer::end_div(); - $html .= html_writer::link($viewcourseurl, $text, array('class' => 'float-left coursename')); - $html .= html_writer::tag('span', $categoryname, array('class' => 'float-left categoryname')); - $html .= html_writer::start_div('float-right'); - $html .= $this->search_listitem_actions($course); - $html .= html_writer::tag('span', s($course->idnumber), array('class' => 'dimmed idnumber')); - $html .= html_writer::end_div(); - $html .= html_writer::end_div(); - $html .= html_writer::end_tag('li'); - return $html; - } - - /** - * Renderers a key value pair of information for display. - * - * @param string $key - * @param string $value - * @param string $class - * @return string - */ - protected function detail_pair($key, $value, $class ='') { - $html = html_writer::start_div('detail-pair row yui3-g '.preg_replace('#[^a-zA-Z0-9_\-]#', '-', $class)); - $html .= html_writer::div(html_writer::span($key), 'pair-key col-md-3 yui3-u-1-4 font-weight-bold'); - $html .= html_writer::div(html_writer::span($value), 'pair-value col-md-8 yui3-u-3-4'); - $html .= html_writer::end_div(); - return $html; - } - - /** - * A collection of actions for a course. - * - * @param core_course_list_element $course The course to display actions for. - * @return string - */ - public function course_detail_actions(core_course_list_element $course) { - $actions = \core_course\management\helper::get_course_detail_actions($course); - if (empty($actions)) { - return ''; - } - $options = array(); - foreach ($actions as $action) { - $options[] = $this->action_link($action['url'], $action['string'], null, - array('class' => 'btn btn-sm btn-secondary mr-1 mb-3')); - } - return html_writer::div(join('', $options), 'listing-actions course-detail-listing-actions'); - } - -} diff --git a/classes/output/core_question/bank_renderer.php b/classes/output/core_question/bank_renderer.php deleted file mode 100644 index ccbfea9..0000000 --- a/classes/output/core_question/bank_renderer.php +++ /dev/null @@ -1,58 +0,0 @@ -. - -/** - * Question renderer. - * - * @package theme_ilb - * @copyright 2017 onwards Ankit Agarwal - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - */ - -namespace theme_ilb\output\core_question; -defined('MOODLE_INTERNAL') || die(); - -require_once($CFG->dirroot . '/' . $CFG->admin . '/renderer.php'); - -/** - * Question renderer class. - * - * @package theme_ilb - * @copyright 2017 onwards Ankit Agarwal - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - */ -class bank_renderer extends \core_question_bank_renderer { - - /** - * Display additional navigation if needed. - * - * @return string - */ - public function extra_horizontal_navigation() { - // Horizontal navigation for question bank. - if ($questionnode = $this->page->settingsnav->find("questionbank", \navigation_node::TYPE_CONTAINER)) { - if ($children = $questionnode->children) { - $tabs = []; - foreach ($children as $key => $node) { - $tabs[] = new \tabobject($node->key, $node->action, $node->text); - } - $active = $questionnode->find_active_node()->key; - return \html_writer::div(print_tabs([$tabs], $active, null, null, true), 'questionbank-navigation'); - } - } - return ''; - } -} diff --git a/classes/output/core_renderer.php b/classes/output/core_renderer.php index 0002598..4ddd533 100644 --- a/classes/output/core_renderer.php +++ b/classes/output/core_renderer.php @@ -16,23 +16,7 @@ namespace theme_ilb\output; -use coding_exception; -use html_writer; -use tabobject; -use tabtree; -use custom_menu_item; -use custom_menu; -use block_contents; -use navigation_node; -use action_link; -use stdClass; use moodle_url; -use preferences_groups; -use action_menu; -use help_icon; -use single_button; -use context_course; -use pix_icon; defined('MOODLE_INTERNAL') || die; @@ -46,70 +30,6 @@ defined('MOODLE_INTERNAL') || die; class core_renderer extends \core_renderer { - /** @var custom_menu_item language The language menu if created */ - protected $language = null; - - /** - * Outputs the opening section of a box. - * - * @param string $classes A space-separated list of CSS classes - * @param string $id An optional ID - * @param array $attributes An array of other attributes to give the box. - * @return string the HTML to output. - */ - public function box_start($classes = 'generalbox', $id = null, $attributes = array()) { - if (is_array($classes)) { - $classes = implode(' ', $classes); - } - return parent::box_start($classes . ' py-3', $id, $attributes); - } - - /** - * Wrapper for header elements. - * - * @return string HTML to display the main header. - */ - public function full_header() { - global $PAGE; - - $header = new stdClass(); - $header->settingsmenu = $this->context_header_settings_menu(); - $header->contextheader = $this->context_header(); - $header->hasnavbar = empty($PAGE->layout_options['nonavbar']); - $header->navbar = $this->navbar(); - $header->pageheadingbutton = $this->page_heading_button(); - $header->courseheader = $this->course_header(); - return $this->render_from_template('theme_ilb/header', $header); - } - - /** - * The standard tags that should be included in the tag - * including a meta description for the front page - * - * @return string HTML fragment. - */ - public function standard_head_html() { - global $SITE, $PAGE; - - $output = parent::standard_head_html(); - if ($PAGE->pagelayout == 'frontpage') { - $summary = s(strip_tags(format_text($SITE->summary, FORMAT_HTML))); - if (!empty($summary)) { - $output .= "\n"; - } - } - - return $output; - } - - /* - * This renders the navbar. - * Uses bootstrap compatible html. - */ - public function navbar() { - return $this->render_from_template('core/navbar', $this->page->navbar); - } - /** * We don't like these... * @@ -117,577 +37,4 @@ class core_renderer extends \core_renderer { public function edit_button(moodle_url $url) { return ''; } - - /** - * Override to inject the logo. - * - * @param array $headerinfo The header info. - * @param int $headinglevel What level the 'h' tag will be. - * @return string HTML for the header bar. - */ - public function context_header($headerinfo = null, $headinglevel = 1) { - global $SITE; - - if ($this->should_display_main_logo($headinglevel)) { - $sitename = format_string($SITE->fullname, true, array('context' => context_course::instance(SITEID))); - return html_writer::div(html_writer::empty_tag('img', [ - 'src' => $this->get_logo_url(null, 150), 'alt' => $sitename, 'class' => 'img-fluid']), 'logo'); - } - - return parent::context_header($headerinfo, $headinglevel); - } - - /** - * Get the compact logo URL. - * - * @return string - */ - public function get_compact_logo_url($maxwidth = 100, $maxheight = 100) { - return parent::get_compact_logo_url(null, 70); - } - - /** - * Whether we should display the main logo. - * - * @return bool - */ - public function should_display_main_logo($headinglevel = 1) { - global $PAGE; - - // Only render the logo if we're on the front page or login page and the we have a logo. - $logo = $this->get_logo_url(); - if ($headinglevel == 1 && !empty($logo)) { - if ($PAGE->pagelayout == 'frontpage' || $PAGE->pagelayout == 'login') { - return true; - } - } - - return false; - } - /** - * Whether we should display the logo in the navbar. - * - * We will when there are no main logos, and we have compact logo. - * - * @return bool - */ - public function should_display_navbar_logo() { - $logo = $this->get_compact_logo_url(); - return !empty($logo) && !$this->should_display_main_logo(); - } - - /* - * Overriding the custom_menu function ensures the custom menu is - * always shown, even if no menu items are configured in the global - * theme settings page. - */ - public function custom_menu($custommenuitems = '') { - global $CFG; - - if (empty($custommenuitems) && !empty($CFG->custommenuitems)) { - $custommenuitems = $CFG->custommenuitems; - } - $custommenu = new custom_menu($custommenuitems, current_language()); - return $this->render_custom_menu($custommenu); - } - - /** - * We want to show the custom menus as a list of links in the footer on small screens. - * Just return the menu object exported so we can render it differently. - */ - public function custom_menu_flat() { - global $CFG; - $custommenuitems = ''; - - if (empty($custommenuitems) && !empty($CFG->custommenuitems)) { - $custommenuitems = $CFG->custommenuitems; - } - $custommenu = new custom_menu($custommenuitems, current_language()); - $langs = get_string_manager()->get_list_of_translations(); - $haslangmenu = $this->lang_menu() != ''; - - if ($haslangmenu) { - $strlang = get_string('language'); - $currentlang = current_language(); - if (isset($langs[$currentlang])) { - $currentlang = $langs[$currentlang]; - } else { - $currentlang = $strlang; - } - $this->language = $custommenu->add($currentlang, new moodle_url('#'), $strlang, 10000); - foreach ($langs as $langtype => $langname) { - $this->language->add($langname, new moodle_url($this->page->url, array('lang' => $langtype)), $langname); - } - } - - return $custommenu->export_for_template($this); - } - - /* - * This renders the bootstrap top menu. - * - * This renderer is needed to enable the Bootstrap style navigation. - */ - protected function render_custom_menu(custom_menu $menu) { - global $CFG; - - $langs = get_string_manager()->get_list_of_translations(); - $haslangmenu = $this->lang_menu() != ''; - - if (!$menu->has_children() && !$haslangmenu) { - return ''; - } - - if ($haslangmenu) { - $strlang = get_string('language'); - $currentlang = current_language(); - if (isset($langs[$currentlang])) { - $currentlang = $langs[$currentlang]; - } else { - $currentlang = $strlang; - } - $this->language = $menu->add($currentlang, new moodle_url('#'), $strlang, 10000); - foreach ($langs as $langtype => $langname) { - $this->language->add($langname, new moodle_url($this->page->url, array('lang' => $langtype)), $langname); - } - } - - $content = ''; - foreach ($menu->get_children() as $item) { - $context = $item->export_for_template($this); - $content .= $this->render_from_template('core/custom_menu_item', $context); - } - - return $content; - } - - /** - * This code renders the navbar button to control the display of the custom menu - * on smaller screens. - * - * Do not display the button if the menu is empty. - * - * @return string HTML fragment - */ - public function navbar_button() { - global $CFG; - - if (empty($CFG->custommenuitems) && $this->lang_menu() == '') { - return ''; - } - - $iconbar = html_writer::tag('span', '', array('class' => 'icon-bar')); - $button = html_writer::tag('a', $iconbar . "\n" . $iconbar. "\n" . $iconbar, array( - 'class' => 'btn btn-navbar', - 'data-toggle' => 'collapse', - 'data-target' => '.nav-collapse' - )); - return $button; - } - - /** - * Renders tabtree - * - * @param tabtree $tabtree - * @return string - */ - protected function render_tabtree(tabtree $tabtree) { - if (empty($tabtree->subtree)) { - return ''; - } - $data = $tabtree->export_for_template($this); - return $this->render_from_template('core/tabtree', $data); - } - - /** - * Renders tabobject (part of tabtree) - * - * This function is called from {@link core_renderer::render_tabtree()} - * and also it calls itself when printing the $tabobject subtree recursively. - * - * @param tabobject $tabobject - * @return string HTML fragment - */ - protected function render_tabobject(tabobject $tab) { - throw new coding_exception('Tab objects should not be directly rendered.'); - } - - /** - * Prints a nice side block with an optional header. - * - * @param block_contents $bc HTML for the content - * @param string $region the region the block is appearing in. - * @return string the HTML to be output. - */ - public function block(block_contents $bc, $region) { - $bc = clone($bc); // Avoid messing up the object passed in. - if (empty($bc->blockinstanceid) || !strip_tags($bc->title)) { - $bc->collapsible = block_contents::NOT_HIDEABLE; - } - - $id = !empty($bc->attributes['id']) ? $bc->attributes['id'] : uniqid('block-'); - $context = new stdClass(); - $context->skipid = $bc->skipid; - $context->blockinstanceid = $bc->blockinstanceid; - $context->dockable = $bc->dockable; - $context->id = $id; - $context->hidden = $bc->collapsible == block_contents::HIDDEN; - $context->skiptitle = strip_tags($bc->title); - $context->showskiplink = !empty($context->skiptitle); - $context->arialabel = $bc->arialabel; - $context->ariarole = !empty($bc->attributes['role']) ? $bc->attributes['role'] : 'complementary'; - $context->type = $bc->attributes['data-block']; - $context->title = $bc->title; - $context->content = $bc->content; - $context->annotation = $bc->annotation; - $context->footer = $bc->footer; - $context->hascontrols = !empty($bc->controls); - if ($context->hascontrols) { - $context->controls = $this->block_controls($bc->controls, $id); - } - - return $this->render_from_template('core/block', $context); - } - - /** - * Returns the CSS classes to apply to the body tag. - * - * @since Moodle 2.5.1 2.6 - * @param array $additionalclasses Any additional classes to apply. - * @return string - */ - public function body_css_classes(array $additionalclasses = array()) { - return $this->page->bodyclasses . ' ' . implode(' ', $additionalclasses); - } - - /** - * Renders preferences groups. - * - * @param preferences_groups $renderable The renderable - * @return string The output. - */ - public function render_preferences_groups(preferences_groups $renderable) { - return $this->render_from_template('core/preferences_groups', $renderable); - } - - /** - * Renders an action menu component. - * - * @param action_menu $menu - * @return string HTML - */ - public function render_action_menu(action_menu $menu) { - - // We don't want the class icon there! - foreach ($menu->get_secondary_actions() as $action) { - if ($action instanceof \action_menu_link && $action->has_class('icon')) { - $action->attributes['class'] = preg_replace('/(^|\s+)icon(\s+|$)/i', '', $action->attributes['class']); - } - } - - if ($menu->is_empty()) { - return ''; - } - $context = $menu->export_for_template($this); - - return $this->render_from_template('core/action_menu', $context); - } - - /** - * Implementation of user image rendering. - * - * @param help_icon $helpicon A help icon instance - * @return string HTML fragment - */ - protected function render_help_icon(help_icon $helpicon) { - $context = $helpicon->export_for_template($this); - return $this->render_from_template('core/help_icon', $context); - } - - /** - * Renders a single button widget. - * - * This will return HTML to display a form containing a single button. - * - * @param single_button $button - * @return string HTML fragment - */ - protected function render_single_button(single_button $button) { - return $this->render_from_template('core/single_button', $button->export_for_template($this)); - } - - /** - * Renders the login form. - * - * @param \core_auth\output\login $form The renderable. - * @return string - */ - public function render_login(\core_auth\output\login $form) { - global $CFG, $SITE; - - $context = $form->export_for_template($this); - - // Override because rendering is not supported in template yet. - if ($CFG->rememberusername == 0) { - $context->cookieshelpiconformatted = $this->help_icon('cookiesenabledonlysession'); - } else { - $context->cookieshelpiconformatted = $this->help_icon('cookiesenabled'); - } - $context->errorformatted = $this->error_text($context->error); - $url = $this->get_logo_url(); - if ($url) { - $url = $url->out(false); - } - $context->logourl = $url; - $context->sitename = format_string($SITE->fullname, true, - ['context' => context_course::instance(SITEID), "escape" => false]); - - return $this->render_from_template('core/loginform', $context); - } - - /** - * Render the login signup form into a nice template for the theme. - * - * @param mform $form - * @return string - */ - public function render_login_signup_form($form) { - global $SITE; - - $context = $form->export_for_template($this); - $url = $this->get_logo_url(); - if ($url) { - $url = $url->out(false); - } - $context['logourl'] = $url; - $context['sitename'] = format_string($SITE->fullname, true, - ['context' => context_course::instance(SITEID), "escape" => false]); - - return $this->render_from_template('core/signup_form_layout', $context); - } - - /** - * This is an optional menu that can be added to a layout by a theme. It contains the - * menu for the course administration, only on the course main page. - * - * @return string - */ - public function context_header_settings_menu() { - $context = $this->page->context; - $menu = new action_menu(); - - $items = $this->page->navbar->get_items(); - $currentnode = end($items); - - $showcoursemenu = false; - $showfrontpagemenu = false; - $showusermenu = false; - - // We are on the course home page. - if (($context->contextlevel == CONTEXT_COURSE) && - !empty($currentnode) && - ($currentnode->type == navigation_node::TYPE_COURSE || $currentnode->type == navigation_node::TYPE_SECTION)) { - $showcoursemenu = true; - } - - $courseformat = course_get_format($this->page->course); - // This is a single activity course format, always show the course menu on the activity main page. - if ($context->contextlevel == CONTEXT_MODULE && - !$courseformat->has_view_page()) { - - $this->page->navigation->initialise(); - $activenode = $this->page->navigation->find_active_node(); - // If the settings menu has been forced then show the menu. - if ($this->page->is_settings_menu_forced()) { - $showcoursemenu = true; - } else if (!empty($activenode) && ($activenode->type == navigation_node::TYPE_ACTIVITY || - $activenode->type == navigation_node::TYPE_RESOURCE)) { - - // We only want to show the menu on the first page of the activity. This means - // the breadcrumb has no additional nodes. - if ($currentnode && ($currentnode->key == $activenode->key && $currentnode->type == $activenode->type)) { - $showcoursemenu = true; - } - } - } - - // This is the site front page. - if ($context->contextlevel == CONTEXT_COURSE && - !empty($currentnode) && - $currentnode->key === 'home') { - $showfrontpagemenu = true; - } - - // This is the user profile page. - if ($context->contextlevel == CONTEXT_USER && - !empty($currentnode) && - ($currentnode->key === 'myprofile')) { - $showusermenu = true; - } - - if ($showfrontpagemenu) { - $settingsnode = $this->page->settingsnav->find('frontpage', navigation_node::TYPE_SETTING); - if ($settingsnode) { - // Build an action menu based on the visible nodes from this navigation tree. - $skipped = $this->build_action_menu_from_navigation($menu, $settingsnode, false, true); - - // We only add a list to the full settings menu if we didn't include every node in the short menu. - if ($skipped) { - $text = get_string('morenavigationlinks'); - $url = new moodle_url('/course/admin.php', array('courseid' => $this->page->course->id)); - $link = new action_link($url, $text, null, null, new pix_icon('t/edit', '')); - $menu->add_secondary_action($link); - } - } - } else if ($showcoursemenu) { - $settingsnode = $this->page->settingsnav->find('courseadmin', navigation_node::TYPE_COURSE); - if ($settingsnode) { - // Build an action menu based on the visible nodes from this navigation tree. - $skipped = $this->build_action_menu_from_navigation($menu, $settingsnode, false, true); - - // We only add a list to the full settings menu if we didn't include every node in the short menu. - if ($skipped) { - $text = get_string('morenavigationlinks'); - $url = new moodle_url('/course/admin.php', array('courseid' => $this->page->course->id)); - $link = new action_link($url, $text, null, null, new pix_icon('t/edit', '')); - $menu->add_secondary_action($link); - } - } - } else if ($showusermenu) { - // Get the course admin node from the settings navigation. - $settingsnode = $this->page->settingsnav->find('useraccount', navigation_node::TYPE_CONTAINER); - if ($settingsnode) { - // Build an action menu based on the visible nodes from this navigation tree. - $this->build_action_menu_from_navigation($menu, $settingsnode); - } - } - - return $this->render($menu); - } - - /** - * This is an optional menu that can be added to a layout by a theme. It contains the - * menu for the most specific thing from the settings block. E.g. Module administration. - * - * @return string - */ - public function region_main_settings_menu() { - $context = $this->page->context; - $menu = new action_menu(); - - if ($context->contextlevel == CONTEXT_MODULE) { - - $this->page->navigation->initialise(); - $node = $this->page->navigation->find_active_node(); - $buildmenu = false; - // If the settings menu has been forced then show the menu. - if ($this->page->is_settings_menu_forced()) { - $buildmenu = true; - } else if (!empty($node) && ($node->type == navigation_node::TYPE_ACTIVITY || - $node->type == navigation_node::TYPE_RESOURCE)) { - - $items = $this->page->navbar->get_items(); - $navbarnode = end($items); - // We only want to show the menu on the first page of the activity. This means - // the breadcrumb has no additional nodes. - if ($navbarnode && ($navbarnode->key === $node->key && $navbarnode->type == $node->type)) { - $buildmenu = true; - } - } - if ($buildmenu) { - // Get the course admin node from the settings navigation. - $node = $this->page->settingsnav->find('modulesettings', navigation_node::TYPE_SETTING); - if ($node) { - // Build an action menu based on the visible nodes from this navigation tree. - $this->build_action_menu_from_navigation($menu, $node); - } - } - - } else if ($context->contextlevel == CONTEXT_COURSECAT) { - // For course category context, show category settings menu, if we're on the course category page. - if ($this->page->pagetype === 'course-index-category') { - $node = $this->page->settingsnav->find('categorysettings', navigation_node::TYPE_CONTAINER); - if ($node) { - // Build an action menu based on the visible nodes from this navigation tree. - $this->build_action_menu_from_navigation($menu, $node); - } - } - - } else { - $items = $this->page->navbar->get_items(); - $navbarnode = end($items); - - if ($navbarnode && ($navbarnode->key === 'participants')) { - $node = $this->page->settingsnav->find('users', navigation_node::TYPE_CONTAINER); - if ($node) { - // Build an action menu based on the visible nodes from this navigation tree. - $this->build_action_menu_from_navigation($menu, $node); - } - - } - } - return $this->render($menu); - } - - /** - * Take a node in the nav tree and make an action menu out of it. - * The links are injected in the action menu. - * - * @param action_menu $menu - * @param navigation_node $node - * @param boolean $indent - * @param boolean $onlytopleafnodes - * @return boolean nodesskipped - True if nodes were skipped in building the menu - */ - protected function build_action_menu_from_navigation(action_menu $menu, - navigation_node $node, - $indent = false, - $onlytopleafnodes = false) { - $skipped = false; - // Build an action menu based on the visible nodes from this navigation tree. - foreach ($node->children as $menuitem) { - if ($menuitem->display) { - if ($onlytopleafnodes && $menuitem->children->count()) { - $skipped = true; - continue; - } - if ($menuitem->action) { - if ($menuitem->action instanceof action_link) { - $link = $menuitem->action; - // Give preference to setting icon over action icon. - if (!empty($menuitem->icon)) { - $link->icon = $menuitem->icon; - } - } else { - $link = new action_link($menuitem->action, $menuitem->text, null, null, $menuitem->icon); - } - } else { - if ($onlytopleafnodes) { - $skipped = true; - continue; - } - $link = new action_link(new moodle_url('#'), $menuitem->text, null, ['disabled' => true], $menuitem->icon); - } - if ($indent) { - $link->add_class('ml-4'); - } - if (!empty($menuitem->classes)) { - $link->add_class(implode(" ", $menuitem->classes)); - } - - $menu->add_secondary_action($link); - $skipped = $skipped || $this->build_action_menu_from_navigation($menu, $menuitem, true); - } - } - return $skipped; - } - - /** - * Secure login info. - * - * @return string - */ - public function secure_login_info() { - return $this->login_info(false); - } } diff --git a/classes/output/core_renderer_maintenance.php b/classes/output/core_renderer_maintenance.php deleted file mode 100644 index 4f01057..0000000 --- a/classes/output/core_renderer_maintenance.php +++ /dev/null @@ -1,197 +0,0 @@ -. - - -/** - * Overriden core maintenance renderer. - * - * @package theme_ilb - * @copyright 2016 Frédéric Massart - FMCorz.net - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - */ - -namespace theme_ilb\output; -defined('MOODLE_INTERNAL') || die(); - -use coding_exception; -use moodle_page; -use block_contents; -use stdClass; - -/** - * The maintenance renderer. - * - * @package theme_ilb - * @copyright 2016 Frédéric Massart - FMCorz.net - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - */ -class core_renderer_maintenance extends core_renderer { - - /** - * Initialises the renderer instance. - * - * @param moodle_page $page - * @param string $target - * @throws coding_exception - */ - public function __construct(moodle_page $page, $target) { - if ($target !== RENDERER_TARGET_MAINTENANCE || $page->pagelayout !== 'maintenance') { - throw new coding_exception('Invalid request for the maintenance renderer.'); - } - parent::__construct($page, $target); - } - - /** - * Does nothing. The maintenance renderer cannot produce blocks. - * - * @param block_contents $bc - * @param string $region - * @return string - */ - public function block(block_contents $bc, $region) { - return ''; - } - - /** - * Does nothing. The maintenance renderer cannot produce blocks. - * - * @param string $region - * @param array $classes - * @param string $tag - * @return string - */ - public function blocks($region, $classes = array(), $tag = 'aside') { - return ''; - } - - /** - * Does nothing. The maintenance renderer cannot produce blocks. - * - * @param string $region - * @return string - */ - public function blocks_for_region($region) { - return ''; - } - - /** - * Does nothing. The maintenance renderer cannot produce a course content header. - * - * @param bool $onlyifnotcalledbefore - * @return string - */ - public function course_content_header($onlyifnotcalledbefore = false) { - return ''; - } - - /** - * Does nothing. The maintenance renderer cannot produce a course content footer. - * - * @param bool $onlyifnotcalledbefore - * @return string - */ - public function course_content_footer($onlyifnotcalledbefore = false) { - return ''; - } - - /** - * Does nothing. The maintenance renderer cannot produce a course header. - * - * @return string - */ - public function course_header() { - return ''; - } - - /** - * Does nothing. The maintenance renderer cannot produce a course footer. - * - * @return string - */ - public function course_footer() { - return ''; - } - - /** - * Does nothing. The maintenance renderer cannot produce a custom menu. - * - * @param string $custommenuitems - * @return string - */ - public function custom_menu($custommenuitems = '') { - return ''; - } - - /** - * Does nothing. The maintenance renderer cannot produce a file picker. - * - * @param array $options - * @return string - */ - public function file_picker($options) { - return ''; - } - - /** - * Does nothing. The maintenance renderer cannot produce and HTML file tree. - * - * @param array $dir - * @return string - */ - public function htmllize_file_tree($dir) { - return ''; - - } - - /** - * Does nothing. The maintenance renderer does not support JS. - * - * @param block_contents $bc - */ - public function init_block_hider_js(block_contents $bc) { - // Does nothing. - } - - /** - * Does nothing. The maintenance renderer cannot produce language menus. - * - * @return string - */ - public function lang_menu() { - return ''; - } - - /** - * Does nothing. The maintenance renderer has no need for login information. - * - * @param null $withlinks - * @return string - */ - public function login_info($withlinks = null) { - return ''; - } - - /** - * Does nothing. The maintenance renderer cannot produce user pictures. - * - * @param stdClass $user - * @param array $options - * @return string - */ - public function user_picture(stdClass $user, array $options = null) { - return ''; - } -} diff --git a/classes/output/gradereport_history_renderer.php b/classes/output/gradereport_history_renderer.php deleted file mode 100644 index 22d10cd..0000000 --- a/classes/output/gradereport_history_renderer.php +++ /dev/null @@ -1,44 +0,0 @@ -. - -/** - * Overriden gradereport_history renderer. - * - * @package theme_ilb - * @copyright 2016 Frédéric Massart - FMCorz.net - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - */ - -namespace theme_ilb\output; -defined('MOODLE_INTERNAL') || die(); - -use gradereport_history\output\user_button; - -/** - * Overriden gradereport_history renderer. - * - * @package theme_ilb - * @copyright 2016 Frédéric Massart - FMCorz.net - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - */ -class gradereport_history_renderer extends \gradereport_history\output\renderer { - - public function render_user_button(user_button $button) { - $data = $button->export_for_template($this); - return $this->render_from_template('gradereport_history/user_button', $data); - } - -} diff --git a/scss/bootstrap/utilities/_position.scss b/scss/bootstrap/utilities/_position.scss index 7fe792c..183bca2 100644 --- a/scss/bootstrap/utilities/_position.scss +++ b/scss/bootstrap/utilities/_position.scss @@ -27,10 +27,8 @@ $positions: static, relative, absolute, fixed, sticky; z-index: $zindex-fixed; } -// .sticky-top { -// @supports (position: sticky) { -// position: sticky; -// top: 0; -// z-index: $zindex-sticky; -// } -// } +.sticky-top { + position: sticky; + top: 0; + z-index: $zindex-sticky; +} diff --git a/templates/block_search_forums/search_form.mustache b/templates/block_search_forums/search_form.mustache deleted file mode 100644 index 0dc8b87..0000000 --- a/templates/block_search_forums/search_form.mustache +++ /dev/null @@ -1,18 +0,0 @@ -
-
- -
- - -
- -
-
-
-
- {{#str}}advancedsearch, block_search_forums{{/str}} - {{#helpicon}} - {{>core/help_icon}} - {{/helpicon}} -
-
diff --git a/templates/block_settings/search_form.mustache b/templates/block_settings/search_form.mustache deleted file mode 100644 index 765122a..0000000 --- a/templates/block_settings/search_form.mustache +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/templates/core/action_menu.mustache b/templates/core/action_menu.mustache deleted file mode 100644 index ab38eba..0000000 --- a/templates/core/action_menu.mustache +++ /dev/null @@ -1,55 +0,0 @@ -{{! - 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 core/action_menu - - Action menu. - - Example context (json): - { - "classes": "", - "primary": { - "items": [{"rawhtml": "

Item in primary menu

"}] - }, - "secondary": { - "items": [{"rawhtml": "

Item in secondary menu

"}] - } - } -}} -
- {{#primary}} - -
- - {{#prioritise}}{{> core/action_menu_trigger }}{{/prioritise}} - - {{#items}} -
- {{> core/action_menu_item }} -
- {{/items}} - - {{^prioritise}} -
- {{> core/action_menu_trigger }} -
- {{/prioritise}} - -
- - {{/primary}} -
diff --git a/templates/core/action_menu_item.mustache b/templates/core/action_menu_item.mustache deleted file mode 100644 index a2d00da..0000000 --- a/templates/core/action_menu_item.mustache +++ /dev/null @@ -1,31 +0,0 @@ -{{! - 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 core/action_menu_item - - Action menu item. - - Example context (json): - { - "rawhtml": "

[rawhtml]

" - } -}} -{{#actionmenulink}}{{> core/action_menu_link }}{{/actionmenulink}} -{{#actionmenufiller}} {{/actionmenufiller}} -{{#actionlink}}{{> core/action_link }}{{/actionlink}} -{{#pixicon}}{{#pix}}{{key}}, {{component}}, {{title}}{{/pix}}{{/pixicon}} -{{#rawhtml}}{{{.}}}{{/rawhtml}} diff --git a/templates/core/action_menu_link.mustache b/templates/core/action_menu_link.mustache deleted file mode 100644 index 0e9f42a..0000000 --- a/templates/core/action_menu_link.mustache +++ /dev/null @@ -1,34 +0,0 @@ -{{! - 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 core/action_menu_link - - Action menu link. - - Example context (json): - { - "text": "Example link text", - "showtext": true, - "url": "http://example.com/link" - } -}} -{{^disabled}} - {{#icon}}{{#pix}}{{key}}, {{component}}, {{title}}{{/pix}}{{/icon}}{{#showtext}}{{{text}}}{{/showtext}} -{{/disabled}} -{{#disabled}} - {{#icon}}{{#pix}}{{key}},{{component}},{{title}}{{/pix}}{{/icon}}{{{text}}} -{{/disabled}} diff --git a/templates/core/action_menu_trigger.mustache b/templates/core/action_menu_trigger.mustache deleted file mode 100644 index 8efab38..0000000 --- a/templates/core/action_menu_trigger.mustache +++ /dev/null @@ -1,120 +0,0 @@ -{{! - 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 core/action_menu_trigger - - Action menu trigger. - - Example context (json): - { - "text": "Example link text", - "title": "Example link title", - "url": "http://example.com/link", - "classes": "icon menu-action", - "instance": "1", - "triggerextraclasses": "", - "attributes": [ - {"name": "role", "value": "menuitem" }, - {"name": "data-title", "value": "mymoodle,admin" } - ], - "secondary": { - "classes": "menu align-tr-br", - "attributes": [ - {"name": "id", "value": "action-menu-0-menu"}, - {"name": "data-rel", "value": "menu-content"}, - {"name": "role", "value": "menu"}, - {"name": "data-align", "value": "tr-br"} - ], - "items": [ - {"actionmenulink": - { - "id": "action_link59ecf8394a68078", - "disabled": false, - "text": "Dashboard", - "url": "http://example.com/link", - "icon": { - "key": "i/dashboard", - "component": null, - "title": "Dashboard" - }, - "classes": "icon menu-action", - "attributes": [ - {"name": "role", "value": "menuitem"}, - {"name": "data-title", "value": "mymoodle,admin"} - ], - "instance": 1, - "showtext": true - } - }, - {"actionmenufiller": - { - "id": "action_link59ecf8394a68079", - "disabled": false, - "text": "", - "url": "", - "icon": null, - "classes": "", - "attributes": [ - {"name": "role", "value": "menuitem"} - ] - } - } - ] - } - } -}} - diff --git a/templates/core/auth_digital_minor_page.mustache b/templates/core/auth_digital_minor_page.mustache deleted file mode 100644 index a2fac7b..0000000 --- a/templates/core/auth_digital_minor_page.mustache +++ /dev/null @@ -1,58 +0,0 @@ -{{! - 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 core_auth/output/digital_minor_page - - Example context (json): - { - "logourl": "https://moodle.org/logo/moodle-logo.svg", - "sitename": "Site name", - "supportname": "John Doe", - "supportemail": "johndoe@example.com", - "homelink": "/" - } -}} -
-
-
-
-
-
- {{#logourl}} -

{{sitename}}

- {{/logourl}} - {{^logourl}} -

{{sitename}}

- {{/logourl}} -
-
-
-

{{#str}}considereddigitalminor{{/str}}

-
-
-

{{#str}}digitalminor_desc{{/str}}

-

{{{supportname}}}

-

{{{supportemail}}}

-
- -
-
-
-
-
diff --git a/templates/core/auth_verify_age_location_page.mustache b/templates/core/auth_verify_age_location_page.mustache deleted file mode 100644 index c462587..0000000 --- a/templates/core/auth_verify_age_location_page.mustache +++ /dev/null @@ -1,64 +0,0 @@ -{{! - 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 core_auth/output/verify_age_location_page - - Example context (json): - { - "logourl": "https://moodle.org/logo/moodle-logo.svg", - "sitename": "Site name", - "error": "Error message", - "formhtml": "(Form html would go here)" - } -}} -
-
-
-
-
-
- {{#logourl}} -

{{sitename}}

- {{/logourl}} - {{^logourl}} -

{{sitename}}

- {{/logourl}} -
-
- {{#error}} - - {{/error}} -
-

{{#str}}agelocationverification{{/str}}

-
-
- {{{formhtml}}} -
-
-
-

{{#str}}whyisthisrequired{{/str}}

-
-
-

{{#str}}explanationdigitalminor{{/str}}

-
-
-
-
-
-
diff --git a/templates/core/availability_info.mustache b/templates/core/availability_info.mustache deleted file mode 100644 index 56cf9c3..0000000 --- a/templates/core/availability_info.mustache +++ /dev/null @@ -1,61 +0,0 @@ -{{! - 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 core/availability_info - - Renders the availability info on the course outline page. - - Availability info can be displayed for activity modules or whole course - sections. Activity modules can be either hidden from students, or available - but not shown on course page (stealth), or the access can be restricted by - configured conditions. Sections can be hidden. - - Classes required for JS: - * none - - Data attributes required for JS: - * none - - Context variables required for this template: - * classes String list of CSS classes for the wrapping element - * text HTML formatted text with the actual availability information - * ishidden Boolean flag indiciating that the item is hidden from students - * isstealth Boolean flag indicating that the item is in stealth mode - * isrestricted Boolean flag indicating that restricted access conditions apply - * isfullinfo Boolean flag indicating that the full list of restricted - access conditions is displayed (aka teacher's view). - - Example context (json): - { - "classes": "", - "text": "Not available unless:
  • It is on or after 8 June 2012
", - "ishidden": 0, - "isstealth": 0, - "isrestricted": 1, - "isfullinfo": 1 - } -}} -{{#text}} -
- {{^isrestricted}} - {{{text}}} - {{/isrestricted}} - {{#isrestricted}} - {{#str}}restricted, core{{/str}} {{{text}}} - {{/isrestricted}} -
-{{/text}} diff --git a/templates/core/block.mustache b/templates/core/block.mustache deleted file mode 100644 index 2791c07..0000000 --- a/templates/core/block.mustache +++ /dev/null @@ -1,63 +0,0 @@ -{{! - @template theme_ilb/block - - Example context (json): - { - "id": "block0", - "showskiplink": true, - "type": "html", - "ariarole": "complementary", - "title": "Test block", - "blockinstanceid": 1, - "content": "

Hello block world!

" - } - -}} -{{! Block Skip Link }} -{{#showskiplink}} - {{#str}}skipa, access, {{title}}{{/str}} -{{/showskiplink}} - -{{! Start Block Container }} -
- - {{! Block contents }} -
- - {{! Block header }} - {{#title}} -
{{{title}}}
- {{/title}} - - {{#hascontrols}} -
- {{{controls}}} -
- {{/hascontrols}} - -
- {{{content}}} - - {{{annotation}}} -
- -
- -{{! End Block Container }} -
- -{{! Block Skip Link Target }} -{{#showskiplink}} - -{{/showskiplink}} diff --git a/templates/core/chooser.mustache b/templates/core/chooser.mustache deleted file mode 100644 index 5396e29..0000000 --- a/templates/core/chooser.mustache +++ /dev/null @@ -1,80 +0,0 @@ -{{! - 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 core/chooser - - Chooser. - - Example context (json): - { - "title": "Chooser title", - "method": "post", - "actionurl": "http://example.org/test", - "instructions": "Choose one:", - "paramname": "param", - "sections": [{ - "id": "section-1", - "label": "Section one", - "items": [{ - "label": "item one", - "description": "description one" - }] - }] - } -}} -
- {{title}} -
- -
-
-
-
-
- {{#params}} - - {{/params}} - -
- -
-
- {{instructions}} -
-
- {{#sections}} -
- -
- {{#items}} - {{>core/chooser_item}} - {{/items}} - {{/sections}} -
-
- -
- - -
- -
-
-
-
diff --git a/templates/core/columns-1to1to1.mustache b/templates/core/columns-1to1to1.mustache deleted file mode 100644 index adb1038..0000000 --- a/templates/core/columns-1to1to1.mustache +++ /dev/null @@ -1,48 +0,0 @@ -{{! - 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 core/columns-1to1to1 - - Moodle columns-1to1to1 template. - - The purpose of this template is to render a template with 3 columns. - On mobile the columns stack underneath each other. - - Classes required for JS: - * none - - Data attributes required for JS: - * none - - Context variables required for this template: - * col1content Column 1 contents. - * col2content Column 2 contents. - * col3content Column 3 contents. - - Example context (json): - { - "col1content": "
1. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam pellentesque id urna sit amet tempor.
", - "col2content": "
2. Donec lacus nisl, molestie eget sodales non, sodales et nibh. Praesent dignissim placerat sodales.
", - "col3content": "
3. Praesent sit amet ante odio. In mollis nisl at mi bibendum venenatis.
" - } - -}} -
-
{{$ column1 }}{{{ col1content }}}{{/ column1 }}
-
{{$ column2 }}{{{ col2content }}}{{/ column2 }}
-
{{$ column3 }}{{{ col3content }}}{{/ column3 }}
-
diff --git a/templates/core/columns-1to2.mustache b/templates/core/columns-1to2.mustache deleted file mode 100644 index 114efcb..0000000 --- a/templates/core/columns-1to2.mustache +++ /dev/null @@ -1,45 +0,0 @@ -{{! - 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 core/columns-1to2 - - Moodle columns-1to2 template. - - The purpose of this template is to render 2 columns where the second column has twice the width of the first one. - On mobile the second column collapses underneath the first. - - Classes required for JS: - * none - - Data attributes required for JS: - * none - - Context variables required for this template: - * col1content Column 1 contents. - * col2content Column 2 contents. - - Example context (json): - { - "col1content": "
1. Lorem ipsum dolor sit amet, consectetur adipiscing elit. In porttitor vulputate turpis, quis tempor arcu.
", - "col2content": "
2. Vivamus ac orci in velit fringilla aliquam a a nisl. Cras luctus quam laoreet magna pulvinar aliquet.
" - } - -}} -
-
{{$ column1 }}{{{ col1content }}}{{/ column1 }}
-
{{$ column2 }}{{{ col2content }}}{{/ column2 }}
-
diff --git a/templates/core/columns-2to1.mustache b/templates/core/columns-2to1.mustache deleted file mode 100644 index 68f6e76..0000000 --- a/templates/core/columns-2to1.mustache +++ /dev/null @@ -1,44 +0,0 @@ -{{! - 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 core/columns-2to1 - - Moodle columns-2to1 template. - - The purpose of this template is to render 2 columns where the first column has twice the width of the second one. - On mobile the second column collapses underneath the first. - - Classes required for JS: - * none - - Data attributes required for JS: - * none - - Context variables required for this template: - * col1content Column 1 contents. - * col2content Column 2 contents. - - Example context (json): - { - "col1content": "
1. Lorem ipsum dolor sit amet, consectetur adipiscing elit. In porttitor vulputate turpis, quis tempor arcu.
", - "col2content": "
2. Vivamus ac orci in velit fringilla aliquam a a nisl. Cras luctus quam laoreet magna pulvinar aliquet.
" - } -}} -
-
{{$ column1 }}{{{ col1content }}}{{/ column1 }}
-
{{$ column2 }}{{{ col2content }}}{{/ column2 }}
-
diff --git a/templates/core/custom_menu_item.mustache b/templates/core/custom_menu_item.mustache deleted file mode 100644 index 9bcc29e..0000000 --- a/templates/core/custom_menu_item.mustache +++ /dev/null @@ -1,24 +0,0 @@ -{{^divider}} -{{#haschildren}} - -{{/haschildren}} -{{^haschildren}} - -{{/haschildren}} -{{/divider}} diff --git a/templates/core/dataformat_selector.mustache b/templates/core/dataformat_selector.mustache deleted file mode 100644 index 569bc36..0000000 --- a/templates/core/dataformat_selector.mustache +++ /dev/null @@ -1,55 +0,0 @@ -{{! - 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 core/dataformat_selector - - Context variables required for this template: - * label - * base - * name - * params - * options - * sesskey - * submit - - Example context (json): - { - "base": "http://example.org/", - "name": "test", - "value": "test", - "label": "Download table data as", - "params": false, - "options": [{"label": "CSV", "name": "csv"}, {"label": "Excel", "name": "excel"}], - "submit": "Download", - "sesskey": "" - } -}} -
-
- - - - - {{#params}} - - {{/params}} -
-
diff --git a/templates/core/filemanager_confirmdialog.mustache b/templates/core/filemanager_confirmdialog.mustache deleted file mode 100644 index 740806e..0000000 --- a/templates/core/filemanager_confirmdialog.mustache +++ /dev/null @@ -1,5 +0,0 @@ -
-

- - -
\ No newline at end of file diff --git a/templates/core/filemanager_default_searchform.mustache b/templates/core/filemanager_default_searchform.mustache deleted file mode 100644 index 21e5223..0000000 --- a/templates/core/filemanager_default_searchform.mustache +++ /dev/null @@ -1,4 +0,0 @@ - \ No newline at end of file diff --git a/templates/core/filemanager_fileselect.mustache b/templates/core/filemanager_fileselect.mustache deleted file mode 100644 index 64fb76e..0000000 --- a/templates/core/filemanager_fileselect.mustache +++ /dev/null @@ -1,65 +0,0 @@ -
-
- {{#pix}}i/loading_small{{/pix}} -
-
-
- - - - {{{helpicon}}} - - -
- -
- -
-
-
- -
- -
-
- -
- -
-
-
- -
- -
-
-
- -
- {{#pix}}i/loading_small{{/pix}} {{#str}}loading, repository{{/str}} -
-
-
- -
-

- {{#pix}}i/loading_small{{/pix}} {{#str}}loading, repository{{/str}} -
    -
    -
    -
    - - -
    -
    -
    -
    -

    -
    -
    {{#str}}lastmodified, repository{{/str}}
    -
    {{#str}}datecreated, repository{{/str}}
    -
    {{#str}}size, repository{{/str}}
    -
    {{#str}}dimensions, repository{{/str}}
    -
    -
    -
    diff --git a/templates/core/filemanager_loginform.mustache b/templates/core/filemanager_loginform.mustache deleted file mode 100644 index c9d6cae..0000000 --- a/templates/core/filemanager_loginform.mustache +++ /dev/null @@ -1,43 +0,0 @@ -{{! - @template core/filemanager_loginform - - This template is actually a template which is then used by YUI JS to - generate the markup, so it doesn't make much sense on its own. - - Example context (json): {} -}} - diff --git a/templates/core/filemanager_modal_generallayout.mustache b/templates/core/filemanager_modal_generallayout.mustache deleted file mode 100644 index 7a16342..0000000 --- a/templates/core/filemanager_modal_generallayout.mustache +++ /dev/null @@ -1,63 +0,0 @@ - \ No newline at end of file diff --git a/templates/core/filemanager_page_generallayout.mustache b/templates/core/filemanager_page_generallayout.mustache deleted file mode 100644 index c010fbe..0000000 --- a/templates/core/filemanager_page_generallayout.mustache +++ /dev/null @@ -1,58 +0,0 @@ -
    -
    - {{{restrictions}}} - - {{#str}}dndnotsupported_insentence{{/str}}{{{helpicon}}} -
    - -
    {{#pix}}i/loading_small{{/pix}}{{#str}}loadinghelp{{/str}}
    -
    -
    -
    -
    -
    {{#str}}dndenabled_inbox{{/str}}
    -
    -
    {{#str}}droptoupload{{/str}}
    -
    -
    {{#pix}}i/loading_small{{/pix}}{{#str}}loadinghelp{{/str}}
    -
    -
    {{#pix}}i/loading_small{{/pix}}{{#str}}loadinghelp{{/str}}
    -
    -
    diff --git a/templates/core/filemanager_processexistingfile.mustache b/templates/core/filemanager_processexistingfile.mustache deleted file mode 100644 index 18714ac..0000000 --- a/templates/core/filemanager_processexistingfile.mustache +++ /dev/null @@ -1,8 +0,0 @@ -
    -

    -
    - - - -
    -
    \ No newline at end of file diff --git a/templates/core/filemanager_processexistingfilemultiple.mustache b/templates/core/filemanager_processexistingfilemultiple.mustache deleted file mode 100644 index aae3125..0000000 --- a/templates/core/filemanager_processexistingfilemultiple.mustache +++ /dev/null @@ -1,9 +0,0 @@ - \ No newline at end of file diff --git a/templates/core/filemanager_selectlayout.mustache b/templates/core/filemanager_selectlayout.mustache deleted file mode 100644 index d27da6e..0000000 --- a/templates/core/filemanager_selectlayout.mustache +++ /dev/null @@ -1,66 +0,0 @@ -
    -
    - {{#str}}loadinghelp{{/str}} - {{#pix}}i/loading_small{{/pix}} -
    -
    -
    -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    -
    - - -
    -
    -
    -
    -
    -
    -

    -
    -
    {{#str}}lastmodified, repository{{/str}}
    -
    {{#str}}datecreated, repository{{/str}}
    -
    {{#str}}size, repository{{/str}}
    -
    {{#str}}license, repository{{/str}}
    -
    {{#str}}author, repository{{/str}}
    -
    {{#str}}dimensions, repository{{/str}}
    -
    -
    -
    diff --git a/templates/core/filemanager_uploadform.mustache b/templates/core/filemanager_uploadform.mustache deleted file mode 100644 index b3aec8e..0000000 --- a/templates/core/filemanager_uploadform.mustache +++ /dev/null @@ -1,29 +0,0 @@ -
    -
    -
    -
    -
    - -
    - -
    -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    -
    -
    - -
    -
    -
    \ No newline at end of file diff --git a/templates/core/form_autocomplete_input.mustache b/templates/core/form_autocomplete_input.mustache deleted file mode 100644 index ea4614d..0000000 --- a/templates/core/form_autocomplete_input.mustache +++ /dev/null @@ -1,53 +0,0 @@ -{{! - 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 core/form_autocomplete_input - - Moodle template for the input field in an autocomplate form element. - - Classes required for JS: - * none - - Data attributes required for JS: - * none - - Context variables required for this template: - * inputId The dom id of this input field. - * suggestionsId The dom id of the suggestions list. - * selectionId The dom id of the current selection list. - * downArrowId The dom id of the down arrow to open the suggestions. - * placeholder The place holder text when the field is empty - - Example context (json): - { "inputID": 1, "suggestionsId": 2, "selectionId": 3, "downArrowId": 4, "placeholder": "Select something" } -}} -{{#showSuggestions}} - -{{/showSuggestions}} -{{^showSuggestions}} - -{{/showSuggestions}} - -{{#js}} -require(['jquery'], function($) { - // Set the minimum width of the input so that the placeholder is whole displayed. - var inputElement = $(document.getElementById('{{inputId}}')); - if (inputElement.length) { - inputElement.css('min-width', inputElement.attr('placeholder').length + 'ch'); - } -}); -{{/js}} diff --git a/templates/core/form_autocomplete_selection.mustache b/templates/core/form_autocomplete_selection.mustache deleted file mode 100644 index 5413dc3..0000000 --- a/templates/core/form_autocomplete_selection.mustache +++ /dev/null @@ -1,50 +0,0 @@ -{{! - 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 core/form_autocomplete_selection - - Moodle template for the currently selected items in an autocomplate form element. - - Classes required for JS: - * none - - Data attributes required for JS: - * none - - Context variables required for this template: - * multiple True if this field allows multiple selections - * selectionId The dom id of the current selection list. - * items List of items with label and value fields. - * noSelectionString String to use when no items are selected - - Example context (json): - { "multiple": true, "selectionId": 1, "items": [ - { "label": "Item label with tags", "value": "5" }, - { "label": "Another item label with tags", "value": "4" } - ], "noSelectionString": "No selection" } -}} -
    -{{#str}}selecteditems, form{{/str}} - {{#items}} - - {{#multiple}}{{/multiple}}{{{label}}} - - {{/items}} - {{^items}} - {{noSelectionString}} - {{/items}} -
    diff --git a/templates/core/help_icon.mustache b/templates/core/help_icon.mustache deleted file mode 100644 index a52440b..0000000 --- a/templates/core/help_icon.mustache +++ /dev/null @@ -1,25 +0,0 @@ -{{! - @template core/help_icon - - Help icon. - - Example context (json): - { - "title": "Help with something", - "url": "http://example.org/help", - "linktext": "", - "icon":{ - "attributes": [ - {"name": "class", "value": "iconhelp"}, - {"name": "src", "value": "../../../pix/help.svg"}, - {"name": "alt", "value": "Help icon"} - ] - } - } -}} - - {{#pix}}help, core, {{{alt}}}{{/pix}} - diff --git a/templates/core/initials_bar.mustache b/templates/core/initials_bar.mustache deleted file mode 100644 index 7f02e93..0000000 --- a/templates/core/initials_bar.mustache +++ /dev/null @@ -1,106 +0,0 @@ -{{! - 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 core/initials_bar - - Initials bar. - - Example context (json): - { - "title": "First name", - "class": "firstinitial", - "current": "A", - "url": "http://moodle.generic32/report/progress/index.php?course=2&sifirst", - "all": "All", - "group": [ - { - "letter": [ - { - "name": "A", - "url": "http://moodle.generic32/report/progress/index.php?course=2&sifirst=A" - }, - { - "name": "B", - "url": "http://moodle.generic32/report/progress/index.php?course=2&sifirst=B" - }, - { - "name": "C", - "url": "http://moodle.generic32/report/progress/index.php?course=2&sifirst=C" - }, - { - "name": "D", - "url": "http://moodle.generic32/report/progress/index.php?course=2&sifirst=D" - } - - ] - }, - { - "letter": [ - { - "name": "W", - "url": "http://moodle.generic32/report/progress/index.php?course=2&sifirst=W", - "selected": "W" - }, - { - "name": "X", - "url": "http://moodle.generic32/report/progress/index.php?course=2&sifirst=X" - }, - { - "name": "Y", - "url": "http://moodle.generic32/report/progress/index.php?course=2&sifirst=Y" - }, - { - "name": "Z", - "url": "http://moodle.generic32/report/progress/index.php?course=2&sifirst=Z" - } - - ] - } - ] - } -}} -
    - {{title}} - -
    -
      - {{#current}} -
    • - {{all}} -
    • - {{/current}} - {{^current}} -
    • - {{all}} -
    • - {{/current}} -
    - {{#group}} -
      - {{#letter}} - {{#selected}} -
    • {{name}}
    • - {{/selected}} - {{^selected}} -
    • {{name}}
    • - {{/selected}} - {{/letter}} -
    - {{/group}} -
    -
    - diff --git a/templates/core/loginform.mustache b/templates/core/loginform.mustache deleted file mode 100644 index 452dd66..0000000 --- a/templates/core/loginform.mustache +++ /dev/null @@ -1,244 +0,0 @@ -{{! - 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 core/loginform - - Moodle template for the login page. - - Context variables required for this template: - * autofocusform: Auto focus on form ?, - * canloginasguest - Is guest login allowed?, - * canloginbyemail - Is login by email allowed?, - * cansignup - Signup allowed?, - * cookieshelpicon - cookies help icon details - * error - Any errors in the form?, - * forgotpasswordurl - Forgot password url, - * hasidentityproviders - Flag, set to true to hide identity providers, - * hasinstructions - Flag, set to true to show instructions, - * identityproviders - List of identiy providers, - * instructions - Instructions, - * instructionsformat - Format of instructions, - * loginurl - Login url, - * rememberusername - Remeber username?, - * signupurl - Signup url, - * cookieshelpiconformatted - Formatted html of cookies help icon, - * errorformatted - Formatted error, - * logourl - Flag, logo url, - * sitename - Name of site. - * logintoken - Random token to protect login request. - - Example context (json): - { - "autofocusform": false, - "canloginasguest": "1", - "canloginbyemail": false, - "cansignup": true, - "cookieshelpicon": { - "heading": "Cookies must be enabled in your browser", - "text": "
    Two cookies are used on this site. Both died..
    ", - "icon": { - "attributes": [ - { - "name": "class", - "value": "iconhelp" - }, - { - "name": "alt", - "value": "Help with Cookies must be enabled in your browser" - }, - { - "name": "title", - "value": "Help with Cookies must be enabled in your browser" - }, - { - "name": "src", - "value": "http://localhost/stable_master/theme/image.php?theme=ilb&component=core&image=help" - } - ] - }, - "linktext": null, - "title": "Help with Cookies must be enabled in your browser", - "url": "http://localhost/stable_master/help.php?component=core&identifier=cookiesenabled&lang=en", - "ltr": true - }, - "error": "", - "forgotpasswordurl": "http://localhost/stable_master/login/forgot_password.php", - "hasidentityproviders": false, - "hasinstructions": true, - "identityproviders": [], - "instructions": "For full access to this site, you first need to create an account.", - "instructionsformat": "1", - "loginurl": "http://localhost/stable_master/login/index.php", - "rememberusername": true, - "signupurl": "http://localhost/stable_master/login/signup.php", - "cookieshelpiconformatted": "", - "errorformatted": "", - "logourl": false, - "sitename": "Beer & Chips", - "logintoken": "randomstring" - } -}} - -
    -
    -
    -
    -
    - {{#logourl}} -

    {{sitename}}

    - {{/logourl}} - {{^logourl}} -

    {{sitename}}

    - {{/logourl}} -
    - {{#cansignup}} - - {{/cansignup}} - - {{#error}} -
    - {{error}} - -
    - {{/error}} - -
    -
    -
    - - - -
    - - -
    -
    - - -
    - {{#rememberusername}} -
    - - -
    - {{/rememberusername}} - - -
    -
    - -
    - - -
    - {{#str}} cookiesenabled {{/str}} - {{{cookieshelpiconformatted}}} -
    - {{#canloginasguest}} -
    -

    {{#str}}someallowguest{{/str}}

    -
    - - - - -
    -
    - {{/canloginasguest}} - - {{#hasidentityproviders}} -
    {{#str}} potentialidps, auth {{/str}}
    -
    - {{#identityproviders}} - - {{/identityproviders}} -
    - {{/hasidentityproviders}} -
    -
    -
    -
    -
    -
    -
    - - -{{#hasinstructions}} -
    -
    -
    -
    -
    -

    {{#str}}firsttime{{/str}}

    -
    -
    - {{{instructions}}} - {{#cansignup}} -
    - -
    - {{/cansignup}} -
    -
    -
    -
    -
    -{{/hasinstructions}} - -{{#js}} - {{#error}} - require(['jquery'], function($) { - $('#loginerrormessage').focus(); - }); - {{/error}} - {{^error}} - {{#autofocusform}} - require(['jquery'], function($) { - if ($('#username').val()) { - $('#password').focus(); - } else { - $('#username').focus(); - } - }); - {{/autofocusform}} - {{/error}} -{{/js}} diff --git a/templates/core/modal.mustache b/templates/core/modal.mustache deleted file mode 100644 index 1e8586b..0000000 --- a/templates/core/modal.mustache +++ /dev/null @@ -1,67 +0,0 @@ -{{! - 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 core/modal - - Moodle modal template. - - The purpose of this template is to render a modal - - Classes required for JS: - * none - - Data attributes required for JS: - * none - - Context variables required for this template: - * title A cleaned string (use clean_text()) to display. - * body HTML content for the boday - * footer HTML content for the footer - - Example context (json): - { - "title": "Example modal", - "body": "Some example content for the body", - "footer": "Footer text, right here!" - } -}} - - diff --git a/templates/core/modal_backdrop.mustache b/templates/core/modal_backdrop.mustache deleted file mode 100644 index 6b12f22..0000000 --- a/templates/core/modal_backdrop.mustache +++ /dev/null @@ -1,36 +0,0 @@ -{{! - 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 core/modal_backdrop - - Moodle modal backdrop template. - - The purpose of this template is to render a modal - - Classes required for JS: - * none - - Data attributes required for JS: - * none - - Context variables required for this template: - * none - - Example context (json): - {} -}} - diff --git a/templates/core/navbar.mustache b/templates/core/navbar.mustache deleted file mode 100644 index 2998888..0000000 --- a/templates/core/navbar.mustache +++ /dev/null @@ -1,79 +0,0 @@ -{{! - 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 core/navbar - - Navbar template. - - Classes required for JS: - * none - - Data attributes required for JS: - * none - - Context variables required for this template: - * get_items - array of items - * has_action - boolean - * action - string - * get_title - string - * get_content - string - * is_hidden - boolean - - Example context (json): - { - "get_items": [ - { - "has_action": true, - "action": "#", - "get_title": "Test title", - "get_content": "First & fresh", - "is_hidden": false - }, - { - "has_action": true, - "action": "#", - "get_title": "Second item & a title", - "get_content": "Second item", - "is_hidden": false - }, - { - "has_action": false, - "get_content": "Third item", - "is_hidden": false - }, - { - "has_action": false, - "get_content": "Fourth & last", - "is_hidden": true - } - ] - } -}} - diff --git a/templates/core/notification_error.mustache b/templates/core/notification_error.mustache deleted file mode 100644 index 3d05b42..0000000 --- a/templates/core/notification_error.mustache +++ /dev/null @@ -1,44 +0,0 @@ -{{! - 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 core/notification_error - - Moodle notification template. - - The purpose of this template is to render an error notification. - - Classes required for JS: - * none - - Data attributes required for JS: - * none - - Context variables required for this template: - * message A cleaned string (use clean_text()) to display. - * extraclasses Additional classes to apply to the notification. - * closebutton Whether a close button should be displayed to dismiss the message. - * announce Whether the notification should be announced to screen readers. - - Example context (json): - { "message": "Your pants are on fire!", "closebutton": 1, "announce": 1, "extraclasses": "foo bar"} -}} - diff --git a/templates/core/notification_info.mustache b/templates/core/notification_info.mustache deleted file mode 100644 index 692751f..0000000 --- a/templates/core/notification_info.mustache +++ /dev/null @@ -1,45 +0,0 @@ -{{! - 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 core/notification_info - - Moodle notification template. - - The purpose of this template is to render an info notification. - - Classes required for JS: - * none - - Data attributes required for JS: - * none - - Context variables required for this template: - * message A cleaned string (use clean_text()) to display. - * extraclasses Additional classes to apply to the notification. - * closebutton Whether a close button should be displayed to dismiss the message. - * announce Whether the notification should be announced to screen readers. - - Example context (json): - { "message": "Your pants are on fire!", "closebutton": 1, "announce": 1, "extraclasses": "foo bar"} -}} - - diff --git a/templates/core/notification_success.mustache b/templates/core/notification_success.mustache deleted file mode 100644 index b33f4aa..0000000 --- a/templates/core/notification_success.mustache +++ /dev/null @@ -1,44 +0,0 @@ -{{! - 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 core/notification_success - - Moodle notification template. - - The purpose of this template is to render a success notification. - - Classes required for JS: - * none - - Data attributes required for JS: - * none - - Context variables required for this template: - * message A cleaned string (use clean_text()) to display. - * extraclasses Additional classes to apply to the notification. - * closebutton Whether a close button should be displayed to dismiss the message. - * announce Whether the notification should be announced to screen readers. - - Example context (json): - { "message": "Your pants are on fire!", "closebutton": 1, "announce": 1, "extraclasses": "foo bar"} -}} - diff --git a/templates/core/notification_warning.mustache b/templates/core/notification_warning.mustache deleted file mode 100644 index e3f8bda..0000000 --- a/templates/core/notification_warning.mustache +++ /dev/null @@ -1,44 +0,0 @@ -{{! - 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 core/notification_warning - - Moodle notification template. - - The purpose of this template is to render a warning notification. - - Classes required for JS: - * none - - Data attributes required for JS: - * none - - Context variables required for this template: - * message A cleaned string (use clean_text()) to display. - * extraclasses Additional classes to apply to the notification. - * closebutton Whether a close button should be displayed to dismiss the message. - * announce Whether the notification should be announced to screen readers. - - Example context (json): - { "message": "Your pants are on fire!", "closebutton": 1, "announce": 1, "extraclasses": "foo bar"} -}} - diff --git a/templates/core/preferences_groups.mustache b/templates/core/preferences_groups.mustache deleted file mode 100644 index de16bc4..0000000 --- a/templates/core/preferences_groups.mustache +++ /dev/null @@ -1,17 +0,0 @@ - -
    - {{#groups}} -
    -
    -
    -

    {{title}}

    -
    - {{#nodes}} - - {{/nodes}} -
    -
    -
    -
    - {{/groups}} -
    diff --git a/templates/core/progress_bar.mustache b/templates/core/progress_bar.mustache deleted file mode 100644 index 56f8212..0000000 --- a/templates/core/progress_bar.mustache +++ /dev/null @@ -1,64 +0,0 @@ -{{! - 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 core/progress_bar - - Progress bar. - - Example context (json): - { - "id": "progressbar_test", - "width": "500" - } -}} -
    -
    -

    - -

    -
    -
    - -{{! We must not use the JS helper otherwise this gets executed too late. }} - diff --git a/templates/core/select_time.mustache b/templates/core/select_time.mustache deleted file mode 100644 index f2c9029..0000000 --- a/templates/core/select_time.mustache +++ /dev/null @@ -1,38 +0,0 @@ -{{! - 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 core/select_time - - Select time. - - Example context (json): - { - "id": "test-id", - "name": "test-name", - "label": "Test label", - "options": [ - {"name": "Option 1", "value": "1"}, - {"name": "Option 2", "value": "2"} - ] - } -}} - - diff --git a/templates/core/settings_link_page.mustache b/templates/core/settings_link_page.mustache deleted file mode 100644 index c763f4b..0000000 --- a/templates/core/settings_link_page.mustache +++ /dev/null @@ -1,147 +0,0 @@ -{{! - 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 core/settings_link_page - - Displays the admin tree as a list of grouped links. - - Example context (json): - { - "node": { - "text": "Root of menu", - "key": "test0", - "display": true, - "children": [ - { - "text": "Child of menu", - "key": "test1", - "display": true, - "children": [] - } - ] - } - } -}} - - - -
    -
    -
    -
    -
    -
    -
    -
      - {{#node.children}} - {{^children.count}} - {{#display}} -
    • {{text}}
    • - {{/display}} - {{/children.count}} - {{/node.children}} -
    -
    -
    - - {{#node.children}} - {{#display}} - {{#children.count}} - {{#is_short_branch}} -
    -
    -
    - {{#action}}

    {{text}}

    {{/action}} - {{^action}}

    {{text}}

    {{/action}} -

    -
    -
      - {{#children}} - {{> core/settings_link_page_single }} - {{/children}} -
    -
    -
    - {{/is_short_branch}} - {{/children.count}} - {{/display}} - {{/node.children}} -
    -
    - {{#node.children}} - {{#children.count}} -
    -
    -
    -
    - {{#action}}

    {{text}}

    {{/action}} - {{^action}}

    {{text}}

    {{/action}} -

    -
    -
      - {{#children}} - {{#display}} - {{^children.count}} -
    • {{text}}
    • - {{/children.count}} - {{/display}} - {{/children}} -
    -
    -
    - {{#children}} - {{#display}} - {{#children.count}} -
    -
    -
    - {{#action}}

    {{text}}

    {{/action}} - {{^action}}

    {{text}}

    {{/action}} -

    -
    -
      - {{#children}} - {{> core/settings_link_page_single }} - {{/children}} -
    -
    -
    - {{/children.count}} - {{/display}} - {{/children}} -
    -
    - {{/children.count}} - {{/node.children}} -
    diff --git a/templates/core/settings_link_page_single.mustache b/templates/core/settings_link_page_single.mustache deleted file mode 100644 index e34dd43..0000000 --- a/templates/core/settings_link_page_single.mustache +++ /dev/null @@ -1,46 +0,0 @@ -{{! - 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 core/settings_link_page_single - - Displays the admin tree as a list of grouped links. - - Example context (json): - { - "text": "Root of menu", - "key": "test0", - "display": true, - "children": [] - } -}} -{{#display}} - {{#action}} -
  • {{text}}
  • - {{/action}} - {{^action}} -
  • {{text}}
  • - {{/action}} - {{#children.count}} -
  • -
      - {{#children}} - {{> core/settings_link_page_single }} - {{/children}} -
    -
  • - {{/children.count}} -{{/display}} diff --git a/templates/core/signup_form_layout.mustache b/templates/core/signup_form_layout.mustache deleted file mode 100644 index dac6ab0..0000000 --- a/templates/core/signup_form_layout.mustache +++ /dev/null @@ -1,33 +0,0 @@ -{{! - @template core/signup_form_layout - - Example context (json): - { - "logourl": "https://moodle.org/logo/moodle-logo.svg", - "sitename": "Site name", - "formhtml": "

    (Form html would go here)

    " - } -}} -
    -
    -
    -
    -
    -
    - {{#logourl}} -

    {{sitename}}

    - {{/logourl}} - {{^logourl}} -

    {{sitename}}

    - {{/logourl}} -
    -
    -
    -

    {{#str}}newaccount{{/str}}

    -
    - {{{formhtml}}} -
    -
    -
    -
    -
    diff --git a/templates/core/single_button.mustache b/templates/core/single_button.mustache deleted file mode 100644 index 265cc1d..0000000 --- a/templates/core/single_button.mustache +++ /dev/null @@ -1,61 +0,0 @@ -{{! - 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 core/single_button - - Moodle template for a single button submit form. - - Classes required for JS: - * none - - Data attributes required for JS: - * none - - Context variables required for this template: - * classes - a list of classes to wrap the form. - * method - get or post - * url - the action url to submit to - * formid - optional id value for the form - * params - array of params with name and value attributes - * primary - true if this is a primary action button - * id - id for the element - * tooltip - tooltip text for the button - * disabled - true if this element is disabled - * label - text to show on the button - - Example context (json): - { "method" : "get", - "url" : "#", - "primary" : true, - "tooltip" : "This is a tooltip", - "label" : "This is a the button text" - } -}} -
    -
    - {{#params}} - - {{/params}} - -
    -
    -{{#hasactions}} - {{> core/actions }} -{{/hasactions}} diff --git a/templates/core/skip_links.mustache b/templates/core/skip_links.mustache deleted file mode 100644 index d8c49a7..0000000 --- a/templates/core/skip_links.mustache +++ /dev/null @@ -1,16 +0,0 @@ -{{! - @template core/skip_links - - Example context (json): - { - "links": [ - {"url": "http://example.com/link1", "text": "Link 1"}, - {"url": "http://example.com/link2", "text": "Link 2"} - ] - } -}} -
    -{{#links}} - {{{text}}} -{{/links}} -
    \ No newline at end of file diff --git a/templates/core/tabtree.mustache b/templates/core/tabtree.mustache deleted file mode 100644 index 08c817b..0000000 --- a/templates/core/tabtree.mustache +++ /dev/null @@ -1,44 +0,0 @@ -{{! - 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 core/tabtree - - Tab tree. - - Example context (json): - { - "tabs": [{ - "active": "true", - "inactive": "false", - "link": [{ - "link": "http://moodle.org" - }], - "title": "Moodle.org", - "text": "Moodle community" - }] - } -}} - -{{#secondrow}} - {{>core/tabtree}} -{{/secondrow}} diff --git a/templates/core_admin/setting.mustache b/templates/core_admin/setting.mustache deleted file mode 100644 index 32151be..0000000 --- a/templates/core_admin/setting.mustache +++ /dev/null @@ -1,43 +0,0 @@ -{{! - 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 . -}} -{{! - Setting. -}} -
    -
    - - {{{name}}} -
    -
    - {{#error}} -
    {{error}}
    - {{/error}} - {{{element}}} - {{#default}} -
    {{{default}}}
    - {{/default}} -
    {{{description}}}
    -
    -
    diff --git a/templates/core_admin/setting_configcolourpicker.mustache b/templates/core_admin/setting_configcolourpicker.mustache deleted file mode 100644 index a938721..0000000 --- a/templates/core_admin/setting_configcolourpicker.mustache +++ /dev/null @@ -1,30 +0,0 @@ -{{! - 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 . -}} -{{! - Setting configcolourpicker. -}} -
    -
    - {{#icon}} - {{>core/pix_icon}} - {{/icon}} -
    - - {{#haspreviewconfig}} - - {{/haspreviewconfig}} -
    diff --git a/templates/core_admin/setting_configduration.mustache b/templates/core_admin/setting_configduration.mustache deleted file mode 100644 index 50c355d..0000000 --- a/templates/core_admin/setting_configduration.mustache +++ /dev/null @@ -1,31 +0,0 @@ -{{! - 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 . -}} -{{! - Setting configduration. -}} -
    -
    - - - -
    -
    - diff --git a/templates/core_admin/setting_configfile.mustache b/templates/core_admin/setting_configfile.mustache deleted file mode 100644 index d382a8a..0000000 --- a/templates/core_admin/setting_configfile.mustache +++ /dev/null @@ -1,33 +0,0 @@ -{{! - 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 . -}} -{{! - Setting configfile. -}} -
    -
    - - {{#showvalidity}} - {{#valid}} - - {{/valid}} - {{^valid}} - - {{/valid}} - {{/showvalidity}} -
    -
    - diff --git a/templates/core_admin/setting_configmultiselect.mustache b/templates/core_admin/setting_configmultiselect.mustache deleted file mode 100644 index 149f16b..0000000 --- a/templates/core_admin/setting_configmultiselect.mustache +++ /dev/null @@ -1,28 +0,0 @@ -{{! - 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 . -}} -{{! - Setting configmultiselect. -}} -
    - - -
    - diff --git a/templates/core_admin/setting_configmultiselect_optgroup.mustache b/templates/core_admin/setting_configmultiselect_optgroup.mustache deleted file mode 100644 index 6398e75..0000000 --- a/templates/core_admin/setting_configmultiselect_optgroup.mustache +++ /dev/null @@ -1,35 +0,0 @@ -{{! - 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 . -}} -{{! - Setting configmultiselect with optgroup support. -}} -
    - - -
    - diff --git a/templates/core_admin/setting_configselect.mustache b/templates/core_admin/setting_configselect.mustache deleted file mode 100644 index 0f5c8ed..0000000 --- a/templates/core_admin/setting_configselect.mustache +++ /dev/null @@ -1,27 +0,0 @@ -{{! - 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 . -}} -{{! - Setting configselect. -}} -
    - -
    - diff --git a/templates/core_admin/setting_configselect_optgroup.mustache b/templates/core_admin/setting_configselect_optgroup.mustache deleted file mode 100644 index 6628240..0000000 --- a/templates/core_admin/setting_configselect_optgroup.mustache +++ /dev/null @@ -1,35 +0,0 @@ -{{! - 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 . -}} -{{! - Setting configselect with optgroup support. -}} -
    - -
    - - diff --git a/templates/core_admin/setting_configtext.mustache b/templates/core_admin/setting_configtext.mustache deleted file mode 100644 index dba4fd7..0000000 --- a/templates/core_admin/setting_configtext.mustache +++ /dev/null @@ -1,22 +0,0 @@ -{{! - 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 . -}} -{{! - Setting configtext. -}} -
    - -
    diff --git a/templates/core_admin/setting_configtextarea.mustache b/templates/core_admin/setting_configtextarea.mustache deleted file mode 100644 index f8430b8..0000000 --- a/templates/core_admin/setting_configtextarea.mustache +++ /dev/null @@ -1,22 +0,0 @@ -{{! - 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 . -}} -{{! - Setting configtextarea. -}} -
    - -
    diff --git a/templates/core_admin/setting_configtime.mustache b/templates/core_admin/setting_configtime.mustache deleted file mode 100644 index b8e9666..0000000 --- a/templates/core_admin/setting_configtime.mustache +++ /dev/null @@ -1,36 +0,0 @@ -{{! - 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 . -}} -{{! - Setting configtime. -}} -
    -
    - - : - - -
    -
    - diff --git a/templates/core_admin/setting_courselist_frontpage.mustache b/templates/core_admin/setting_courselist_frontpage.mustache deleted file mode 100644 index de5d342..0000000 --- a/templates/core_admin/setting_courselist_frontpage.mustache +++ /dev/null @@ -1,29 +0,0 @@ -{{! - 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 . -}} -{{! - Setting courselist_frontpage. -}} -
    - {{#selects}} - -
    - {{/selects}} -
    diff --git a/templates/core_admin/setting_description.mustache b/templates/core_admin/setting_description.mustache deleted file mode 100644 index 09bda33..0000000 --- a/templates/core_admin/setting_description.mustache +++ /dev/null @@ -1,46 +0,0 @@ -{{! - 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 core_admin/setting_description - - Admin setting description template. - - Context variables required for this template: - * labelfor - id of the form element - * title - Setting title - * name - Setting name - - Example context (json): - { - "title": "Setting title", - "name": "Name", - "description": "Description goes here" - } -}} -{{! - Setting description. -}} -
    -
    - -
    -
    -
    {{{description}}}
    -
    -
    diff --git a/templates/core_admin/setting_devicedetectregex.mustache b/templates/core_admin/setting_devicedetectregex.mustache deleted file mode 100644 index 7f3ac48..0000000 --- a/templates/core_admin/setting_devicedetectregex.mustache +++ /dev/null @@ -1,39 +0,0 @@ -{{! - 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 . -}} -{{! - Setting devicedetectregex. -}} - - - - - - - - - {{#expressions}} - - - - - {{/expressions}} - -
    {{#str}}devicedetectregexexpression, admin{{/str}}{{#str}}devicedetectregexvalue, admin{{/str}}
    - - - -
    diff --git a/templates/core_admin/setting_emoticons.mustache b/templates/core_admin/setting_emoticons.mustache deleted file mode 100644 index fe2c75c..0000000 --- a/templates/core_admin/setting_emoticons.mustache +++ /dev/null @@ -1,51 +0,0 @@ -{{! - 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 . -}} -{{! - Setting emoticons. -}} -
    - - - - - - - - - - - - {{#emoticons}} - - {{#fields}} - - {{/fields}} - - - {{/emoticons}} - -
    {{#str}}emoticontext, admin{{/str}}{{#str}}emoticonimagename, admin{{/str}}{{#str}}emoticoncomponent, admin{{/str}}{{#str}}emoticonalt, admin{{/str}}
    - - - {{#icon}} - {{>core/pix_icon}} - {{/icon}} -
    -
    - diff --git a/templates/core_admin/setting_gradecat_combo.mustache b/templates/core_admin/setting_gradecat_combo.mustache deleted file mode 100644 index b06d29d..0000000 --- a/templates/core_admin/setting_gradecat_combo.mustache +++ /dev/null @@ -1,31 +0,0 @@ -{{! - 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 . -}} -{{! - Setting configselect. -}} -
    - - - - - -
    - diff --git a/templates/core_admin/settings.mustache b/templates/core_admin/settings.mustache deleted file mode 100644 index c75925a..0000000 --- a/templates/core_admin/settings.mustache +++ /dev/null @@ -1,40 +0,0 @@ -{{! - 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 . -}} -{{! - Settings. -}} -
    -
    - {{#params}} - - - {{/params}} - - - {{#title}} -

    {{title}}

    - {{/title}} - {{{settings}}} - {{#showsave}} -
    -
    - -
    -
    - {{/showsave}} -
    -
    diff --git a/templates/core_admin/settings_search_results.mustache b/templates/core_admin/settings_search_results.mustache deleted file mode 100644 index 6653154..0000000 --- a/templates/core_admin/settings_search_results.mustache +++ /dev/null @@ -1,72 +0,0 @@ -{{! - 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 core_admin/settings_search_results - - Admin setting search results template. - - Context variables required for this template: - * actionurl - Url to post to - * hasresults - True if there are results - * results - List of results containing url, title, path (array of strings), settings (array of raw html) - * showsave - Show save buttons - - Example context (json): - { - "actionurl": "/", - "hasresults": true, - "results": [ - { "url": "/", "title": "Match!", "path": ["Administration", "Match!"], "settings": [ "blah blah blah" ] } - ] - } -}} -
    -
    - - -
    -
    -
    -

    {{#str}}searchresults, admin{{/str}}

    - {{#hasresults}} - {{#results}} -

    {{{title}}}

    -
      - {{#path}} -
    • {{.}}
    • - {{/path}} -
    -
    - {{#settings}} -
    - {{{.}}} - {{/settings}} -
    - {{/results}} - {{#showsave}} -
    -
    - -
    -
    - {{/showsave}} - {{/hasresults}} - {{^hasresults}} - {{#str}}noresults, admin{{/str}} - {{/hasresults}} -
    -
    diff --git a/templates/core_calendar/minicalendar_day_link.mustache b/templates/core_calendar/minicalendar_day_link.mustache deleted file mode 100644 index 3f34716..0000000 --- a/templates/core_calendar/minicalendar_day_link.mustache +++ /dev/null @@ -1,64 +0,0 @@ -{{! - 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 core_calendar/minicalendar_day_link - - Displays link to calendar day in mini calendar, with hover tooltip. - - Example context (json): - { - "day": "Today", - "url": "http://example.com/", - "title": "Monday 2nd January", - "content": "Test site event" - } -}} -{{$day}}{{day}}{{/day}} - -{{#js}} -require(['jquery'], function($) { - require(['theme_ilb/popover'], function() { - var target = $("#calendar-day-popover-link-{{courseid}}-{{year}}-{{yday}}-{{uniqid}}"); - target.popover({ - content: function() { - var source = target.next().find("> *:not('.hidden')"); - var content = $('
    '); - - if (source.length) { - content.html(source.clone(false)); - } else { - content.html(target.data('alternate')); - } - - return content.html(); - } - }); - }); -}); -{{/js}} diff --git a/templates/core_form/editor_textarea.mustache b/templates/core_form/editor_textarea.mustache deleted file mode 100644 index 22ed026..0000000 --- a/templates/core_form/editor_textarea.mustache +++ /dev/null @@ -1,47 +0,0 @@ -{{! - 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 core_form/editor_textarea - - Displays an editor field in a form. - - Example context (json): - { - "name": "test", - "id": "test0", - "rows": 4, - "cols": 20, - "value": "Sample text", - "format": 3 - } -}} -
    - -
    -
    - {{#hasformats}} - - {{/hasformats}} - {{^hasformats}} - - {{/hasformats}} -
    diff --git a/templates/core_form/element-advcheckbox-inline.mustache b/templates/core_form/element-advcheckbox-inline.mustache deleted file mode 100644 index cc8134f..0000000 --- a/templates/core_form/element-advcheckbox-inline.mustache +++ /dev/null @@ -1,39 +0,0 @@ - -{{#text}} - {{{.}}} -{{/text}} -{{{helpbutton}}} - -{{^element.frozen}} -{{#js}} -require(['theme_ilb/form-display-errors'], function(module) { - module.enhance({{#quote}}{{element.id}}{{/quote}}); -}); -{{/js}} -{{/element.frozen}} diff --git a/templates/core_form/element-advcheckbox.mustache b/templates/core_form/element-advcheckbox.mustache deleted file mode 100644 index ff7c7c8..0000000 --- a/templates/core_form/element-advcheckbox.mustache +++ /dev/null @@ -1,57 +0,0 @@ -
    -
    - {{#text}} - - {{/text}} -
    -
    -
    - - - {{#advanced}}!{{/advanced}} - {{{helpbutton}}} - -
    - -
    -
    -{{^element.frozen}} -{{#js}} -require(['theme_ilb/form-display-errors'], function(module) { - module.enhance({{#quote}}{{element.id}}{{/quote}}); -}); -{{/js}} -{{/element.frozen}} diff --git a/templates/core_form/element-autocomplete-inline.mustache b/templates/core_form/element-autocomplete-inline.mustache deleted file mode 100644 index bc7434a..0000000 --- a/templates/core_form/element-autocomplete-inline.mustache +++ /dev/null @@ -1,40 +0,0 @@ -{{< core_form/element-template-inline }} - {{$element}} - {{^element.frozen}} - - {{/element.frozen}} - {{#element.frozen}} - {{#element.options}} - {{#selected}} - {{{text}}} - {{^element.hardfrozen}} - - {{/element.hardfrozen}} - {{/selected}} - {{/element.options}} - {{/element.frozen}} - {{/element}} -{{/ core_form/element-template-inline }} -{{^element.frozen}} -{{#js}} -require(['core/form-autocomplete'], function(module) { - module.enhance({{#quote}}#{{element.id}}{{/quote}}, - {{element.tags}}, - {{#quote}}{{element.ajax}}{{/quote}}, - {{#quote}}{{element.placeholder}}{{/quote}}, - {{element.casesensitive}}, - {{element.showsuggestions}}, - {{#quote}}{{element.noselectionstring}}{{/quote}}); -}); -{{/js}} -{{/element.frozen}} diff --git a/templates/core_form/element-autocomplete.mustache b/templates/core_form/element-autocomplete.mustache deleted file mode 100644 index a7fea2c..0000000 --- a/templates/core_form/element-autocomplete.mustache +++ /dev/null @@ -1,40 +0,0 @@ -{{< core_form/element-template }} - {{$element}} - {{^element.frozen}} - - {{/element.frozen}} - {{#element.frozen}} - {{#element.options}} - {{#selected}} - {{{text}}} - {{^element.hardfrozen}} - - {{/element.hardfrozen}} - {{/selected}} - {{/element.options}} - {{/element.frozen}} - {{/element}} -{{/ core_form/element-template }} -{{^element.frozen}} -{{#js}} -require(['core/form-autocomplete'], function(module) { - module.enhance({{#quote}}#{{element.id}}{{/quote}}, - {{element.tags}}, - {{#quote}}{{element.ajax}}{{/quote}}, - {{#quote}}{{element.placeholder}}{{/quote}}, - {{element.casesensitive}}, - {{element.showsuggestions}}, - {{#quote}}{{element.noselectionstring}}{{/quote}}); -}); -{{/js}} -{{/element.frozen}} diff --git a/templates/core_form/element-button-inline.mustache b/templates/core_form/element-button-inline.mustache deleted file mode 100644 index fff81f9..0000000 --- a/templates/core_form/element-button-inline.mustache +++ /dev/null @@ -1,18 +0,0 @@ -{{< core_form/element-template-inline }} - {{$element}} - {{^element.frozen}} - - {{/element.frozen}} - {{/element}} -{{/ core_form/element-template-inline }} diff --git a/templates/core_form/element-button.mustache b/templates/core_form/element-button.mustache deleted file mode 100644 index 3ce46e2..0000000 --- a/templates/core_form/element-button.mustache +++ /dev/null @@ -1,17 +0,0 @@ -{{< core_form/element-template }} - {{$element}} - {{^element.frozen}} - - {{/element.frozen}} - {{/element}} -{{/ core_form/element-template }} diff --git a/templates/core_form/element-checkbox-inline.mustache b/templates/core_form/element-checkbox-inline.mustache deleted file mode 100644 index 0f94459..0000000 --- a/templates/core_form/element-checkbox-inline.mustache +++ /dev/null @@ -1,39 +0,0 @@ - -{{#text}} - {{{.}}} -{{/text}} -{{{helpbutton}}} - -{{^element.frozen}} -{{#js}} -require(['theme_ilb/form-display-errors'], function(module) { - module.enhance({{#quote}}{{element.id}}{{/quote}}); -}); -{{/js}} -{{/element.frozen}} diff --git a/templates/core_form/element-checkbox.mustache b/templates/core_form/element-checkbox.mustache deleted file mode 100644 index 6a96b00..0000000 --- a/templates/core_form/element-checkbox.mustache +++ /dev/null @@ -1,57 +0,0 @@ -
    -
    - {{#text}} - - {{/text}} -
    -
    -
    - - - {{#advanced}}!{{/advanced}} - {{{helpbutton}}} - -
    - -
    -
    -{{^element.frozen}} -{{#js}} -require(['theme_ilb/form-display-errors'], function(module) { - module.enhance({{#quote}}{{element.id}}{{/quote}}); -}); -{{/js}} -{{/element.frozen}} diff --git a/templates/core_form/element-date_selector-inline.mustache b/templates/core_form/element-date_selector-inline.mustache deleted file mode 100644 index df5ccdb..0000000 --- a/templates/core_form/element-date_selector-inline.mustache +++ /dev/null @@ -1,10 +0,0 @@ -{{< core_form/element-template-inline }} - {{$element}} - - {{#element.elements}} - {{{separator}}} - {{{html}}} - {{/element.elements}} - - {{/element}} -{{/ core_form/element-template-inline }} diff --git a/templates/core_form/element-date_selector.mustache b/templates/core_form/element-date_selector.mustache deleted file mode 100644 index 250c491..0000000 --- a/templates/core_form/element-date_selector.mustache +++ /dev/null @@ -1,10 +0,0 @@ -{{< core_form/element-template }} - {{$element}} - - {{#element.elements}} - {{{separator}}} - {{{html}}} - {{/element.elements}} - - {{/element}} -{{/ core_form/element-template }} diff --git a/templates/core_form/element-date_time_selector-inline.mustache b/templates/core_form/element-date_time_selector-inline.mustache deleted file mode 100644 index fb70df7..0000000 --- a/templates/core_form/element-date_time_selector-inline.mustache +++ /dev/null @@ -1,10 +0,0 @@ -{{< core_form/element-template-inline }} - {{$element}} -
    - {{#element.elements}} - {{{separator}}} - {{{html}}} - {{/element.elements}} -
    - {{/element}} -{{/ core_form/element-template-inline }} diff --git a/templates/core_form/element-date_time_selector.mustache b/templates/core_form/element-date_time_selector.mustache deleted file mode 100644 index 225c4ee..0000000 --- a/templates/core_form/element-date_time_selector.mustache +++ /dev/null @@ -1,10 +0,0 @@ -{{< core_form/element-template }} - {{$element}} -
    - {{#element.elements}} - {{{separator}}} - {{{html}}} - {{/element.elements}} -
    - {{/element}} -{{/ core_form/element-template }} diff --git a/templates/core_form/element-defaultcustom-inline.mustache b/templates/core_form/element-defaultcustom-inline.mustache deleted file mode 100644 index 8ca388e..0000000 --- a/templates/core_form/element-defaultcustom-inline.mustache +++ /dev/null @@ -1,43 +0,0 @@ -{{! - 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 core_form/element-defaultcustom-inline - - Defaultcustom form element template. - - Example context (json): - { - "element": { - "elements": [ - {"html": "", - "separator": ""}, - {"html": "", - "separator": ""} - ] - } - } -}} -{{< core_form/element-template-inline }} - {{$element}} - - {{#element.elements}} - {{{separator}}} - {{{html}}} - {{/element.elements}} - - {{/element}} -{{/ core_form/element-template-inline }} diff --git a/templates/core_form/element-defaultcustom.mustache b/templates/core_form/element-defaultcustom.mustache deleted file mode 100644 index 3c6fbda..0000000 --- a/templates/core_form/element-defaultcustom.mustache +++ /dev/null @@ -1,43 +0,0 @@ -{{! - 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 core_form/element-defaultcustom - - Defaultcustom form element template. - - Example context (json): - { - "element": { - "elements": [ - {"html": "", - "separator": ""}, - {"html": "", - "separator": ""} - ] - } - } -}} -{{< core_form/element-template }} - {{$element}} - - {{#element.elements}} - {{{separator}}} - {{{html}}} - {{/element.elements}} - - {{/element}} -{{/ core_form/element-template }} diff --git a/templates/core_form/element-duration-inline.mustache b/templates/core_form/element-duration-inline.mustache deleted file mode 100644 index a697ae8..0000000 --- a/templates/core_form/element-duration-inline.mustache +++ /dev/null @@ -1,10 +0,0 @@ -{{< core_form/element-template-inline }} - {{$element}} -
    - {{#element.elements}} - {{{separator}}} - {{{html}}} - {{/element.elements}} -
    - {{/element}} -{{/ core_form/element-template-inline }} \ No newline at end of file diff --git a/templates/core_form/element-duration.mustache b/templates/core_form/element-duration.mustache deleted file mode 100644 index 9a4e5cb..0000000 --- a/templates/core_form/element-duration.mustache +++ /dev/null @@ -1 +0,0 @@ -{{> core_form/element-group }} diff --git a/templates/core_form/element-editor.mustache b/templates/core_form/element-editor.mustache deleted file mode 100644 index 6f02ca0..0000000 --- a/templates/core_form/element-editor.mustache +++ /dev/null @@ -1,5 +0,0 @@ -{{< core_form/element-template }} - {{$element}} - {{{element.html}}} - {{/element}} -{{/ core_form/element-template }} diff --git a/templates/core_form/element-filemanager.mustache b/templates/core_form/element-filemanager.mustache deleted file mode 100644 index 6f02ca0..0000000 --- a/templates/core_form/element-filemanager.mustache +++ /dev/null @@ -1,5 +0,0 @@ -{{< core_form/element-template }} - {{$element}} - {{{element.html}}} - {{/element}} -{{/ core_form/element-template }} diff --git a/templates/core_form/element-filepicker.mustache b/templates/core_form/element-filepicker.mustache deleted file mode 100644 index 6f02ca0..0000000 --- a/templates/core_form/element-filepicker.mustache +++ /dev/null @@ -1,5 +0,0 @@ -{{< core_form/element-template }} - {{$element}} - {{{element.html}}} - {{/element}} -{{/ core_form/element-template }} diff --git a/templates/core_form/element-filetypes.mustache b/templates/core_form/element-filetypes.mustache deleted file mode 100644 index 9a4e5cb..0000000 --- a/templates/core_form/element-filetypes.mustache +++ /dev/null @@ -1 +0,0 @@ -{{> core_form/element-group }} diff --git a/templates/core_form/element-float-inline.mustache b/templates/core_form/element-float-inline.mustache new file mode 100644 index 0000000..ab31355 --- /dev/null +++ b/templates/core_form/element-float-inline.mustache @@ -0,0 +1 @@ +{{> core_form/element-text-inline }} diff --git a/templates/core_form/element-float.mustache b/templates/core_form/element-float.mustache new file mode 100644 index 0000000..b7270e2 --- /dev/null +++ b/templates/core_form/element-float.mustache @@ -0,0 +1 @@ +{{> core_form/element-text }} diff --git a/templates/core_form/element-grading.mustache b/templates/core_form/element-grading.mustache deleted file mode 100644 index 6f02ca0..0000000 --- a/templates/core_form/element-grading.mustache +++ /dev/null @@ -1,5 +0,0 @@ -{{< core_form/element-template }} - {{$element}} - {{{element.html}}} - {{/element}} -{{/ core_form/element-template }} diff --git a/templates/core_form/element-group-inline.mustache b/templates/core_form/element-group-inline.mustache deleted file mode 100644 index 504ff4b..0000000 --- a/templates/core_form/element-group-inline.mustache +++ /dev/null @@ -1,8 +0,0 @@ -{{< core_form/element-template-inline }} - {{$element}} - {{#element.elements}} - {{{separator}}} - {{{html}}} - {{/element.elements}} - {{/element}} -{{/ core_form/element-template-inline }} diff --git a/templates/core_form/element-group.mustache b/templates/core_form/element-group.mustache deleted file mode 100644 index 9af767f..0000000 --- a/templates/core_form/element-group.mustache +++ /dev/null @@ -1,8 +0,0 @@ -{{< core_form/element-template }} - {{$element}} - {{#element.elements}} - {{{separator}}} - {{{html}}} - {{/element.elements}} - {{/element}} -{{/ core_form/element-template }} diff --git a/templates/core_form/element-modgrade.mustache b/templates/core_form/element-modgrade.mustache deleted file mode 100644 index 9a4e5cb..0000000 --- a/templates/core_form/element-modgrade.mustache +++ /dev/null @@ -1 +0,0 @@ -{{> core_form/element-group }} diff --git a/templates/core_form/element-modvisible.mustache b/templates/core_form/element-modvisible.mustache deleted file mode 100644 index e918676..0000000 --- a/templates/core_form/element-modvisible.mustache +++ /dev/null @@ -1 +0,0 @@ -{{> core_form/element-select }} diff --git a/templates/core_form/element-password.mustache b/templates/core_form/element-password.mustache deleted file mode 100644 index 09f779f..0000000 --- a/templates/core_form/element-password.mustache +++ /dev/null @@ -1,15 +0,0 @@ -{{< core_form/element-template }} - {{$element}} - {{^element.frozen}} - - {{/element.frozen}} - {{/element}} -{{/ core_form/element-template }} diff --git a/templates/core_form/element-passwordunmask.mustache b/templates/core_form/element-passwordunmask.mustache deleted file mode 100644 index 2fa7e5f..0000000 --- a/templates/core_form/element-passwordunmask.mustache +++ /dev/null @@ -1,88 +0,0 @@ -{{! - 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 core_form/element-passwordunmask - - Moodle passwordunmask form element template. - - The purpose of this template is to render a passwordunmask form element. - - Classes required for JS: - * none - - Data attributes required for JS: - * none - - Context variables required for this template: - * element - * id - * name - * value - * size - - Example context (json): - { - "element": { - "id": "example_password_unmask", - "name": "example", - "value": "Password1!", - "size": 40 - } - } - -}} -{{< core_form/element-template }} - {{$ element }} - - - - - {{^ element.frozen }} - - {{/ element.frozen }} - {{> core_form/element-passwordunmask-fill }} - {{^ element.frozen }} - {{# pix }} t/passwordunmask-edit, core, {{# str }} passwordunmaskedithint, form {{/ str }}{{/ pix }} - - {{/ element.frozen }} - - {{# pix }} t/passwordunmask-reveal, core, {{# str }} passwordunmaskrevealhint, form {{/ str }}{{/ pix }} - - - - {{/ element }} -{{/ core_form/element-template }} -{{#js}} -require(['core_form/passwordunmask'], function(PasswordUnmask) { - new PasswordUnmask("{{ element.id }}"); -}); -{{/ js }} diff --git a/templates/core_form/element-questioncategory-inline.mustache b/templates/core_form/element-questioncategory-inline.mustache deleted file mode 100644 index d9b9025..0000000 --- a/templates/core_form/element-questioncategory-inline.mustache +++ /dev/null @@ -1 +0,0 @@ -{{> core_form/element-selectgroups-inline }} diff --git a/templates/core_form/element-questioncategory.mustache b/templates/core_form/element-questioncategory.mustache deleted file mode 100644 index 8d7f75c..0000000 --- a/templates/core_form/element-questioncategory.mustache +++ /dev/null @@ -1 +0,0 @@ -{{> core_form/element-selectgroups }} diff --git a/templates/core_form/element-radio-inline.mustache b/templates/core_form/element-radio-inline.mustache deleted file mode 100644 index 3f335b5..0000000 --- a/templates/core_form/element-radio-inline.mustache +++ /dev/null @@ -1,40 +0,0 @@ -{{! -@template theme_ilb/core_form/element-radio-online - - Example context (json): - { - "element": { - "id": "id_test_radio0", - "name": "test_radio_button" - } - } - -}} - -{{#text}} - {{{.}}} -{{/text}} -{{{helpbutton}}} - -{{^element.frozen}} -{{#js}} -require(['theme_ilb/form-display-errors'], function(module) { - module.enhance({{#quote}}{{element.id}}{{/quote}}); -}); -{{/js}} -{{/element.frozen}} diff --git a/templates/core_form/element-radio.mustache b/templates/core_form/element-radio.mustache deleted file mode 100644 index 232a55a..0000000 --- a/templates/core_form/element-radio.mustache +++ /dev/null @@ -1,58 +0,0 @@ -{{! - @template theme_ilb/core_form/element-radio - - Example context (json): - { - "element": { - "id": "id_test_radio0", - "name": "test_radio_button" - } - } - -}} -
    -
    - {{#text}} - - {{/text}} -
    -
    -
    - - - {{#required}}{{#pix}}req, core, {{#str}}required{{/str}}{{/pix}}{{/required}} - {{#advanced}}!{{/advanced}} - {{{helpbutton}}} - -
    - -
    -
    -{{^element.frozen}} -{{#js}} -require(['theme_ilb/form-display-errors'], function(module) { - module.enhance({{#quote}}{{element.id}}{{/quote}}); -}); -{{/js}} -{{/element.frozen}} diff --git a/templates/core_form/element-recaptcha.mustache b/templates/core_form/element-recaptcha.mustache deleted file mode 100644 index 6f02ca0..0000000 --- a/templates/core_form/element-recaptcha.mustache +++ /dev/null @@ -1,5 +0,0 @@ -{{< core_form/element-template }} - {{$element}} - {{{element.html}}} - {{/element}} -{{/ core_form/element-template }} diff --git a/templates/core_form/element-select-inline.mustache b/templates/core_form/element-select-inline.mustache deleted file mode 100644 index 5af5684..0000000 --- a/templates/core_form/element-select-inline.mustache +++ /dev/null @@ -1,30 +0,0 @@ -{{< core_form/element-template-inline }} - {{$element}} - {{^element.frozen}} - - {{/element.frozen}} - {{#element.frozen}} - {{#element.options}} - {{#selected}} - {{{text}}} - {{^element.hardfrozen}} - - {{/element.hardfrozen}} - {{/selected}} - {{/element.options}} - {{/element.frozen}} - {{/element}} -{{/ core_form/element-template-inline }} diff --git a/templates/core_form/element-select.mustache b/templates/core_form/element-select.mustache deleted file mode 100644 index 66c6db5..0000000 --- a/templates/core_form/element-select.mustache +++ /dev/null @@ -1,122 +0,0 @@ -{{! - 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 core_form/element-select - - Simple select form element template. - - Context variables required for this template: - * id - Element id, - * name - Element name, - * label - Element label, - * multiple - multi select?, - * checked - checked?, - * error - Is there an error associated with this element?, - * size - Element size, - * value - Element value, - * helpbutton - Helpbutton, - * hiddenlabel - Element hidden flag, - * frozen - Element frozen flag, - * hardfrozen - Element hard fronzen flag, - * extraclasses - Extra classes assocaited, - * type - Element type, - * attributes - Element attributes, - * options - [ - { - text - Option text, - value - Option value, - selected - Selected?, - disabled - Disabled?, - optionattributes - Option attributes - } - ] - - Example context (json): - { - "element": { - "id": "id_maildisplay", - "name": "maildisplay", - "label": null, - "multiple": null, - "checked": null, - "error": null, - "size": null, - "value": null, - "helpbutton": "", - "hiddenlabel": false, - "frozen": false, - "hardfrozen": false, - "extraclasses": null, - "type": "select", - "attributes": "", - "options": [ - { - "text": "Hide my email address from non-privileged users", - "value": 0, - "selected": false, - "disabled": false, - "optionattributes": "" - }, - { - "text": "Allow everyone to see my email address", - "value": 1, - "selected": true, - "disabled": false, - "optionattributes": "" - }, - { - "text": "Allow only other course members to see my email address", - "value": 2, - "selected": false, - "disabled": false, - "optionattributes": "" - } - ] - } - } -}} -{{< core_form/element-template }} - {{$element}} - {{^element.frozen}} - - {{/element.frozen}} - {{#element.frozen}} - {{#element.options}} - {{#selected}} - {{{text}}} - {{^element.hardfrozen}} - - {{/element.hardfrozen}} - {{/selected}} - {{/element.options}} - {{/element.frozen}} - {{/element}} -{{/ core_form/element-template }} diff --git a/templates/core_form/element-selectgroups-inline.mustache b/templates/core_form/element-selectgroups-inline.mustache deleted file mode 100644 index 1fbb0c1..0000000 --- a/templates/core_form/element-selectgroups-inline.mustache +++ /dev/null @@ -1,32 +0,0 @@ -{{< core_form/element-template-inline }} - {{$element}} - {{^element.frozen}} - - {{/element.frozen}} - {{#element.frozen}} - {{#element.optiongroups}} - {{#options}} - {{#selected}}{{{text}}}{{/selected}} - {{/options}} - {{/element.optiongroups}} - {{/element.frozen}} - {{/element}} -{{/ core_form/element-template-inline }} diff --git a/templates/core_form/element-selectgroups.mustache b/templates/core_form/element-selectgroups.mustache deleted file mode 100644 index 783f028..0000000 --- a/templates/core_form/element-selectgroups.mustache +++ /dev/null @@ -1,32 +0,0 @@ -{{< core_form/element-template }} - {{$element}} - {{^element.frozen}} - - {{/element.frozen}} - {{#element.frozen}} - {{#element.optiongroups}} - {{#options}} - {{#selected}}{{{text}}}{{/selected}} - {{/options}} - {{/element.optiongroups}} - {{/element.frozen}} - {{/element}} -{{/ core_form/element-template }} diff --git a/templates/core_form/element-selectwithlink.mustache b/templates/core_form/element-selectwithlink.mustache deleted file mode 100644 index a0bf6d0..0000000 --- a/templates/core_form/element-selectwithlink.mustache +++ /dev/null @@ -1,23 +0,0 @@ -{{< core_form/element-template }} - {{$element}} - {{^element.frozen}} - - {{/element.frozen}} - {{#element.frozen}} - {{#element.options}} - {{#selected}}{{{text}}}{{/selected}} - {{/element.options}} - {{/element.frozen}} - {{element.linklabel}} - {{/element}} -{{/ core_form/element-template }} diff --git a/templates/core_form/element-selectyesno-inline.mustache b/templates/core_form/element-selectyesno-inline.mustache deleted file mode 100644 index f2366e0..0000000 --- a/templates/core_form/element-selectyesno-inline.mustache +++ /dev/null @@ -1 +0,0 @@ -{{> core_form/element-select-inline }} diff --git a/templates/core_form/element-selectyesno.mustache b/templates/core_form/element-selectyesno.mustache deleted file mode 100644 index e918676..0000000 --- a/templates/core_form/element-selectyesno.mustache +++ /dev/null @@ -1 +0,0 @@ -{{> core_form/element-select }} diff --git a/templates/core_form/element-static.mustache b/templates/core_form/element-static.mustache deleted file mode 100644 index 4eef265..0000000 --- a/templates/core_form/element-static.mustache +++ /dev/null @@ -1,44 +0,0 @@ -{{! - 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 core_form/element-static - - Static form element template. A static form element is an element that just outputs raw HTML. - - Classes required for JS: - * none - - Data attributes required for JS: - * none - - Context variables required for this template: - * element - A context exported from an mform element. - * element.html - The raw html to display. - - Example context (json): - { - "label": "Example label", - "element": { "html": "Example HTML", "staticlabel": true } - } -}} -{{< core_form/element-template }} - {{$element}} -
    - {{{element.html}}} -
    - {{/element}} -{{/ core_form/element-template }} diff --git a/templates/core_form/element-submit-inline.mustache b/templates/core_form/element-submit-inline.mustache deleted file mode 100644 index 7115850..0000000 --- a/templates/core_form/element-submit-inline.mustache +++ /dev/null @@ -1,15 +0,0 @@ -{{< core_form/element-template-inline }} - {{$element}} - {{^element.frozen}} - - {{/element.frozen}} - {{/element}} -{{/ core_form/element-template-inline }} diff --git a/templates/core_form/element-submit.mustache b/templates/core_form/element-submit.mustache deleted file mode 100644 index eca4f2b..0000000 --- a/templates/core_form/element-submit.mustache +++ /dev/null @@ -1,18 +0,0 @@ -{{< core_form/element-template }} - {{$element}} - {{^element.frozen}} - - {{/element.frozen}} - {{/element}} -{{/ core_form/element-template }} diff --git a/templates/core_form/element-tags-inline.mustache b/templates/core_form/element-tags-inline.mustache deleted file mode 100644 index e388742..0000000 --- a/templates/core_form/element-tags-inline.mustache +++ /dev/null @@ -1,39 +0,0 @@ -{{< core_form/element-template-inline }} - {{$element}} - {{^element.frozen}} - - - {{/element.frozen}} - {{#element.frozen}} - {{#element.options}} - {{#selected}}{{{text}}}{{/selected}} - {{/element.options}} - {{/element.frozen}} - {{#element.managestandardtagsurl}} - {{#str}}managestandardtags, core_tag{{/str}} - {{/element.managestandardtagsurl}} - {{/element}} -{{/ core_form/element-template-inline }} -{{^element.frozen}} -{{#js}} -require(['core/form-autocomplete'], function(module) { - module.enhance({{#quote}}#{{element.id}}{{/quote}}, - {{element.tags}}, - {{#quote}}{{element.ajax}}{{/quote}}, - {{#quote}}{{element.placeholder}}{{/quote}}, - {{element.casesensitive}}, - {{element.showsuggestions}}, - {{#quote}}{{element.noselectionstring}}{{/quote}}); -}); -{{/js}} -{{/element.frozen}} diff --git a/templates/core_form/element-tags.mustache b/templates/core_form/element-tags.mustache deleted file mode 100644 index 0d95b4c..0000000 --- a/templates/core_form/element-tags.mustache +++ /dev/null @@ -1,39 +0,0 @@ -{{< core_form/element-template }} - {{$element}} - {{^element.frozen}} - - - {{/element.frozen}} - {{#element.frozen}} - {{#element.options}} - {{#selected}}{{{text}}}{{/selected}} - {{/element.options}} - {{/element.frozen}} - {{#element.managestandardtagsurl}} - {{#str}}managestandardtags, core_tag{{/str}} - {{/element.managestandardtagsurl}} - {{/element}} -{{/ core_form/element-template }} -{{^element.frozen}} -{{#js}} -require(['core/form-autocomplete'], function(module) { - module.enhance({{#quote}}#{{element.id}}{{/quote}}, - {{element.tags}}, - {{#quote}}{{element.ajax}}{{/quote}}, - {{#quote}}{{element.placeholder}}{{/quote}}, - {{element.casesensitive}}, - {{element.showsuggestions}}, - {{#quote}}{{element.noselectionstring}}{{/quote}}); -}); -{{/js}} -{{/element.frozen}} diff --git a/templates/core_form/element-template-inline.mustache b/templates/core_form/element-template-inline.mustache deleted file mode 100644 index 0527ed7..0000000 --- a/templates/core_form/element-template-inline.mustache +++ /dev/null @@ -1,20 +0,0 @@ -
    - - - {{$ element }} - - {{/ element }} - - -
    -{{#js}} -require(['theme_ilb/form-display-errors'], function(module) { - module.enhance({{#quote}}{{element.id}}{{/quote}}); -}); -{{/js}} diff --git a/templates/core_form/element-template.mustache b/templates/core_form/element-template.mustache deleted file mode 100644 index 5f5e534..0000000 --- a/templates/core_form/element-template.mustache +++ /dev/null @@ -1,78 +0,0 @@ -{{! - 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 core_form/element-template - - Template for the form element wrapper template. - - Context variables required for this template: - * label - * required - * advanced - * helpbutton - * error - * element - * id - * name - - Example context (json): - { - "label": "Course full name", - "required": true, - "advanced": false, - "error": null, - "element": { - "wrapperid": "fitem_id_fullname", - "id": "id_fullname", - "name": "fullname" - } - } -}} -
    -
    - - {{#required}}{{#pix}}req, core, {{#str}}required{{/str}}{{/pix}}{{/required}} - {{#advanced}}!{{/advanced}} - {{{helpbutton}}} - - {{^element.staticlabel}} - - {{/element.staticlabel}} - {{#element.staticlabel}} - - {{{label}}} - - {{/element.staticlabel}} -
    -
    - {{$ element }} -
    - -
    - {{/ element }} - -
    -
    -{{#js}} -require(['theme_ilb/form-display-errors'], function(module) { - module.enhance({{#quote}}{{element.id}}{{/quote}}); -}); -{{/js}} diff --git a/templates/core_form/element-text-inline.mustache b/templates/core_form/element-text-inline.mustache deleted file mode 100644 index 8235008..0000000 --- a/templates/core_form/element-text-inline.mustache +++ /dev/null @@ -1,17 +0,0 @@ -{{< core_form/element-template-inline }} - {{$element}} - - {{/element}} -{{/ core_form/element-template-inline }} diff --git a/templates/core_form/element-text.mustache b/templates/core_form/element-text.mustache deleted file mode 100644 index 5cc4067..0000000 --- a/templates/core_form/element-text.mustache +++ /dev/null @@ -1,17 +0,0 @@ -{{< core_form/element-template }} - {{$element}} - - {{/element}} -{{/ core_form/element-template }} diff --git a/templates/core_form/element-textarea.mustache b/templates/core_form/element-textarea.mustache deleted file mode 100644 index 10ede77..0000000 --- a/templates/core_form/element-textarea.mustache +++ /dev/null @@ -1,17 +0,0 @@ -{{< core_form/element-template }} - {{$element}} - {{^element.frozen}} - - {{/element.frozen}} - {{#element.frozen}} - {{element.value}} - {{/element.frozen}} - {{/element}} -{{/ core_form/element-template }} diff --git a/templates/core_form/element-url.mustache b/templates/core_form/element-url.mustache deleted file mode 100644 index b18df79..0000000 --- a/templates/core_form/element-url.mustache +++ /dev/null @@ -1,26 +0,0 @@ -{{< core_form/element-template }} - {{$element}} - {{#element.filepickerclientid}} -
    - {{/element.filepickerclientid}} - - {{#element.filepickerclientid}} -
    - {{/element.filepickerclientid}} - {{^element.frozen}} - {{{element.filepickerhtml}}} - {{/element.frozen}} - {{/element}} -{{/ core_form/element-template }} diff --git a/templates/core_form/element-warning.mustache b/templates/core_form/element-warning.mustache deleted file mode 100644 index 9006137..0000000 --- a/templates/core_form/element-warning.mustache +++ /dev/null @@ -1,5 +0,0 @@ -{{< core_form/element-template }} - {{$element}} - {{{element.html}}} - {{/element}} -{{/ core_form/element-template }} \ No newline at end of file diff --git a/templates/core_form/element-wikieditor.mustache b/templates/core_form/element-wikieditor.mustache deleted file mode 100644 index 6f02ca0..0000000 --- a/templates/core_form/element-wikieditor.mustache +++ /dev/null @@ -1,5 +0,0 @@ -{{< core_form/element-template }} - {{$element}} - {{{element.html}}} - {{/element}} -{{/ core_form/element-template }} diff --git a/templates/core_grades/edit_tree.mustache b/templates/core_grades/edit_tree.mustache deleted file mode 100644 index 341b503..0000000 --- a/templates/core_grades/edit_tree.mustache +++ /dev/null @@ -1,45 +0,0 @@ -{{! - 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 . -}} -{{! - Edit tree. -}} - -
    -
    - - {{#notification}} - {{>core/notification_info}} - {{/notification}} - {{{table}}} -
    - {{#showsave}} - - {{/showsave}} - {{#showbulkmove}} -
    - - - -
    - {{/showbulkmove}} -
    -
    -
    diff --git a/templates/core_grades/weight_field.mustache b/templates/core_grades/weight_field.mustache deleted file mode 100644 index 3ee641b..0000000 --- a/templates/core_grades/weight_field.mustache +++ /dev/null @@ -1,23 +0,0 @@ -{{! - 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 . -}} -{{! - Weight field. -}} - - diff --git a/templates/core_grades/weight_override_field.mustache b/templates/core_grades/weight_override_field.mustache deleted file mode 100644 index 0ed8292..0000000 --- a/templates/core_grades/weight_override_field.mustache +++ /dev/null @@ -1,31 +0,0 @@ -{{! - 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 . -}} -{{! - Weight field. -}} -
    - - - - - - -
    diff --git a/templates/gradereport_history/user_button.mustache b/templates/gradereport_history/user_button.mustache deleted file mode 100644 index 90e8b70..0000000 --- a/templates/gradereport_history/user_button.mustache +++ /dev/null @@ -1,21 +0,0 @@ -
    -
    - {{#params}} - - {{/params}} - -
    -
    -{{#hasactions}} - {{#js}} - require(['core/yui'], function(Y) { - {{#actions}} - Y.on('{{event}}', {{{jsfunction}}}, '#{{id}}', null{{#jsfunctionargs}}, {{{jsfunctionargs}}}{{/jsfunctionargs}}); - {{/actions}} - }); - {{/js}} -{{/hasactions}} diff --git a/templates/gradereport_singleview/bulk_insert.mustache b/templates/gradereport_singleview/bulk_insert.mustache deleted file mode 100644 index abe592a..0000000 --- a/templates/gradereport_singleview/bulk_insert.mustache +++ /dev/null @@ -1,34 +0,0 @@ -{{! - 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 . -}} -{{! - Bulk insert attribute. -}} -
    - - -
    -
    - {{label}} - - - - {{{valuefield}}} -
    diff --git a/templates/gradereport_singleview/button.mustache b/templates/gradereport_singleview/button.mustache deleted file mode 100644 index 43fdbcf..0000000 --- a/templates/gradereport_singleview/button.mustache +++ /dev/null @@ -1,20 +0,0 @@ -{{! - 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 . -}} -{{! - Button. -}} - diff --git a/templates/gradereport_singleview/dropdown_attribute.mustache b/templates/gradereport_singleview/dropdown_attribute.mustache deleted file mode 100644 index 9f3be1a..0000000 --- a/templates/gradereport_singleview/dropdown_attribute.mustache +++ /dev/null @@ -1,25 +0,0 @@ -{{! - 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 . -}} -{{! - Dropdown attribute. -}} - - diff --git a/templates/gradereport_singleview/text_attribute.mustache b/templates/gradereport_singleview/text_attribute.mustache deleted file mode 100644 index ffd06e9..0000000 --- a/templates/gradereport_singleview/text_attribute.mustache +++ /dev/null @@ -1,22 +0,0 @@ -{{! - 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 . -}} -{{! - Text attribute. -}} - - - diff --git a/templates/gradingform_guide/comment_chooser.mustache b/templates/gradingform_guide/comment_chooser.mustache deleted file mode 100644 index 1199a1e..0000000 --- a/templates/gradingform_guide/comment_chooser.mustache +++ /dev/null @@ -1,57 +0,0 @@ -{{! - 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 gradingform_guide/comment_chooser - - Moodle comment chooser template for marking guide. - - The purpose of this template is to render a list of frequently used comments that can be used by the comment chooser dialog. - - Classes required for JS: - * none - - Data attributes required for JS: - * none - - Context variables required for this template: - * criterionId The criterion ID this chooser template is being generated for. - * comments Array of id / description pairs. - - Example context (json): - { - "criterionId": "1", - "comments": [ - { - "id": "1", - "description": "Test comment description 1" - }, - { - "id": "2", - "description": "Test comment description 2" - } - ] - } -}} -
    -
    - {{#comments}} - - {{/comments}} -
    -
    diff --git a/templates/mod_assign/grading_actions.mustache b/templates/mod_assign/grading_actions.mustache deleted file mode 100644 index 5d0818e..0000000 --- a/templates/mod_assign/grading_actions.mustache +++ /dev/null @@ -1,55 +0,0 @@ -{{! - 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 mod_assign/grading_actions - - Actions panel at the bottom of the assignment grading UI. - - Classes required for JS: - * none - - Data attributes required for JS: - * data-region - - Context variables required for this template: - * see mod/assign/classes/output/grading_app.php - - This template is initially hidden, and is only displayed after the current user info has been loaded. -}} -{{#showreview}} -
    -
    - - - -
    -
    -{{/showreview}} -
    - - - - -
    -{{#js}} -require(['mod_assign/grading_actions'], function(GradingActions) { - new GradingActions('[data-region="grade-actions"]'); -}); -{{/js}} diff --git a/templates/mod_assign/grading_navigation.mustache b/templates/mod_assign/grading_navigation.mustache deleted file mode 100644 index ab2d9e5..0000000 --- a/templates/mod_assign/grading_navigation.mustache +++ /dev/null @@ -1,103 +0,0 @@ -{{! - 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 mod_assign/grading_navigation - - Actions panel at the bottom of the assignment grading UI. - - Classes required for JS: - * none - - Data attributes required for JS: - * data-region, data-assignmentid, data-groupid - - Context variables required for this template: - * see mod/assign/classes/output/grading_app.php - - This template includes ajax functionality, so it cannot be shown in the template library. -}} -
    -
    - -{{! - There are three chunks, which appear side-by-side at large screen sizes. - A) Assignment info, which has 3 rows: -}} - -
    - -{{! - Row 1) course name & link. -}} -{{{coursename}}}
    - -{{! - Row 2) Assignment name & link, & edit settings. -}} -{{name}} - -{{#caneditsettings}} -{{#pix}}t/edit, core,{{#str}}editsettings{{/str}}{{/pix}} -{{/caneditsettings}} - -
    - -{{! - Row 3) Assignment grading & link, due date, with tool-tip thing. -}} -{{viewgrading}} - - - - -
    - -{{! - B) Current user name and info. -}} -
    - {{> mod_assign/grading_navigation_user_info }} -
    - -{{! - C) User selector widget. -}} -
    -
    - {{> mod_assign/grading_navigation_user_selector }} -
    -
    -
    -
    -{{#js}} -require(['mod_assign/grading_navigation', 'core/tooltip'], function(GradingNavigation, ToolTip) { - var nav = new GradingNavigation('[data-region="user-selector"]'); - var tooltip = new ToolTip('[data-region="assignment-tooltip"]'); -}); -{{/js}} diff --git a/templates/mod_assign/grading_navigation_user_selector.mustache b/templates/mod_assign/grading_navigation_user_selector.mustache deleted file mode 100644 index ab80917..0000000 --- a/templates/mod_assign/grading_navigation_user_selector.mustache +++ /dev/null @@ -1,66 +0,0 @@ -{{! - 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 mod_assign/grading_navigation_user_selector - - The template HTML for the user selector in the top right corner. - - Classes required for JS: - * none - - Data attributes required for JS: - * data-action, data-assignmentid, data-groupid, data-region - - Context variables required for this template: - * see mod/assign/classes/output/grading_app.php - - This template uses ajax functionality, so it cannot be shown in the template library. -}} -{{{larrow}}} - - - -{{{rarrow}}} - -
    - - - - {{#str}}xofy, mod_assign, { "x": "{{index}}", "y": "{{count}}" }{{/str}} - - - - -
    - - - - -
    -
    - - diff --git a/templates/mod_forum/big_search_form.mustache b/templates/mod_forum/big_search_form.mustache deleted file mode 100644 index 5c05e5c..0000000 --- a/templates/mod_forum/big_search_form.mustache +++ /dev/null @@ -1,188 +0,0 @@ -{{! - 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 mod_forum/big_search_form - - Big search form. - - Example context (json): - { - "actionurl": "https://example.com/mod/forum/search.php", - "courseid": "2", - "words": "apples", - "phrase": "Lorem ipsum dolor", - "notwords": "Not these words", - "showfullwords": [ - { - "fullwords": "Exactly" - } - ], - "datefromchecked": 1, - "datetochecked": "", - "forumoptions": [ - { - "name": "Forum One", - "value": "23" - }, - { - "name": "Forum Two", - "value": "34" - } - ], - "subject": "Help me please", - "user": "Helpy McUser" - } -}} - -
    -
    - - - - - - - - - - - - - - {{#showfullwords}} - - - - - {{/showfullwords}} - - - - - - - - - - - - - - - - - - - - - {{#tagsenabled}} - - - - - {{/tagsenabled}} - - - - - -
    -
    -{{#js}} -require(['jquery'], function($) { - var toggleDateFields = function(prefix, disabled) { - $('#searchform select[name^=' + prefix + ']').prop('disabled', disabled); - $('#searchform input[name^=h' + prefix + ']').val(disabled ? 1 : 0); - }; - - toggleDateFields('from', !$("#searchform input[name='timefromrestrict']").prop('checked')); - $("#searchform input[name='timefromrestrict']").click(function() { - toggleDateFields('from', !this.checked); - }); - - toggleDateFields('to', !$("#searchform input[name='timetorestrict']").prop('checked')); - $("#searchform input[name='timetorestrict']").click(function() { - toggleDateFields('to', !this.checked); - }); -}); -{{/js}} diff --git a/templates/mod_forum/quick_search_form.mustache b/templates/mod_forum/quick_search_form.mustache deleted file mode 100644 index eee32f5..0000000 --- a/templates/mod_forum/quick_search_form.mustache +++ /dev/null @@ -1,18 +0,0 @@ -
    -
    - -
    -
    - {{#helpicon}} - {{>core/help_icon}} - {{/helpicon}} -
    - - -
    - -
    -
    - -
    -
    diff --git a/templates/tool_lp/progress_bar.mustache b/templates/tool_lp/progress_bar.mustache deleted file mode 100644 index b7029db..0000000 --- a/templates/tool_lp/progress_bar.mustache +++ /dev/null @@ -1,47 +0,0 @@ -{{! - 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 tool_lp/progress_bar - - Moodle progress bar template for tool_lp. - - The purpose of this template is to render a progress bar with a brief description. - - Classes required for JS: - * none - - Data attributes required for JS: - * none - - Context variables required for this template: - * progresstextvalue A brief text that describes the progress bar. - * percentagevalue The numeric value for the progress bar's percentage. - * percentlabelvalue The progress bar's label that shows the percentage value. - - Example context (json): - { - "progresstextvalue": "Progress:", - "percentagevalue": "50", - "percentlabelvalue": "50.00 %" - } - -}} -
    - {{$progresstext}}{{progresstextvalue}}{{/progresstext}} -
    - diff --git a/templates/tool_usertours/tourstep.mustache b/templates/tool_usertours/tourstep.mustache deleted file mode 100644 index 192fec4..0000000 --- a/templates/tool_usertours/tourstep.mustache +++ /dev/null @@ -1,66 +0,0 @@ -{{! - 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 tool_usertours/tourstep - - Template used as a template to render step bubbles with their content - in a user tour. - - Classes required for JS: - * arrow - * popover-title - * popover-content - * popover-navigation - * popover-title - - Data attributes required for JS: - * data-role=prev - * data-role=next - * data-role=pause-resume - * data-pause-text - * data-resume-text - * data-role=end - * data-placeholder=body - * data-placeholder=title - - Context variables required for this template: - * None - - Example context (json): - { - } - -}} -