{{! 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 format_tiles/single_section Single Section content template. The purpose of this template is to render the content of a single section (i.e. the contents of one "tile" represeting a course topic". This is a separate template because it is called from externallib.php (i.e. from web service via JS) as well as being called from other templates (i.e. single_section_page) when rendering from PHP Classes required for JS: * none Data attributes required for JS: * none Context variables required for this template: * tileid * title * hidden_section * from_ajax * isediting * secid * canedit * tileicon * defaulttileicon * sesskey * courseid * useSubtiles * coursemodules * single_sec_add_cm_control_html * single_sec_content_is_long * alt * completion_help Example context (json): { "tileid": 1, "title": "Section 1", "hidden_section": 0, "from_ajax": 0, "isediting": 0, "secid": 101, "canedit": 1, "tileicon": "user", "defaulttileicon": "pie-chart", "sesskey": "12345678", "courseid": 99, "useSubtiles": 0, "coursemodules": [], "single_sec_add_cm_control_html": "", "single_sec_content_is_long": 0, "alt": "", "completion_help": "" } }} {{! this has to be an li for drag and drop sections to work properly (or at all) }}
  • {{#hidden_section}} {{#str}}notavailable{{/str}} {{/hidden_section}}
    {{^hidden_section}} {{^from_ajax}} {{>format_tiles/single_section_nav}} {{/from_ajax}} {{#from_ajax}}
    {{#pix}}close, format_tiles, {{#str}}close, format_tiles{{/str}}{{/pix}} {{#canedit}} {{^isediting}} {{#pix}}pencil, format_tiles, {{#str}}edit{{/str}}{{/pix}} {{/isediting}} {{/canedit}}
    {{/from_ajax}} {{^hastilephoto}}
    {{>format_tiles/tileicon}}
    {{/hastilephoto}} {{#hastilephoto}} {{#isediting}}
    {{>format_tiles/tilebarphoto}}
    {{/isediting}} {{/hastilephoto}}

    {{#isediting}}{{{inplace_editable_title}}}{{/isediting}}{{^isediting}}{{{title}}}{{/isediting}}

    {{#hidden}}{{/hidden}}
    {{{availabilitymessage}}}
    {{{summary}}}
    {{#isediting}} {{#pix}} i/settings, core{{/pix}} {{/isediting}}
      {{#course_modules}} {{>format_tiles/course_module}} {{/course_modules}} {{#useSubtiles}} {{/useSubtiles}}
    {{#isediting}} {{{single_sec_add_cm_control_html}}} {{/isediting}} {{^from_ajax}} {{#single_sec_content_is_long}} {{!repeat nav arrows at bottom of page if it is long}} {{>format_tiles/single_section_nav}} {{/single_sec_content_is_long}} {{/from_ajax}} {{#completion_help}} {{#str}}yourprogress, completion{{/str}} {{#pix}}help, core, {{alt}}{{/pix}} {{/completion_help}} {{/hidden_section}}