AutorÃa | Ultima modificación | Ver Log |
{{!This file is part of Moodle - http://moodle.org/Moodle is free software: you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe 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 ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with Moodle. If not, see <http://www.gnu.org/licenses/>.}}{{!@template block_social_activities/blocksectionThis mustache emulates a course single section structure inside a block.It requires to include several divs to emulate the structure of a course format.Example context (json):{"cmlist": "Sample","siteid": 1,"sectionid": 1,"sectionname": "Sample","sectionnum": 1,"editing": true}}}<divid="block_social_activities_section"class="course-content">{{! The section list is used by the content module to init the sections.}}<divdata-for="course_sectionlist">{{! The section need some bottom padding and margin for the dropzone.Otherwise the activities will cover the area. }}<divclass="mainsection section pb-3"data-for="section"data-sectionid="{{sectionid}}"data-id="{{sectionid}}"data-number="{{sectionnum}}"data-sectionname="{{sectionname}}">{{#editing}}{{! The section header is used as a dropzone when the section is empty.}}<divclass="section-header"data-for="section_title"data-id="{{sectionid}}"data-number="{{sectionnum}}"> </div>{{/editing}}{{{cmlist}}}</div></div></div>{{#js}}{{! The block should be fast to load, we only load the editor when needed.}}{{#editing}}require(['core_courseformat/local/content'], function(component) {// We want to include both block content and block footer in the selector// because the footer has the add activity button.component.init('.block_social_activities', {});});{{/editing}}{{/js}}