1157 Commits

Author SHA1 Message Date
Sam Hemelryk
5aff38e4d8 MDL-31830 course: renamed functions for consistency
* course_move_by_one => course_change_sortorder_by_one
* course_move_after_course => course_move_after_course
* helper::action_course_move_after_course  => helper::action_course_change_sortorder_after_course
* helper::action_course_moveup 		   => helper::action_course_change_sortorder_up_one
* helper::action_course_movedown 	   => helper::action_course_change_sortorder_down_one
* helper::action_course_moveup_by_record   => helper::action_course_change_sortorder_up_one_by_record
* helper::action_course_movedown_by_record => helper::action_course_change_sortorder_down_one_by_record
* helper::action_category_movedown         => helper::action_category_change_sortorder_down_one
* helper::action_category_movedown_by_id   => helper::action_category_change_sortorder_down_one_by_id
* helper::action_category_moveup 	   => helper::action_category_change_sortorder_up_one
* helper::action_category_moveup_by_id     => helper::action_category_change_sortorder_up_one_by_id
* coursecat::move_by_one 	           => coursecat::change_sortorder_by_one
2013-10-07 10:22:36 +13:00
Sam Hemelryk
67e1f26874 MDL-31830 course: several small code improvements
* I can rebase this for you/the integrator before it goes in for sure no probs :)
* Fixed double phpdoc block of course_change_visibility
* Moved permission checks out of course_move_after_course and into helper function.
* Reviewed setType calls for editcategory_form.php.
* Reviewed all uses of can_resort and added more specific methods.
* Fixed method mentioned in exception for resort methods.
* Converted calls to fetch courses to call get_course.
* Exceptions now thrown when trying to move courses and problems arise.
* Fixed unnecessary namespace hinting in core_course_management_renderer.
* Abstracted common logic of can_resort_any and can_change_parent_any.
* Removed check for system level capability from has_manage_capability_on_any.
* Reviewed debugging calls I've introduced.
2013-10-07 10:22:36 +13:00
Sam Hemelryk
5dc361e16e MDL-31830 core_course: new course category management interface
* Implemented a new course and category management page.
* Deprecated the old management interface.
* Unit tests to cover the new API and core functions.
* Behat tests to cover the new interface.
2013-10-07 10:21:41 +13:00
Mark Nielsen
50ae8814e4 MDL-40248 mod: Allow xxx_get_types() to use default display
* Added new constant: MOD_SUBTYPE_NO_CHILDREN
* When MOD_SUBTYPE_NO_CHILDREN is returned from xxx_get_types()
  then default display is used for activity chooser.
* Updated mod/upgrade.txt
* Removed dead code from navigationlib.php instead of updating
  it for new behavior of xxx_get_types
* Updated lib/upgrade.txt
2013-09-30 16:49:37 +10:00
Ankit Agarwal
63deb5c379 MDL-39959 events: Replace add_to_log() calls with events for course module actions (create, delete and update) 2013-09-16 15:29:56 +08:00
Rajesh Taneja
3a11e2d2d6 MDL-41557 Events: Fixed event data snapshot to save valid data 2013-09-13 16:05:23 +08:00
Marina Glancy
e2e9cb6a14 MDL-37028 Fixed bug, orphaned modules are moved to the 0-section 2013-09-13 10:28:52 +10:00
Damyon Wiese
749ce98e63 MDL-37028 Integrity check for course modules and sections
This commit reinstates:
commit 0bac49dc1983824e4861086ed1ab9e13af99d76d
Author: Marina Glancy <marina@moodle.com>
Date:   Tue Sep 3 17:14:13 2013 +1000

    MDL-37028 Integrity check for course modules and sections

    If section mentioned in 'orphaned' module does not exist module is added to the first available section. Also corrected whitespaces

commit 1f0a9ce48b3e6f8c5dc6628aa692323909925032
Author: Marina Glancy <marina@moodle.com>
Date:   Mon Aug 12 14:06:48 2013 +1000

    MDL-37028 Integrity check for course modules and sections

    created function, unittest, build-in quick integrity check on each call to rebuild_course_cache()
    also added CLI script
