Commit Graph

35 Commits

Author SHA1 Message Date
Marina Glancy
5e717d10b4 MDL-54557 course: treat section summary as contents 2016-06-02 12:56:34 +08:00
Marina Glancy
787ec240c1 MDL-53772 inplace_editable: set context in callbacks 2016-04-14 13:58:29 +08:00
Marina Glancy
f26481c2dc MDL-51802 course: allow to edit section names on the course page 2016-02-13 11:07:46 +08:00
Jun Pataleta
f1bfc8971f MDL-51250 course: Display the default section name
This patch makes the default section name appear in brackets
beside the 'Use default section name' checkbox.
2015-10-05 14:03:07 -05:00
Colin Campbell
6825560889 MDL-34921 course/format: Fix unwanted redirects from Site home 2015-04-04 21:31:35 -05:00
Marina Glancy
ca9cae84ad MDL-10405 course: deleting sections 2015-02-09 16:46:07 +08:00
Sam Hemelryk
53623a70f0 MDL-26226 course: new setting for sections as links
This commit adds a new setting to always display course sections
as links (if possible).
2014-11-20 15:41:24 +13:00
Marina Glancy
daad1b4b97 MDL-46937 modinfo: Allow course format to overwrite section availability 2014-09-18 16:18:22 +08:00
Tim Hunt
5bcfd504df MDL-45618 Fix @since PHPdoc tags. 2014-05-19 17:03:04 +01:00
Andrew Nicols
af64bc6179 MDL-33099 Javascript: Deprecate the ajaxenabled function 2014-02-17 14:11:21 +08:00
Marina Glancy
7456c96766 MDL-41384 course: do not show debugging message if $COURSE contains format options
before showing debugging message make sure that field exists in database and not only in the object
2014-01-31 16:56:30 +08:00
Renaat Debleu
6382c482c8 MDL-42795 course: fixed param course in sql
course_sections has course field and not courseid, hence replaced it with course.
2013-11-11 10:24:09 +08:00
Frederic Massart
d9203fb775 MDL-41611 format_singleactivity: Only hide unnecessary elements 2013-10-04 18:21:13 +08:00
Petr Škoda
bd3b3bba9f MDL-40220 use new core_component::get_plugin_list() 2013-07-16 22:36:11 +02:00
sam marshall
a260245739 MDL-39723 Remove unnecessary queries for COURSE, SITE 2013-05-28 13:14:55 +01:00
Tim Hunt
6382060daf MDL-39450 course formats: add static cache to get_format_or_default
This function gets called hundreds of times on every page, often with
exactly the same input, so I added a static cache.
2013-05-02 16:38:52 +01:00
Marina Glancy
081c8f7fe0 MDL-36594 Add function format_base::is_section_current()
- added function format_base::is_section_current()
- overwritten in format_weeks::is_section_current()
- deprecated function format_section_renderer_base::is_section_current()
2012-11-14 15:54:13 +08:00
Marina Glancy
5ef23705f6 MDL-36048 Allow course formats to add course headers and footers
- Added functions in class format_base
- Added global functions in course/lib.php
- Added calling of course header/footer functions to the base theme
- output renderer checks if theme calls the coures content header/footer functions, if not calls them explicitly and displays a development warning
2012-11-14 13:50:10 +08:00
Marina Glancy
3776335ce2 MDL-35260 Course formats may have settings, be enabled, disabled and uninstalled 2012-11-10 15:34:29 +08:00
Dan Poltawski
4b5a6b1327 Merge branch 'wip-MDL-36317-master' of git://github.com/marinaglancy/moodle
Conflicts:
	course/format/lib.php
2012-11-07 16:41:53 +08:00
Dan Poltawski
53b6a75a99 Merge branch 'wip-MDL-35279-master' of git://github.com/marinaglancy/moodle 2012-11-07 14:44:26 +08:00
Dan Poltawski
918085d048 Revert "MDL-35260 Course formats may have settings, be enabled, disabled and uninstalled"
This reverts commit 45f93db912.
This reverts commit 3f798d4a3d.
2012-11-05 15:20:22 +08:00
Dan Poltawski
1fc59b22de Merge branch 'wip-MDL-35260-master' of git://github.com/marinaglancy/moodle 2012-11-05 15:04:25 +08:00
Dan Poltawski
1872a0f26e MDL-35768 - fix trailing whitespace 2012-11-05 14:46:00 +08:00
Dan Poltawski
6b02cc4fc1 MDL-35768 - fix E_STRICT issue 2012-11-05 14:31:54 +08:00
Marina Glancy
45f93db912 MDL-35260 Course formats may have settings, be enabled, disabled and uninstalled 2012-11-05 11:46:34 +08:00
Marina Glancy
92d38668ac MDL-35768 MDL-36017 code style corrections 2012-11-02 13:53:48 +08:00
Marina Glancy
695705f5d4 MDL-36317 Execute course format callback when course or module is set on page 2012-11-02 11:02:22 +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
aea2e3c30d MDL-35768 Allow caching of section format options in course.sectioncache 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