Class for loading/storing learning plan templates from the DB.
Copyright: | 2015 Damyon Wiese |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 205 lines (6 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
template:: (11 methods):
define_properties()
after_update()
before_validate()
can_manage()
can_manage_context()
can_read()
can_read_context()
get_context()
validate_contextid()
validate_duedate()
has_plans()
define_properties() X-Ref |
Return the definition of the properties of this model. return: array |
after_update($result) X-Ref |
Hook to execute after an update. param: bool $result Whether or not the update was successful. return: void |
before_validate() X-Ref |
Hook to execute before validate. return: void |
can_manage() X-Ref |
Whether or not the current user can read the template. return: bool |
can_manage_context($context) X-Ref |
Whether or not the current user can manage the template. param: context $context return: bool |
can_read() X-Ref |
Whether or not the current user can read the template. return: bool |
can_read_context($context) X-Ref |
Whether or not the current user can read the template. param: context $context return: bool |
get_context() X-Ref |
Get the context. return: context The context |
validate_contextid($value) X-Ref |
Validate the context ID. param: int $value The context ID. return: bool|lang_string |
validate_duedate($value) X-Ref |
Validate the due date. The due date can always be changed, but when it is it must be: - unset - set in the future. param: int $value The due date. return: bool|lang_string |
has_plans() X-Ref |
Returns true when the template has user learning plans. return: boolean |