13 Commits

Author SHA1 Message Date
Ferran Recio
479faca428 MDL-73762 core_courseformat: fix coursedisplay dependency
For legacy reasons, the course renderings uses a format setting to know
if the page is multiple sections per page or a single section per page.
This format specific dependency is not solved using a get_course_display
format method any plugin can extend.
2022-02-25 13:35:23 +01:00
Ferran Recio
21d93554d4 MDL-71863 courseformat: create courseformat subsystem 2021-06-28 13:50:18 +02:00
Ferran Recio
1c839f9072 MDL-65974 course: move format_base to core_course\course_format 2021-03-11 17:36:34 +01:00
Andrew Nicols
af64bc6179 MDL-33099 Javascript: Deprecate the ajaxenabled function 2014-02-17 14:11:21 +08:00
Marina Glancy
2333bfa7e8 MDL-37976 fixed missing global 2013-02-12 12:59:35 +11:00
Marina Glancy
3776335ce2 MDL-35260 Course formats may have settings, be enabled, disabled and uninstalled 2012-11-10 15:34:29 +08:00
Marina Glancy
e010b8503e MDL-35769 Give more flexibility for course formats to extend course navigation
global_navigation::load_course_sections() now has more parameters and ensures
that current section and activity is loaded. This will allow course formats
to display hierarchical sections in navigation and have one callback for
overwriting whole course navigation
2012-11-02 10:58:21 +08:00
Marina Glancy
b5cf83f080 MDL-36017 Fields numsections, hiddensections and coursedisplay are now format-specific options
- Fields added to format_legacy as default course format options;
- Upgrade script copies fields values from table course to course_format_options;
- Fields removed from table course;
- Fields removed from edit course form;
- Since front-page course has a 'numsections' setting, format_site defines it as it's option;
- Removed accessing those fields in core code unless we know that format supports them and in this
  case instead of $course = $DB->get_record('course'); we use:
  $course = course_get_format($courseorid)->get_course(); This way all format-specific options
  are added to the $course object
2012-11-02 10:56:19 +08:00
Marina Glancy
7b7d2f4d12 MDL-36017 Added default fields to format_legacy::course_format_options()
Fields coursedisplay, numsections, hiddensections are now the default fields for formats being converted from Moodle 2.3 or earlier
2012-11-02 10:55:24 +08:00
Marina Glancy
fc79ede5a1 MDL-35768 Added format-specific options to edit course and section forms
- Course format may define additional fields (format options) to store for course and each section
- Edit course form allows to edit format-specific options and refreshes their list on format change
- Course format may provide it's own form for editing a section
- Default form for editing section allows to edit all format-specific fields
- Class section_info refactored, it defines magic methods such as __get() to access basic section
  information and format-specific options (retrieved only on the first request)
- format_base::update_course_format_options() allows to watch pre-update state of the course,
  format_legacy automatically copies the options with the same names between formats
2012-11-02 10:55:23 +08:00
Marina Glancy
a49e2ea7e6 MDL-35769 Course formats: Added function format_base::default_blocks() to replace format config.php 2012-10-15 14:14:33 +08:00
Marina Glancy
76ab3fa18f MDL-35263 corrected coding style 2012-10-02 12:23:43 +08:00
Marina Glancy
ee7084e950 MDL-35263 Converting course formats to OOP
- added class format_base as the base for all course formats
- added class format_site for the pseudo-format 'site' used for displaying activities on the front page
- added class format_legacy that overrides format_base functions with calling old-style 'callback_xxx' functions
- replaced all usage of 'callback_xxx' functions with format_base methods
- made arguments of get_section_name(), get_course_url() more flexible
- deprecated function get_generic_section_name(), it's contents is moved to format_base
- global_navigation::format_display_course_content() is removed, plugins can supress the sections navigations using extend_course_navigation()
2012-09-28 13:42:27 +08:00