mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
MDL-29538 core_condition: initial commit to add support for making things conditional on user profile fields
This commit is contained in:
parent
6be7840ce6
commit
76af15bb4c
11 changed files with 399 additions and 10 deletions
|
@ -596,6 +596,12 @@ class cm_info extends stdClass {
|
|||
*/
|
||||
public $conditionsgrade;
|
||||
|
||||
/**
|
||||
* Availability conditions for this course-module based on user fields
|
||||
* @var array
|
||||
*/
|
||||
public $conditionsfield;
|
||||
|
||||
/**
|
||||
* Plural name of module type, e.g. 'Forums' - from lang file
|
||||
* @deprecated Do not use this value (you can obtain it by calling get_string instead); it
|
||||
|
@ -996,6 +1002,8 @@ class cm_info extends stdClass {
|
|||
? $mod->conditionscompletion : array();
|
||||
$this->conditionsgrade = isset($mod->conditionsgrade)
|
||||
? $mod->conditionsgrade : array();
|
||||
$this->conditionsfield = isset($mod->conditionsfield)
|
||||
? $mod->conditionsfield : array();
|
||||
|
||||
// Get module plural name.
|
||||
// TODO This was a very old performance hack and should now be removed as the information
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue