504 Commits

Author SHA1 Message Date
Marina Glancy
cad5cba676 MDL-35770 Converted scorm format to new course formats API 2012-11-14 13:58:21 +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
Frederic Massart
bb128107e3 MDL-36449 usability: Normalising icons on course page 2012-11-14 11:38:06 +08:00
Dan Poltawski
2d0d36f219 Merge branch 'wip-MDL-36048-master' of git://github.com/marinaglancy/moodle 2012-11-14 09:58:27 +08:00
Marina Glancy
fdd4b9a50a 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-10 15:39:01 +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
a353088f2c Merge branch 'wip-MDL-36342-master' of git://github.com/barbararamiro/moodle
Conflicts:
	theme/base/style/core.css
2012-11-06 14:48:22 +08:00
Barbara Ramiro
651f639ed0 MDL-36342 Usability: New icons for section in SVG and PNG formats 2012-11-05 23:43:02 +08:00
Dan Poltawski
918085d048 Revert "MDL-35260 Course formats may have settings, be enabled, disabled and uninstalled"
This reverts commit 45f93db912a17b778aca4b9ced16de79ff18abaa.
This reverts commit 3f798d4a3d11416c4c71df2038c1ec9422898e5e.
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
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
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
Dan Poltawski
9b0a3e17ba Merge branch 'wip-MDL-35769-master' of git://github.com/marinaglancy/moodle 2012-10-16 13:41:17 +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
4ede27b253 MDL-35339 deprecate get_course_section() replace with course_create_sections_if_missing()
By passing course object instead of course id we ensure proper cache reset"
2012-10-15 14:08:14 +08:00
Marina Glancy
9796014660 MDL-35339 added deprecated information in upgrade.txt 2012-10-15 14:08:14 +08:00
Marina Glancy
eda43c7d10 MDL-35339 Use get_fast_modinfo() in course sections display functions
- Avoid using field course_sections.sequence for retrieving the modules list, use functionality from
get_fast_modinfo() instead;
- In the following functions/methods mark arguments $mod, $modnames, $modnamesused and $sections as
  not used because they can be taken any time from get_fast_modinfo():
  - function print_section()
  - protected function format_section_renderer_base::section_summary()
  - private function format_section_renderer_base::section_activity_summary
  - public function format_section_renderer_base::print_single_section_page
  - public function format_section_renderer_base::print_multiple_section_page
2012-10-15 14:08:13 +08:00
Marina Glancy
d57aa283f7 MDL-35339 Deprecate get_all_mods() add get_module_types_names()
- added function get_module_types_names() returning the list of localised strings used for module names;
- added function cm_info::get_used_module_names();
- added magic properties cm_info:: and cm_info:: returning human readable module name;
- replaced usage of function get_all_mods() with get_fast_modinfo() and get_module_types_names();
- function print_section_add_menus() may now retrieve the modules names list itself;
- deprecated function get_all_mods()
2012-10-15 14:08:13 +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
Sam Hemelryk
4aede312e7 Merge branch 'wip-MDL-35276-master' of git://github.com/marinaglancy/moodle 2012-09-26 15:50:56 +12:00
Marina Glancy
923451c59f MDL-35276 fix redirect to course/section pages 2012-09-26 10:51:28 +08:00
Sam Hemelryk
38cdfab3ca MDL-31976 course: Better alt for edit section icon 2012-09-26 08:23:55 +12:00
Sam Hemelryk
d998c1a440 Merge branch 'MDL-31976-master' of git://github.com/FMCorz/moodle 2012-09-26 08:20:53 +12:00
Marina Glancy
b874d5c6b4 MDL-35415 completely remove add activity in settings (MDL-22732) 2012-09-25 14:42:25 +08:00
Frederic Massart
aad982aa24 MDL-31976 Accessbility: Action icons on course page do not need title attributes 2012-09-21 11:31:19 +08:00
Marina Glancy
6a02b50ff7 MDL-35415 completely remove add activity in settings (MDL-22732) 2012-09-17 11:03:37 +08:00
Paul Nicholls
f32cdf71a6 MDL-35134: course/format/weeks: remove trailing comma in object definition
IE doesn't like trailing commas in object (or array) definitions, and will cease processing JavaScript when it hits one.
2012-08-30 11:31:35 +12:00
Dan Poltawski
e073565364 MDL-34444 - actually display the title, just don't link it..
Don't worry, i'm going on holiday, so i'll be away from this git repo
for a while to prevent any more mess.
2012-08-22 11:16:07 +02:00
Dan Poltawski
bd43383d7e MDL-34444 course - don't show to 'unavaibile' sections title
Instead we just show the availability info in the index page,
this makes the navigation etc much simpler.
2012-08-22 10:50:39 +02:00
Dan Poltawski
569747faec MDL-34444 course: Dont display links to hidden sections
This is what happens when you dont use the navigation api
2012-08-22 08:40:52 +02:00
Frederic Massart
ad778c84e8 MDL-34648 Course: Added capability to control sections moving 2012-08-21 13:31:19 +08:00
Dan Poltawski
1c1246ec28 MDL-34829 course - allow directly linked sections to work.
Even if not in single section mode.
2012-08-14 22:56:36 +02:00
Frederic Massart
643b1de890 MDL-28207 Course: Showing/hiding/marking a section respect capabilities 2012-08-03 09:21:43 +08:00
Ankit Agarwal
9a5e297b4c MDL-34470 course: Replace all instances of get_context_instance() with context_xxx::instance() in course/ 2012-07-24 16:19:01 +08:00
Frederic Massart
5946d376cb MDL-33767 Course: General section displays its title when required 2012-07-18 17:13:11 +08:00
Frederic Massart
b8514b6a1b MDL-33767 Course: The actions on default section redirect to the correct section 2012-07-13 08:59:19 +08:00
Sam Hemelryk
0e5533b607 MDL-32769 completion: Fixed up display of completion information 2012-06-22 10:42:56 +12:00
Ankit Agarwal
dce49c1c38 MDL-32769 course: Moving the completion status to a new line 2012-06-21 16:16:48 +08:00
Ankit Agarwal
68b8cc84af MDL-32769 course: Do not show a completion status of 0/0 2012-06-21 13:29:46 +08:00