Commit Graph

50 Commits

Author SHA1 Message Date
Andreas Wagner
d5ef685249 MDL-60972 core_course: delete section files, when section is deleted. 2019-01-17 08:04:13 +01:00
Damyon Wiese
7c05d8a3d2 MDL-62748 course: maxsections is a limit
For course formats shipped with core, maxsections should be a limit to the number of sections
allowed in the course.
2018-09-04 22:44:45 +02:00
Marina Glancy
a589b992f8 MDL-59259 tool_uploadcourse: apply course format options 2018-06-28 16:37:27 +08:00
Juan Leyva
ef184ad6e0 MDL-61198 course: New function for format to support external config
New function to return the course format settings for external clients
via Web Services.
Some settings (like private keys/tokens) should be not returned if the
user hasn’t appropriate permissions.
2018-04-05 11:05:47 +01:00
Alexander Bias
33a3ec7c93 MDL-58388 course: Add admin control for course end date default 2017-10-09 14:12:52 +02:00
Marina Glancy
aef5c363d0 MDL-50670 course: apply defaults when format was switched 2017-05-05 14:47:27 +08:00
Marina Glancy
98b3fa4c63 MDL-50670 course: correctly apply defaults for format options 2017-05-02 16:06:46 +08:00
Marina Glancy
89b909f6de MDL-57769 course: prepare to remove numsections option 2017-03-30 08:26:12 +08:00
Marina Glancy
8341055eb4 MDL-4782 course: Allow activities in the "stealth" mode
Add field 'visibleoncoursepage' to the course_modules table
Add site-wide setting for turning on stealth mode availability
Add callback for "stealth" mode support in the course formats
Change display of modules/sections availability on the course page
2017-02-14 16:38:05 +08:00
Jun Pataleta
87799e9fba MDL-56994 course: New method to check if format supports news forum 2016-11-21 09:50:55 +08:00
Dan Poltawski
2eb61a66dc Merge branch 'wip-MDL-56439-master' of git://github.com/marinaglancy/moodle 2016-10-24 14:33:53 +01:00
Damyon Wiese
c13115cbfa MDL-55074 blocks: Remove default blocks from course and site 2016-10-21 12:40:05 +08:00
Marina Glancy
5e4f1cfff0 MDL-56439 course: added missing require 2016-10-14 08:20:41 +08:00
Michael Aherne
4582da2464 MDL-56319 blocks: Observe empty default blocks setting 2016-10-07 09:59:09 +01:00
David Monllao
8643c576c7 MDL-22078 course: Complete proposed patch
- New site setting to define the default course duration (used to set
  the default end date for some course formats)
- End date setting out of restore
- Fix tool_uploadcourse
- Other fixes here and there
2016-10-05 12:31:05 +08:00
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