Commit graph

1091 commits

Author SHA1 Message Date
Dan Poltawski
e7468fb2ed Merge branch 'wip-MDL-35770-master' of git://github.com/marinaglancy/moodle 2012-11-15 16:26:26 +08:00
Marina Glancy
a062c97ce8 MDL-36594 reset cache inside course format when course marker is changed 2012-11-15 16:20:05 +08:00
Dan Poltawski
e4a9cc642f Merge branch 'MDL-36417-master' of git://github.com/FMCorz/moodle 2012-11-15 10:39:08 +08:00
Dan Poltawski
0e35ba6ffc MDL-36357 cleanup - remove double semicolons 2012-11-15 09:51:26 +08:00
Frederic Massart
fbb207c57a MDL-36323 usability: New icon names to assign and switch roles 2012-11-14 14:07:40 +08:00
Frederic Massart
10994f27a1 MDL-36449 usability: Improved renaming toolbox and alignment on course page 2012-11-14 11:38:11 +08:00
Frederic Massart
bb128107e3 MDL-36449 usability: Normalising icons on course page 2012-11-14 11:38:06 +08:00
Frederic Massart
00a342341c MDL-36417 course: Toggling section visibility update module visibility 2012-11-14 09:32:38 +08:00
Adrian Greeve
fae51910bf MDL-31750 - course: Creating a consistent api for checking permissions for moving courses to different categories. 2012-11-13 09:42:45 +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
2ac705c41d Merge branch 'MDL-36092-master' of git://git.luns.net.uk/moodle 2012-11-07 16:56:11 +08:00
Frederic Massart
281d730ea6 MDL-36392 course: Adding a module to a section does not corrupt its sequence 2012-11-06 17:00:47 +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
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
850acb3560 MDL-35768 MDL-36017 Avoid calling format_base::get_course() when not necessary
- If we want to check fields 'numsections' or 'hiddensections' call course_get_format()->get_format_options()
- We still use extended course object in course/edit.php, update_course(), create_course(), and inside course formats
2012-11-05 11:22:06 +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
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
Andrew Robert Nicols
2757a205c8 MDL-36092 Course/AJAX Ensure that dropdown resource pickers are shown when JS is disabled 2012-11-01 07:50:41 +00:00
Dan Poltawski
0caa0c869b Merge branch 'MDL-4655-master' of git://github.com/FMCorz/moodle 2012-10-30 11:58:34 +08:00
Sam Hemelryk
558aecf818 Merge branch 'wip-mdl-36131' of git://github.com/rajeshtaneja/moodle 2012-10-30 12:24:31 +13:00
Andrew Robert Nicols
afe3566cca MDL-35836 Rewrite doctonewwindow handling to use delegation instead of individual events 2012-10-26 08:52:23 +08:00
Rajesh Taneja
57bda78540 MDL-36131 AJAX: Conditional activities will behave same as in non-ajax mode 2012-10-19 17:10:25 +08:00
Frederic Massart
3b7bfbb5b8 MDL-4655 course: Number of courses with summaries to display is configurable 2012-10-18 11:07:17 +08:00
Dan Poltawski
0651778e95 Merge branch 'MDL-32294-master' of git://github.com/FMCorz/moodle 2012-10-16 10:41:24 +08:00
Marina Glancy
44aa854e93 MDL-35339 coding style corrections 2012-10-15 16:57:25 +08:00
Marina Glancy
2e4c0d05e1 MDL-35339 Fixing rebase with MDL-35634 2012-10-15 16:18:55 +08:00
Marina Glancy
b46be6adf4 MDL-35339 Better cache reset for get_fast_modinfo(), allow exec get_fast_modinfo($courseid) 2012-10-15 14:08:15 +08:00
Marina Glancy
38b19bbca1 MDL-35339 call rebuild_course_cache() always (and only) after changing course modules or sections 2012-10-15 14:08:14 +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
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
722e6ba947 MDL-35339 Deprecate add_mod_to_section(), create new function course_add_cm_to_section()
Function add_mod_to_section() has very confusing arguments when object  looks like record from
table course_modules but field ->section refers to relative section number (course_sections.section).
In table course_modules the field section refers to course_sections.id.
Also add_mod_to_section() does not update table course_modules and does not call rebuild_course_cache()
which developer can forget to do afterwards.

- Added function course_add_cm_to_section()
- In the core code add_mod_to_section() is replaced with course_add_cm_to_section()
- Function add_mod_to_section() is deprecated
2012-10-15 14:08:13 +08:00
Marina Glancy
99e9f9a69d MDL-35339 deprecate function get_all_sections() 2012-10-15 14:08:13 +08:00
Frederic Massart
4c897a815c MDL-32294 course: Add resource/activity dropdown have labels 2012-10-15 09:46:02 +08:00
Aparup Banerjee
db739bf096 Merge branch 'wip-MDL-35694' of git://github.com/jennymgray/moodle 2012-10-08 17:24:53 +08:00
Sam Hemelryk
dc67f522cf Merge branch 'MDL-35634-master' of git://github.com/FMCorz/moodle 2012-10-08 11:36:57 +13:00
Jenny Gray
e85a341292 MDL-35694 logs: extend course log report downloads with action url 2012-10-05 09:17:40 +01:00
Frederic Massart
ddb16bdd38 MDL-35634 course: Restored alt attribute on module icons 2012-10-03 17:03:35 +08:00
Dan Poltawski
0d24043d66 Merge branch 'wip-MDL-35263-master' of git://github.com/marinaglancy/moodle 2012-10-02 12:49:26 +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
Tim Hunt
9695ff811b MDL-34657 user sorting: consistent sorting everywhere.
This commit coverts everything in the codebase to use the new
users_order_by_sql function when sorting lists of users. More details in
the bug.

Note that this does not change places where users are displayed in a
sortable table, and the sort order comes from the table.
2012-09-27 12:41:42 +01: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
Frederic Massart
aad982aa24 MDL-31976 Accessbility: Action icons on course page do not need title attributes 2012-09-21 11:31:19 +08:00
Frederic Massart
d347f30474 MDL-8307 Course: Requests without a category fallback on the default one 2012-09-19 16:51:38 +08:00
Frederic Massart
59b9a14063 MDL-8307 Course: Course requests can suggest a category 2012-09-07 11:22:08 +08:00
Aparup Banerjee
13a20081d3 MDL-34429 fixed whitespace. 2012-08-27 12:07:15 +08:00
Aparup Banerjee
ed170bd86c Merge branch 'wip-MDL-34429-master' of git://github.com/abgreeve/moodle 2012-08-27 12:04:45 +08:00
Rex Lorenzo
1f09018af7 MDL-34866 - Make "course display" default a site configurable option
* Moved COURSE_DISPLAY_SINGLEPAGE and COURSE_DISPLAY_MULTIPAGE constants from courselib to moodlelib.php
* Using course display constants in course default admin setting page
2012-08-14 12:12:14 -07:00
Adrian Greeve
941c251304 MDL-34429 - lib - Changed the log downloads to use the new CSV class. 2012-08-14 16:03:21 +08:00