2013-09-11 10:47:49 +08:00
Eloy Lafuente (stronk7)
34ac96bf6d Merge branch 'wip-MDL-41508-master' of git://github.com/marinaglancy/moodle 2013-09-10 14:09:34 +02:00
Damyon Wiese
eceecb72f3 Revert "MDL-37028 Integrity check for course modules and sections"
This is failing unit tests.

This reverts commit 0bac49dc1983824e4861086ed1ab9e13af99d76d.
This reverts commit 1f0a9ce48b3e6f8c5dc6628aa692323909925032.
2013-09-10 14:34:07 +08:00
Damyon Wiese
4fae13bb5e Merge branch 'wip-MDL-37028-master' of git://github.com/marinaglancy/moodle 2013-09-10 12:51:33 +08:00
Marina Glancy
6d04c4f2a2 MDL-41192 course: Added property-read cm_info::effectivegroupmode 2013-09-10 14:11:36 +10:00
Damyon Wiese
426cdef0bc Merge branch 'wip-MDL-41517-master' of git://github.com/marinaglancy/moodle 2013-09-09 12:43:32 +08:00
Mark Nelson
c3bf6181aa MDL-41417 course: allow the use of duplicated idnumbers if they existed before fix 2013-09-06 15:18:23 +08:00
Francis Devine
5536a5617c MDL-41417 course: prevent duplicate idnumbers being used when updating a course 2013-09-06 11:34:04 +08:00
Marina Glancy
0bac49dc19 MDL-37028 Integrity check for course modules and sections
If section mentioned in 'orphaned' module does not exist module is added to the first available section. Also corrected whitespaces
2013-09-03 17:14:13 +10:00
Marina Glancy
30fe1181b5 MDL-41508 Changes in indentation 2013-09-03 14:21:28 +10:00
Marina Glancy
24f824b924 MDL-41517 Do not call fix_course_sortorder unnecessarily
Thanks to Thomas Worthington
2013-09-03 13:45:00 +10:00
Dan Poltawski
c6569641e7 Merge branch 'MDL-41256-master' of https://github.com/mackensen/moodle 2013-09-03 10:51:27 +08:00
Marina Glancy
aec8fe2f9b MDL-41508 move_courses() bug fix and DB query improvement 2013-08-30 16:47:25 +10:00
Marina Glancy
1f0a9ce48b MDL-37028 Integrity check for course modules and sections
created function, unittest, build-in quick integrity check on each call to rebuild_course_cache()
also added CLI script
2013-08-30 16:41:13 +10:00
Marina Glancy
d55f05ef43 MDL-41181 function moveto_module does not modify properties of object
instead it returns the new value for module visibility
2013-08-27 15:36:40 +10:00
Charles Fulton
9930e4267c MDL-41256 course: improved debugging on course creation 2013-08-26 06:59:33 -07:00
Damyon Wiese
74df2951d1 Revert "MDL-39876 Change get_record('course') calls to get_course"
This reverts commit ab7632b74c331540c90229bf03d13aa2e6bdd9be.
2013-08-21 13:42:30 +08:00
Dan Poltawski
d99a300563 Merge branch 'wip-MDL-36690-master' of git://github.com/marinaglancy/moodle 2013-08-21 11:35:27 +08:00
Sam Hemelryk
487caf6b65 Revert "MDL-39876 update_course_record function to update global COURSE"
This reverts commit c290ac5510ca06b3eae557c2165c2f106dde46aa.

Conflicts:
	course/lib.php
2013-08-21 15:21:06 +12:00
Marina Glancy
4fcdb0123c MDL-36690 Do not cache objects inside course.modinfo as they may fail to serialize
convert moodle_url (all other fields are numbers or strings) to string before caching and then back to moodle_url when restoring.
Otherwise serialized modinfo can contain \0 byte which cause problems in Postgres DB
2013-08-21 12:30:38 +10:00
Sam Hemelryk
6eee89bc8f Merge branch 'MDL-39876-master' of git://github.com/sammarshallou/moodle
Conflicts:
	course/lib.php
