Class represents the result of an availability check for the user.
More...
|
| __construct ($available, tree_node $node=null, array $failedchildren=array()) |
| Constructs result.
|
|
| filter_nodes (array $array) |
| Filters the provided array so that it only includes nodes which are supposed to be displayed in the result output.
|
|
| is_available () |
| Checks if the result was a yes.
|
|
|
bool | $available |
| True if the item is available.
|
|
tree_node[] | $shownodes = array() |
| Array of nodes to display in failure information (node=>node).
|
|
Class represents the result of an availability check for the user.
You can pass an object of this class to tree\get_result_information to display suitable student information about the result.
- Copyright
- 2014 The Open University
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
core_availability\result::__construct |
( |
| $available, |
|
|
tree_node | $node = null, |
|
|
array | $failedchildren = array() ) |
Constructs result.
- Parameters
-
bool | $available | True if available |
tree_node | $node | Node if failed & should be displayed |
result[] | $failedchildren | Array of children who failed too |
◆ filter_nodes()
core_availability\result::filter_nodes |
( |
array | $array | ) |
|
Filters the provided array so that it only includes nodes which are supposed to be displayed in the result output.
(I.e. those for which the user failed the test, and which are not set to totally hide output.)
- Parameters
-
tree_node[] | $array | Input array of nodes |
- Return values
-
array | Output array containing only those nodes set for display |
◆ is_available()
core_availability\result::is_available |
( |
| ) |
|
Checks if the result was a yes.
- Return values
-
bool | True if the activity is available |
The documentation for this class was generated from the following file:
- availability/classes/result.php