3248 Commits

Author SHA1 Message Date
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
384c3510a9 MDL-35339 Course functions unit tests 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
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
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
Marina Glancy
71a56e08c8 MDL-35339 avoid using get_all_sections(), get_all_mods() and field section.sequence directly 2012-10-15 14:08:13 +08:00
Eloy Lafuente (stronk7)
28990bbef4 Merge branch 'MDL-35715-master' of git://git.luns.net.uk/moodle 2012-10-11 01:48:53 +02:00
Aparup Banerjee
d022f63202 MDL-35587 fixed up whitespaces 2012-10-09 16:35:32 +08:00
Aparup Banerjee
832e5f5957 Merge branch 'MDL-35587' of git://github.com/rlorenzo/moodle 2012-10-09 16:27:28 +08:00
Eloy Lafuente (stronk7)
3b950bab64 Merge branch 'w41_MDL-35382_m24_reordertest' of git://github.com/skodak/moodle 2012-10-08 23:54:36 +02:00
Eloy Lafuente (stronk7)
69d2746dd2 Revert "MDL-34894 course ws unit tests: fix windows problem."
This reverts commit 954c272e548c0578fde9d1bc0979ac46b72bc3b9.

With MDL-35714, each test gets gc_collect_cycles() called, so
no need to call it "manually".
2012-10-08 22:57:50 +02: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
Petr Skoda
3a222db215 MDL-35382 fix random course test failures 2012-10-06 13:27:04 +02: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
Ruslan Kabalin
9d7525fb1a MDL-35715 course dragdrop Fix the ability to drag back to the empty section 2012-10-02 14:35:28 +01: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
76ab3fa18f MDL-35263 corrected coding style 2012-10-02 12:23:43 +08:00
Eloy Lafuente (stronk7)
8614cd72f0 Merge branch 'MDL-34657' of git://github.com/timhunt/moodle 2012-10-01 23:22:39 +02: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
954c272e54 MDL-34894 course ws unit tests: fix windows problem.
This fixes a weird windows-only failure, as explained in the tracker
issue.
2012-09-27 18:57:51 +01: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
Dan Poltawski
22e8bab59a Revert "MDL-32184 - Course - Fixing incorrect redirect when toggling course edit while inside an activity -- Patch provided by Kanika Goyal"
This reverts commit 0a5181a0df82f977857168fdb9c0d18a4b459d79.
2012-09-27 11:31:51 +08:00
Dan Poltawski
03f09a8a9b Merge branch 'wip-MDL-35276-master' of git://github.com/marinaglancy/moodle 2012-09-26 15:21:29 +08:00
Marina Glancy
0e116922b4 MDL-35276 fix redirect to course/section pages 2012-09-26 15:16:24 +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
Paul Nicholls
a000ff6833 MDL-34328: course section "toolboxes" - performance rewrite
Use YUI event delegation to handle events in course section "toolboxes" (visibility and highlight toggles) rather than attaching event handlers to each individual button we care about.  Also remove the (now unused) replace_button() function.
2012-09-25 09:27:31 +01:00
Paul Nicholls
de21fb1def MDL-34328: course resource "toolboxes" - performance rewrite
Use YUI event delegation to handle events in course resource "toolboxes" (sets of editing icons) rather than attaching event handlers to each individual button we care about.  Don't waste time setting the CSS cursor to what it already is, use .all() rather than replace_button() if we just need the node.

Section toolboxes could probably also be done this way to some extent, but the payoff may not be worth the effort - they're so minimal that they don't tend to cause issues.
2012-09-25 09:27:31 +01:00
Paul Nicholls
d2ce925279 MDL-34328: course dragdrop - performance rewrite
Use YUI's DragDrop delegates for course dragdrop, rather than initialising a Drag object for each individual section and each individual activity/resource.  Also, clone a single drag handle for activities/resources, rather than repeatedly creating a whole new one with the same parameters for each activity/resource.
2012-09-25 09:27:31 +01:00
Dan Poltawski
415af656b2 Merge branch 'wip-MDL-35415-master' of git://github.com/marinaglancy/moodle 2012-09-25 14:48:44 +08:00
Marina Glancy
b874d5c6b4 MDL-35415 completely remove add activity in settings (MDL-22732) 2012-09-25 14:42:25 +08:00
Dan Poltawski
86f564e5cc Merge branch 'MDL-35321-master' of git://github.com/micaherne/moodle 2012-09-25 11:32:21 +08:00
Dan Poltawski
e00c210f55 Merge branch 'wip-MDL-32184-master' of http://github.com/phalacee/moodle 2012-09-24 15:36:10 +08:00
Jason Fowler
0a5181a0df MDL-32184 - Course - Fixing incorrect redirect when toggling course edit while inside an activity -- Patch provided by Kanika Goyal 2012-09-24 15:04:55 +08:00
Rex Lorenzo
bc3f5bcae1 MDL-35587 - Display grouping name for Drag and Dropped resources 2012-09-23 01:14:14 -07: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
Eloy Lafuente (stronk7)
3b3fc5cc76 MDL-35517 course: Handle non-existing $course->maxbytes on course creation. 2012-09-20 10:20:04 +02:00
Michael Aherne
b61670c7a7 MDL-35321 course sections Enable reset of grouping access 2012-09-19 13:13:32 +01:00
Eloy Lafuente (stronk7)
dafc3b7a85 Merge branch 'MDL-8307-master' of git://github.com/FMCorz/moodle 2012-09-19 11:33:24 +02:00
Frederic Massart
d347f30474 MDL-8307 Course: Requests without a category fallback on the default one 2012-09-19 16:51:38 +08:00