2013-08-21 12:08:46 +12:00
Dan Poltawski
43964b852a Merge branch 'MDL-41125-master' of git://github.com/FMCorz/moodle 2013-08-20 17:10:05 +08:00
Dan Poltawski
7d7e0292cb Merge branch 'wip-MDL-40974-m26' of git://github.com/samhemelryk/moodle 2013-08-20 15:13:02 +08:00
Dan Poltawski
91a888df34 Merge branch 'MDL-39957_master' of https://github.com/markn86/moodle 2013-08-20 12:38:08 +08:00
Sam Hemelryk
25c605a526 MDL-40974 course: fixed group mode icon now has tooltip 2013-08-16 08:59:01 +12:00
sam marshall
c290ac5510 MDL-39876 update_course_record function to update global COURSE 2013-08-15 11:31:21 +01:00
sam marshall
ab7632b74c MDL-39876 Change get_record('course') calls to get_course 2013-08-15 11:31:20 +01:00
Mark Nelson
ed54cb4110 MDL-39957 course: replaced add_to_log for moving courses 2013-08-15 18:14:08 +08:00
Mark Nelson
2bf2f3599e MDL-39957 course: altered the handling of legacy log data for the course_updated event 2013-08-15 18:14:08 +08:00
Mark Nelson
53a8e678bf MDL-39957 course: replaced the course_updated legacy event 2013-08-15 18:14:07 +08:00
Mark Nelson
3c2fab942b MDL-39957 course: replaced the course_created legacy event 2013-08-15 18:14:07 +08:00
Damyon Wiese
bbb483b259 MDL-36002 Drag and Drop: Improvements to keyboard drag and drop
List of fixes:
* Add a simulated drag start event to fix problems with block drag and drop that
  were expecting it.
* Add an access-hidden title for the General section in a course format. This
  is used to provide the text for the drop region (better than the first activity in the section)
* Changed the text in the list to 'Move to "General"' instead of 'Move after General'. This
  makes more sense for activities when you have a list of activities and sections together.
2013-08-15 16:15:32 +08:00
Damyon Wiese
dd66b6ab48 MDL-36002 core: Make drag and drop keyboard friendly (round 2) 2013-08-15 14:39:00 +08:00
Sam Hemelryk
702d1f853e Revert "MDL-36002 core: Make drag and drop keyboard friendly"
This reverts commit 7c271b9, 313e585, ade4695, and 70b4027

Conflicts:
	theme/bootstrapbase/style/moodle.css
2013-08-15 13:59:06 +12:00
Sam Hemelryk
615cf2d15a Merge branch 'MDL-41045-master' of git://github.com/sammarshallou/moodle 2013-08-13 10:19:34 +12:00
Sam Hemelryk
6648f17384 Merge branch 'wip-MDL-41114-master' of git://github.com/marinaglancy/moodle 2013-08-13 09:32:48 +12:00
Marina Glancy
a7a04f6d62 MDL-41114 Avoid unnecessary retrieving of coursecat from DB
- course category depth can be estimated in make_categories_options() by the number of separators
2013-08-12 15:07:46 +10:00
Dan Poltawski
f2b45ad65f Merge branch 'MDL-36002-master' of git://github.com/damyon/moodle
Conflicts:
	theme/base/style/core.css
	theme/bootstrapbase/style/moodle.css
2013-08-12 11:56:37 +08:00
Frederic Massart
5297336942 MDL-41125 course: Only require dndupload library when necessary 2013-08-12 11:34:51 +08:00
sam marshall
5523c34462 MDL-41045 course_add_cm_to_section should not test for sections unless necessary 2013-08-07 17:17:04 +01:00
Petr Škoda
2f1e464a88 MDL-40438 migrate all collatorlib:: and textlib:: uses 2013-08-06 21:04:35 +02:00
Damyon Wiese
7c271b918e MDL-36002 core: Make drag and drop keyboard friendly
This change adds keyboard support to core drag and drop.

Selecting a grab handle and hitting enter (or space) will
open a menu of possible drop targets and allow you to choose one.

The only other UI change this implies is we need to show the grab
for blocks.
2013-07-31 16:43:25 +08:00
Sam Hemelryk
3665af78ca MDL-39814 actionmenu: improved alignment, constraint handling, and accessibility 2013-07-30 16:15:26 +12:00