Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Evidence persistent file.

Copyright: 2015 Frédéric Massart - FMCorz.net
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 344 lines (11 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: evidence  - X-Ref

Evidence persistent class.

define_properties()   X-Ref
Return the definition of the properties of this model.

return: array

get_competency()   X-Ref
Return the competency linked to this.

return: competency

get_context()   X-Ref
Return the evidence's context.

return: context

get_desca()   X-Ref
Convenience method to get the description $a.

return: mixed

get_description()   X-Ref
Convenience method to get the description.

return: lang_string

set_desca($value)   X-Ref
Convenience method to set the description $a.

param: mixed $value
return: mixed

set_url($url)   X-Ref
Convenience method handling moodle_urls.

param: null|string|moodle_url $url The URL.

validate_actionuserid($value)   X-Ref
Validate the action user ID.

param: int $value A user ID.
return: true|lang_string

validate_contextid($value)   X-Ref
Validate the context ID.

param: int $value
return: true|lang_string

validate_desca($value)   X-Ref
Validate the description $a.

param: string $value
return: true|lang_string

validate_descidentifier($value)   X-Ref
Validate the description identifier.

Only validate string existence during create. If the string is removed later on we should
not prevent this model from being updated. Alternatively we could check if the string has
changed before performing the check but this overhead is not required for now.
An evidence should usually never be updated anyway.

param: string $value
return: true|lang_string

validate_grade($value)   X-Ref
Validate the grade.

For performance reason we do not validate that the grade is a valid item of the
scale associated with the competency or framework.

param: int $value The value.
return: true|lang_string

validate_usercompetencyid($value)   X-Ref
Validate the user competency.

param: int $value
return: true|lang_string

can_delete_user($userid)   X-Ref
Whether the current user can delete an evidence in the context of a user.

param: int $userid The user ID the evidence belongs to.
return: bool

get_records_for_usercompetency($usercompetencyid,\context $context,$sort = '',$order = 'ASC',$skip = 0,$limit = 0)   X-Ref
Load a list of records in a context for a user competency.

param: int $usercompetencyid The id of the user competency.
param: context $context Context to filter the evidence list.
param: string $sort The field from the evidence table to sort on.
param: string $order The sort direction
param: int $skip Limitstart.
param: int $limit Number of rows to return.
return: \core_competency\persistent[]