├── .gitattributes ├── pix ├── mergeup.png └── mergeup.svg ├── lang └── en │ ├── deprecated.txt │ └── format_flexsections.php ├── README.md ├── format.js ├── amd ├── build │ └── local │ │ ├── content │ │ ├── section.min.js │ │ └── section.min.js.map │ │ ├── courseindex │ │ ├── section.min.js │ │ ├── drawer.min.js │ │ ├── placeholder.min.js │ │ ├── drawer.min.js.map │ │ ├── section.min.js.map │ │ ├── placeholder.min.js.map │ │ └── courseindex.min.js │ │ └── courseeditor │ │ ├── mutations.min.js │ │ ├── exporter.min.js │ │ ├── mutations.min.js.map │ │ └── exporter.min.js.map └── src │ └── local │ ├── content │ └── section.js │ ├── courseindex │ ├── drawer.js │ ├── section.js │ └── placeholder.js │ └── courseeditor │ ├── mutations.js │ └── exporter.js ├── classes ├── constants.php ├── courseformat │ └── stateupdates.php ├── privacy │ └── provider.php ├── output │ ├── courseformat │ │ ├── content │ │ │ ├── cm │ │ │ │ ├── delegatedcontrolmenu.php │ │ │ │ └── controlmenu.php │ │ │ ├── bulkedittools.php │ │ │ ├── section │ │ │ │ └── header.php │ │ │ └── section.php │ │ ├── state │ │ │ ├── cm.php │ │ │ ├── course.php │ │ │ └── section.php │ │ └── content.php │ └── renderer.php └── local │ ├── hooks │ ├── output │ │ └── before_footer_html_generation.php │ └── before_activitychooserbutton_exported.php │ └── helpers │ └── preferences.php ├── db ├── upgrade.php └── hooks.php ├── version.php ├── styles.css ├── templates ├── local │ ├── courseindex │ │ ├── drawer.mustache │ │ ├── placeholders.mustache │ │ ├── courseindex.mustache │ │ └── section.mustache │ ├── content │ │ ├── addsection.mustache │ │ ├── movesection.mustache │ │ ├── movecm.mustache │ │ ├── section │ │ │ └── header.mustache │ │ ├── movesection_one.mustache │ │ ├── section.mustache │ │ └── movecm_one.mustache │ ├── navigate_back_to.mustache │ └── content.mustache └── back_link_in_cms.mustache ├── tests ├── generator │ ├── behat_format_flexsections_generator.php │ └── lib.php └── behat │ ├── delegated_sections.feature │ ├── move_section.feature │ ├── back_link_in_cms.feature │ ├── activity_chooser_plus.feature │ ├── course_crud.feature │ ├── edit_delete_sections.feature │ ├── behat_format_flexsections.php │ ├── delete_section.feature │ ├── indentation.feature │ └── add_sections.feature ├── format.php ├── .github └── workflows │ ├── moodle-release.yml │ └── moodle.yml ├── settings.php └── CHANGELOG.md /.gitattributes: -------------------------------------------------------------------------------- 1 | **/yui/build/** -diff 2 | **/amd/build/** -diff 3 | -------------------------------------------------------------------------------- /pix/mergeup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marinaglancy/moodle-format_flexsections/MOODLE_500_STABLE/pix/mergeup.png -------------------------------------------------------------------------------- /lang/en/deprecated.txt: -------------------------------------------------------------------------------- 1 | addsubsectionfor,format_flexsections 2 | cancelmoving,format_flexsections 3 | removemarker,format_flexsections 4 | setmarker,format_flexsections 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Flexible sections course format for Moodle 2 | 3 | In this course format: 4 | 5 | - sections can be added inside other sections 6 | - each section (regardless of its nesting level) can be shown either on the same page as parent or on a separate page. 7 | Teacher can change it in edit mode. 8 | - If section is displayed on a separate page, it's name is displayed as a link and on this page the link "Back to ... " 9 | is displayed 10 | - If teacher hides a section all nested sections and activities become hidden as well. 11 | 12 | Please note that if section has both activities and subsections activities are displayed first. 13 | 14 | See also https://moodle.org/plugins/format_flexsections 15 | -------------------------------------------------------------------------------- /format.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable camelcase */ 2 | // Javascript functions for Flexible sections course format. 3 | 4 | // This is no longer used but there are errors in console if this file is missing. 5 | 6 | M.course = M.course || {}; 7 | 8 | M.course.format = M.course.format || {}; 9 | 10 | /** 11 | * Get sections config for this format. 12 | * 13 | * The section structure is: 14 | *
{{#str}} movefull, moodle, {{sectiontitle}} {{/str}}:
57 |