Class for user_competency_course persistence.
Copyright: | 2016 Jun Pataleta |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 293 lines (9 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
user_competency_course:: (12 methods):
define_properties()
get_competency()
get_context()
create_relation()
validate_userid()
validate_competencyid()
validate_courseid()
validate_proficiency()
validate_grade()
get_multiple()
count_proficient_competencies()
get_least_proficient_competencies_for_course()
Class: user_competency_course - X-Ref
Class for loading/storing user_competency_course from the DB.define_properties() X-Ref |
Return the definition of the properties of this model. return: array |
get_competency() X-Ref |
Return the competency Object. return: competency Competency Object |
get_context() X-Ref |
Get the context. return: context The context. |
create_relation($userid, $competencyid, $courseid) X-Ref |
Create a new user_competency_course object. Note, this is intended to be used to create a blank relation, for instance when the record was not found in the database. This does not save the model. return: \core_competency\user_competency_course param: int $userid The user ID. param: int $competencyid The competency ID. param: int $courseid The course ID. |
validate_userid($value) X-Ref |
Validate the user ID. return: true|lang_string param: int $value The value. |
validate_competencyid($value) X-Ref |
Validate the competency ID. return: true|lang_string param: int $value The value. |
validate_courseid($value) X-Ref |
Validate course ID. return: true|lang_string param: int $value The course ID. |
validate_proficiency($value) X-Ref |
Validate the proficiency. return: true|lang_string param: int $value The value. |
validate_grade($value) X-Ref |
Validate the grade. return: true|lang_string param: int $value The value. |
get_multiple($userid, $courseid, array $competenciesorids = null) X-Ref |
Get multiple user_competency_course for a user. return: \core_competency\user_competency_course[] param: int $userid param: int $courseid param: array $competenciesorids Limit search to those competencies, or competency IDs. |
count_proficient_competencies($courseid, $userid) X-Ref |
Count the proficient competencies in this course for one user. return: int param: int $courseid The course id param: int $userid The user id |
get_least_proficient_competencies_for_course($courseid, $skip = 0, $limit = 0) X-Ref |
Get the list of competencies that were completed the least times in a course. return: competency[] param: int $courseid param: int $skip The number of competencies to skip param: int $limit The max number of competencies to return |