3293 Commits

Author SHA1 Message Date
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
Frederic Massart
4c897a815c MDL-32294 course: Add resource/activity dropdown have labels 2012-10-15 09:46:02 +08:00
Andrew Robert Nicols
a0bef1fb08 MDL-34354 Set default width for all chooser dialogues 2012-10-12 10:21:28 +01: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
Jason Fowler
52fc56a79d MDL-32184 - Course - Fixing incorrect redirect when toggling course edit while inside an activity -- Patch provided by Kanika Goyal 2012-10-05 11:44:47 +08: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
Jerome Mouneyrac
12fc8acf5b MDL-35198 replace key_exists by array_key_exists 2012-09-26 15:20:18 +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
Petr Škoda
ca6a4546d4 MDL-35479 fix course request tests to use debugging asserts 2012-09-17 11:59:00 +02:00
Marina Glancy
6a02b50ff7 MDL-35415 completely remove add activity in settings (MDL-22732) 2012-09-17 11:03:37 +08:00
Sam Hemelryk
fd9a54c2e3 Merge branch 'wip-mdl-30667' of git://github.com/rajeshtaneja/moodle 2012-09-13 11:19:30 +12:00
Sam Hemelryk
f9959166ca Merge branch 'MDL-35190' of git://github.com/mouneyrac/moodle 2012-09-11 16:46:13 +12:00
Frederic Massart
2ee34c85ac MDL-34765 Course: Fixed missing argument in course reordering 2012-09-11 16:41:44 +12:00