Commit Graph

22 Commits

Author SHA1 Message Date
Jun Pataleta
7a07d34db8 MDL-54988 core: Final deprecation for lib/modinfolib methods
Final deprecation of the following methods:
- course_modinfo::build_section_cache()
- cm_info::get_deprecated_group_members_only()
- cm_info::is_user_access_restricted_by_group()

Plus throw coding exception for direct calls of the following:
- cm_info::get_url()
- cm_info::get_content()
- cm_info::get_extra_classes()
- cm_info::get_on_click()
- cm_info::get_custom_data()
- cm_info::get_after_link()
- cm_info::get_after_edit_icons()
- cm_info::obtain_dynamic_data()
2016-07-26 00:07:25 +08:00
Ankit Agarwal
4d851042eb MDL-44985 libraries: Final deprecation of conditional apis in modinfo 2014-12-10 12:20:37 +05:30
Ankit Agarwal
e56e8e3a0e MDL-44985 libraries: Final deprecation of conditional classes and apis 2014-12-10 12:20:37 +05:30
sam marshall
061e6b2864 MDL-44725 Availability: Replace groupmembersonly - upgrade, core (1)
* Upgrades existing data so that the groupmembersonly option is
  replaced with equivalent data for the new availability API.
* Removes the database field and admin setting used for
  groupmembersonly.
* Changes core modinfo library to remove/deprecate groupmembersonly
  data and functions.
* Changes other core library files to remove groupmembersonly
  references.

Includes deprecation of several functions, listed in lib/upgrade.txt.
2014-09-02 13:03:07 +01:00
Damyon Wiese
52ed065131 Merge branch 'MDL-46706-master' of https://github.com/sammarshallou/moodle
Conflicts:
	lib/tests/modinfolib_test.php
2014-08-19 17:13:05 +08:00
sam marshall
d25c41fbc5 MDL-46706 Library: API to get cm_info more easily
Creates two new functions that make it easier to get cm_info
objects (both in modinfolib.php):

get_course_and_cm($cmid) - intended for use e.g. in modules;
efficiently loads $course and $cm (normally saves 1 query).

cm_info::from_mixed($cm) - for use in back-end API where we
are not sure whether a $cm is a real cm_info or a stdClass.
2014-08-15 18:24:11 +01:00
Simey Lameze
a0372a4019 MDL-44794 group: unit test for groups_get_user_groups method. 2014-08-04 11:59:06 +08:00
Simey Lameze
93d10d162c MDL-44794 group: unit test for get_groups method. 2014-08-04 11:59:06 +08:00
sam marshall
8d1f33e122 MDL-44070 Conditional availability enhancements (6): core changes
Changes core code to use new API instead of the old one when
checking user access to activities and sections.

Includes changes to other libraries that are necessary after
adding the availability system and removing old conditional tables
etc.
2014-04-07 20:11:48 +01:00
Marina Glancy
92e2e85523 MDL-44720 modinfo: make it easier to use cm_info instead of get_coursemodule_from_id
by adding function cm_info::get_course_module_record()
2014-03-27 11:24:00 +08:00
Dan Poltawski
07e78d935f MDL-41690 cm_info: deprecate various properties 2014-01-06 10:45:59 +08:00
Marina Glancy
7fbe33fcf1 MDL-42400 generator: module generators call add_moduleinfo instead of direct inserts 2013-10-26 14:00:23 +11:00
Marina Glancy
299cfee5f2 MDL-41436 Move course content cache to MUC
added cache definition and DB field course.cacherev for cache validation
2013-09-10 14:11:45 +10:00
Marina Glancy
44ddd2a115 MDL-41219 course: Make properties of course_modinfo read-only
added phpdocs and unittests
2013-09-10 14:11:37 +10:00
Marina Glancy
cbd6b1fc63 MDL-41192 course: Added unittests for cm_info properties 2013-09-10 14:11:37 +10:00
Marina Glancy
88715ba2c0 MDL-41192 course: Can not write to the read-only properties of cm_info 2013-09-10 14:11:30 +10:00
Marina Glancy
4e4309064d MDL-41218 Object section_info calculates expensive data on demand only
Added phpdocs and unittests, removed unnecessary fields such as course and userid because they can be retrieved from modinfo
2013-09-10 14:11:24 +10:00
Marina Glancy
3e439915d3 MDL-41179 is_user_access_restricted_by_capability() must look at specified user and not current 2013-08-30 14:29:57 +10:00
Petr Škoda
e2262d70b0 MDL-39915 cleanup core_modinfolib_testcase 2013-07-27 20:28:37 +02:00
Eloy Lafuente (stronk7)
086f5f9ea8 MDL-35762 whitespace fix 2012-11-06 17:03:57 +01:00
Eloy Lafuente (stronk7)
278714a012 MDL-35762 fix deprecated use of get_fast_modinfo() reset. 2012-11-06 16:37:43 +01:00
Andrew Davis
69632d42f0 MDL-35762 core_grade: adding unit tests for modinfolib.php 2012-11-05 09:35:10 +08:00