Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
|
External API class. More...
Static Public Member Functions | |
static | add_competency_to_course ($courseid, $competencyid) |
Count the competencies (visible to this user) in this course. More... | |
static | add_competency_to_course_parameters () |
Returns description of add_competency_to_course() parameters. More... | |
static | add_competency_to_course_returns () |
Returns description of add_competency_to_course() result value. More... | |
static | add_competency_to_plan ($planid, $competencyid) |
add competency to a learning plan. More... | |
static | add_competency_to_plan_parameters () |
Returns description of add_competency_to_plan() parameters. More... | |
static | add_competency_to_plan_returns () |
Returns description of add_competency_to_plan() result value. More... | |
static | add_competency_to_template ($templateid, $competencyid) |
Count the competencies (visible to this user) in this template. More... | |
static | add_competency_to_template_parameters () |
Returns description of add_competency_to_template() parameters. More... | |
static | add_competency_to_template_returns () |
Returns description of add_competency_to_template() result value. More... | |
static | add_related_competency ($competencyid, $relatedcompetencyid) |
Adds a related competency. More... | |
static | add_related_competency_parameters () |
Returns the description of the add_related_competency_parameters() parameters. More... | |
static | add_related_competency_returns () |
Returns description of add_related_competency_returns() result value. More... | |
static | approve_plan ($id) |
External function approve_plan. More... | |
static | approve_plan_parameters () |
Returns description of external function parameters. More... | |
static | approve_plan_returns () |
Returns description of external function result value. More... | |
static | call_external_function ($function, $args, $ajaxonly=false) |
Call an external function validating all params/returns correctly. More... | |
static | clean_returnvalue (external_description $description, $response) |
Clean response If a response attribute is unknown from the description, we just ignore the attribute. More... | |
static | competency_framework_viewed ($id) |
Log event competency framework viewed. More... | |
static | competency_framework_viewed_parameters () |
Returns description of competency_framework_viewed() parameters. More... | |
static | competency_framework_viewed_returns () |
Returns description of competency_framework_viewed() result value. More... | |
static | competency_viewed ($id) |
Log event competency viewed. More... | |
static | competency_viewed_parameters () |
Returns description of competency_viewed() parameters. More... | |
static | competency_viewed_returns () |
Returns description of competency_viewed() result value. More... | |
static | complete_plan ($planid) |
Complete Learning plan. More... | |
static | complete_plan_parameters () |
Returns description of complete_plan() parameters. More... | |
static | complete_plan_returns () |
Returns description of complete_plan() result value. More... | |
static | count_competencies ($filters) |
Count the existing competency frameworks. More... | |
static | count_competencies_in_course ($courseid) |
Count the competencies (visible to this user) in this course. More... | |
static | count_competencies_in_course_parameters () |
Returns description of count_competencies_in_course() parameters. More... | |
static | count_competencies_in_course_returns () |
Returns description of count_competencies_in_course() result value. More... | |
static | count_competencies_in_template ($templateid) |
Count the competencies (visible to this user) in this learning plan template. More... | |
static | count_competencies_in_template_parameters () |
Returns description of count_competencies_in_template() parameters. More... | |
static | count_competencies_in_template_returns () |
Returns description of count_competencies_in_template() result value. More... | |
static | count_competencies_parameters () |
Returns description of count_competencies() parameters. More... | |
static | count_competencies_returns () |
Returns description of count_competencies() result value. More... | |
static | count_competency_frameworks ($context, $includes) |
Count the existing competency frameworks. More... | |
static | count_competency_frameworks_parameters () |
Returns description of count_competency_frameworks() parameters. More... | |
static | count_competency_frameworks_returns () |
Returns description of count_competency_frameworks() result value. More... | |
static | count_course_module_competencies ($cmid) |
List the course modules using this competency (visible to this user) in this course. More... | |
static | count_course_module_competencies_parameters () |
Returns description of count_course_module_competencies() parameters. More... | |
static | count_course_module_competencies_returns () |
Returns description of count_course_module_competencies() result value. More... | |
static | count_courses_using_competency ($competencyid) |
Count the courses (visible to this user) that use this competency. More... | |
static | count_courses_using_competency_parameters () |
Returns description of count_courses_using_competency() parameters. More... | |
static | count_courses_using_competency_returns () |
Returns description of count_courses_using_competency() result value. More... | |
static | count_templates ($context, $includes) |
Count the existing learning plan templates. More... | |
static | count_templates_parameters () |
Returns description of count_templates() parameters. More... | |
static | count_templates_returns () |
Returns description of count_templates() result value. More... | |
static | count_templates_using_competency ($competencyid) |
Count the learning plan templates (visible to this user) that use this competency. More... | |
static | count_templates_using_competency_parameters () |
Returns description of count_templates_using_competency() parameters. More... | |
static | count_templates_using_competency_returns () |
Returns description of count_templates_using_competency() result value. More... | |
static | create_competency ($competency) |
Create a new competency. More... | |
static | create_competency_framework ($competencyframework) |
Create a new competency framework. More... | |
static | create_competency_framework_parameters () |
Returns description of create_competency_framework() parameters. More... | |
static | create_competency_framework_returns () |
Returns description of create_competency_framework() result value. More... | |
static | create_competency_parameters () |
Returns description of create_competency() parameters. More... | |
static | create_competency_returns () |
Returns description of create_competency() result value. More... | |
static | create_plan ($plan) |
Create a new learning plan. More... | |
static | create_plan_parameters () |
Returns description of create_plan() parameters. More... | |
static | create_plan_returns () |
Returns description of create_plan() result value. More... | |
static | create_template ($template) |
Create a new learning plan template. More... | |
static | create_template_parameters () |
Returns description of create_template() parameters. More... | |
static | create_template_returns () |
Returns description of create_template() result value. More... | |
static | create_user_evidence_competency ($userevidenceid, $competencyid) |
Delete a user evidence competency relationship. More... | |
static | create_user_evidence_competency_parameters () |
Returns description of external function parameters. More... | |
static | create_user_evidence_competency_returns () |
Returns description of external function result value. More... | |
static | delete_competency ($id) |
Delete a competency. More... | |
static | delete_competency_framework ($id) |
Delete a competency framework. More... | |
static | delete_competency_framework_parameters () |
Returns description of delete_competency_framework() parameters. More... | |
static | delete_competency_framework_returns () |
Returns description of delete_competency_framework() result value. More... | |
static | delete_competency_parameters () |
Returns description of delete_competency() parameters. More... | |
static | delete_competency_returns () |
Returns description of delete_competency() result value. More... | |
static | delete_evidence ($id) |
External function delete_evidence. More... | |
static | delete_evidence_parameters () |
Returns description of external function parameters. More... | |
static | delete_evidence_returns () |
Returns description of external function result value. More... | |
static | delete_plan ($id) |
Delete a plan. More... | |
static | delete_plan_parameters () |
Returns description of delete_plan() parameters. More... | |
static | delete_plan_returns () |
Returns description of delete_plan() result value. More... | |
static | delete_template ($id, $deleteplans=true) |
Delete a learning plan template. More... | |
static | delete_template_parameters () |
Returns description of delete_template() parameters. More... | |
static | delete_template_returns () |
Returns description of delete_template() result value. More... | |
static | delete_user_evidence ($id) |
Delete a user evidence. More... | |
static | delete_user_evidence_competency ($userevidenceid, $competencyid) |
Delete a user evidence competency relationship. More... | |
static | delete_user_evidence_competency_parameters () |
Returns description of external function parameters. More... | |
static | delete_user_evidence_competency_returns () |
Returns description of external function result value. More... | |
static | delete_user_evidence_parameters () |
Returns description of external function parameters. More... | |
static | delete_user_evidence_returns () |
Returns description of external function result value. More... | |
static | duplicate_competency_framework ($id) |
Duplicate a competency framework. More... | |
static | duplicate_competency_framework_parameters () |
Returns description of duplicate_competency_framework() parameters. More... | |
static | duplicate_competency_framework_returns () |
Returns description of duplicate_competency_framework() result value. More... | |
static | duplicate_template ($id) |
Duplicate a learning plan template. More... | |
static | duplicate_template_parameters () |
Returns description of duplicate_template() parameters. More... | |
static | duplicate_template_returns () |
Returns description of duplicate_template() result value. More... | |
static | external_function_info ($function, $strictness=MUST_EXIST) |
Returns detailed function information. More... | |
static | get_scale_values ($scaleid) |
Get the values associated with a scale. More... | |
static | get_scale_values_parameters () |
Returns the description of the get_scale_values() parameters. More... | |
static | get_scale_values_returns () |
Returns description of get_scale_values() result value. More... | |
static | grade_competency ($userid, $competencyid, $grade, $note=null) |
Grade a competency. More... | |
static | grade_competency_in_course ($courseid, $userid, $competencyid, $grade, $note=null) |
Grade a competency in a course. More... | |
static | grade_competency_in_course_parameters () |
Returns description of grade_competency_in_course() parameters. More... | |
static | grade_competency_in_course_returns () |
Returns description of grade_competency_in_course() result value. More... | |
static | grade_competency_in_plan ($planid, $competencyid, $grade, $note=null) |
Grade a competency in a plan. More... | |
static | grade_competency_in_plan_parameters () |
Returns description of grade_competency_in_plan() parameters. More... | |
static | grade_competency_in_plan_returns () |
Returns description of grade_competency_in_plan() result value. More... | |
static | grade_competency_parameters () |
Returns description of external function parameters. More... | |
static | grade_competency_returns () |
Returns description of external function result value. More... | |
static | list_competencies ($filters, $sort, $order, $skip, $limit) |
List the existing competency. More... | |
static | list_competencies_in_template ($templateid) |
List the competencies (visible to this user) in this learning plan template. More... | |
static | list_competencies_in_template_parameters () |
Returns description of list_competencies_in_template() parameters. More... | |
static | list_competencies_in_template_returns () |
Returns description of list_competencies_in_template() result value. More... | |
static | list_competencies_parameters () |
Returns description of list_competencies() parameters. More... | |
static | list_competencies_returns () |
Returns description of list_competencies() result value. More... | |
static | list_competency_frameworks ($sort, $order, $skip, $limit, $context, $includes, $onlyvisible, $query='') |
List the existing competency frameworks. More... | |
static | list_competency_frameworks_parameters () |
Returns description of list_competency_frameworks() parameters. More... | |
static | list_competency_frameworks_returns () |
Returns description of list_competency_frameworks() result value. More... | |
static | list_course_competencies ($courseid) |
List the competencies (visible to this user) in this course. More... | |
static | list_course_competencies_parameters () |
Returns description of list_course_competencies() parameters. More... | |
static | list_course_competencies_returns () |
Returns description of list_course_competencies() result value. More... | |
static | list_course_module_competencies ($cmid) |
List the course modules using this competency (visible to this user) in this course. More... | |
static | list_course_module_competencies_parameters () |
Returns description of list_course_module_competencies() parameters. More... | |
static | list_course_module_competencies_returns () |
Returns description of list_course_module_competencies() result value. More... | |
static | list_plan_competencies ($id) |
List plan competencies. More... | |
static | list_plan_competencies_parameters () |
External function parameters structure. More... | |
static | list_plan_competencies_returns () |
External function return structure. More... | |
static | list_templates ($sort, $order, $skip, $limit, $context, $includes, $onlyvisible) |
List the existing learning plan templates. More... | |
static | list_templates_parameters () |
Returns description of list_templates() parameters. More... | |
static | list_templates_returns () |
Returns description of list_templates() result value. More... | |
static | list_templates_using_competency ($competencyid) |
List the learning plan templates (visible to this user) that use this competency. More... | |
static | list_templates_using_competency_parameters () |
Returns description of list_templates_using_competency() parameters. More... | |
static | list_templates_using_competency_returns () |
Returns description of list_templates_using_competency() result value. More... | |
static | list_user_plans ($userid) |
External function list_user_plans. More... | |
static | list_user_plans_parameters () |
Returns description of external function parameters. More... | |
static | list_user_plans_returns () |
Returns description of external function result value. More... | |
static | move_down_competency ($competencyid) |
Change the sort order of a competency. More... | |
static | move_down_competency_parameters () |
Returns description of move_down_competency() parameters. More... | |
static | move_down_competency_returns () |
Returns description of move_down_competency() result value. More... | |
static | move_up_competency ($competencyid) |
Change the sort order of a competency. More... | |
static | move_up_competency_parameters () |
Returns description of move_up_competency() parameters. More... | |
static | move_up_competency_returns () |
Returns description of move_up_competency() result value. More... | |
static | plan_cancel_review_request ($id) |
External function plan_cancel_review_request. More... | |
static | plan_cancel_review_request_parameters () |
Returns description of external function parameters. More... | |
static | plan_cancel_review_request_returns () |
Returns description of external function result value. More... | |
static | plan_request_review ($id) |
External function plan_request_review. More... | |
static | plan_request_review_parameters () |
Returns description of external function parameters. More... | |
static | plan_request_review_returns () |
Returns description of external function result value. More... | |
static | plan_start_review ($id) |
External function plan_start_review. More... | |
static | plan_start_review_parameters () |
Returns description of external function parameters. More... | |
static | plan_start_review_returns () |
Returns description of external function result value. More... | |
static | plan_stop_review ($id) |
External function plan_stop_review. More... | |
static | plan_stop_review_parameters () |
Returns description of external function parameters. More... | |
static | plan_stop_review_returns () |
Returns description of external function result value. More... | |
static | read_competency ($id) |
Read a competency by id. More... | |
static | read_competency_framework ($id) |
Read a competency framework by id. More... | |
static | read_competency_framework_parameters () |
Returns description of read_competency_framework() parameters. More... | |
static | read_competency_framework_returns () |
Returns description of read_competency_framework() result value. More... | |
static | read_competency_parameters () |
Returns description of read_competency() parameters. More... | |
static | read_competency_returns () |
Returns description of read_competency() result value. More... | |
static | read_plan ($id) |
Read a plan by id. More... | |
static | read_plan_parameters () |
Returns description of read_plan() parameters. More... | |
static | read_plan_returns () |
Returns description of read_plan() result value. More... | |
static | read_template ($id) |
Read a learning plan template by id. More... | |
static | read_template_parameters () |
Returns description of read_template() parameters. More... | |
static | read_template_returns () |
Returns description of read_template() result value. More... | |
static | read_user_evidence ($id) |
Delete a user evidence. More... | |
static | read_user_evidence_parameters () |
Returns description of external function parameters. More... | |
static | read_user_evidence_returns () |
Returns description of external function result value. More... | |
static | remove_competency_from_course ($courseid, $competencyid) |
Count the competencies (visible to this user) in this course. More... | |
static | remove_competency_from_course_parameters () |
Returns description of remove_competency_from_course() parameters. More... | |
static | remove_competency_from_course_returns () |
Returns description of remove_competency_from_course() result value. More... | |
static | remove_competency_from_plan ($planid, $competencyid) |
Remove a competency from plan. More... | |
static | remove_competency_from_plan_parameters () |
Returns description of remove_competency_from_plan() parameters. More... | |
static | remove_competency_from_plan_returns () |
Returns description of remove_competency_from_plan() result value. More... | |
static | remove_competency_from_template ($templateid, $competencyid) |
Count the competencies (visible to this user) in this learning plan template. More... | |
static | remove_competency_from_template_parameters () |
Returns description of remove_competency_from_template() parameters. More... | |
static | remove_competency_from_template_returns () |
Returns description of remove_competency_from_template() result value. More... | |
static | remove_related_competency ($competencyid, $relatedcompetencyid) |
Removes a related competency. More... | |
static | remove_related_competency_parameters () |
Returns the description of the remove_related_competency_parameters() parameters. More... | |
static | remove_related_competency_returns () |
Returns description of remove_related_competency_returns() result value. More... | |
static | reopen_plan ($planid) |
Reopen Learning plan. More... | |
static | reopen_plan_parameters () |
Returns description of reopen_plan() parameters. More... | |
static | reopen_plan_returns () |
Returns description of reopen_plan() result value. More... | |
static | reorder_course_competency ($courseid, $competencyidfrom, $competencyidto) |
Change the order of course competencies. More... | |
static | reorder_course_competency_parameters () |
Returns description of reorder_course_competency() parameters. More... | |
static | reorder_course_competency_returns () |
Returns description of reorder_course_competency() result value. More... | |
static | reorder_plan_competency ($planid, $competencyidfrom, $competencyidto) |
Change the order of plan competencies. More... | |
static | reorder_plan_competency_parameters () |
Returns description of reorder_plan_competency() parameters. More... | |
static | reorder_plan_competency_returns () |
Returns description of reorder_plan_competency() result value. More... | |
static | reorder_template_competency ($templateid, $competencyidfrom, $competencyidto) |
Change the order of template competencies. More... | |
static | reorder_template_competency_parameters () |
Returns description of reorder_template_competency() parameters. More... | |
static | reorder_template_competency_returns () |
Returns description of reorder_template_competency() result value. More... | |
static | request_review_of_user_evidence_linked_competencies ($id) |
Send user evidence competencies to review. More... | |
static | request_review_of_user_evidence_linked_competencies_parameters () |
Returns description of external function parameters. More... | |
static | request_review_of_user_evidence_linked_competencies_returns () |
Returns description of external function result value. More... | |
static | search_competencies ($searchtext, $competencyframeworkid) |
List the existing competency frameworks. More... | |
static | search_competencies_parameters () |
Returns description of search_competencies() parameters. More... | |
static | search_competencies_returns () |
Returns description of search_competencies() result value. More... | |
static | set_context_restriction ($context) |
Set context restriction for all following subsequent function calls. More... | |
static | set_course_competency_ruleoutcome ($coursecompetencyid, $ruleoutcome) |
Change the ruleoutcome of a course competency. More... | |
static | set_course_competency_ruleoutcome_parameters () |
Returns description of update_ruleoutcome_course_competency() parameters. More... | |
static | set_course_competency_ruleoutcome_returns () |
Returns description of update_ruleoutcome_course_competency() result value. More... | |
static | set_parent_competency ($competencyid, $parentid) |
Move the competency to a new parent. More... | |
static | set_parent_competency_parameters () |
Returns description of set_parent_competency() parameters. More... | |
static | set_parent_competency_returns () |
Returns description of set_parent_competency() result value. More... | |
static | set_timeout ($seconds=360) |
This method has to be called before every operation that takes a longer time to finish! More... | |
static | template_has_related_data ($templateid) |
Check if template has related data. More... | |
static | template_has_related_data_parameters () |
Returns description of template_has_related_data() parameters. More... | |
static | template_has_related_data_returns () |
Returns description of template_has_related_data() result value. More... | |
static | template_viewed ($id) |
Log the template viewed event. More... | |
static | template_viewed_parameters () |
Returns description of template_viewed() parameters. More... | |
static | template_viewed_returns () |
Returns description of template_viewed() result value. More... | |
static | unapprove_plan ($id) |
External function unapprove_plan. More... | |
static | unapprove_plan_parameters () |
Returns description of external function parameters. More... | |
static | unapprove_plan_returns () |
Returns description of external function result value. More... | |
static | unlink_plan_from_template ($planid) |
Unlink the plan from the template. More... | |
static | unlink_plan_from_template_parameters () |
Returns description of unlink_plan_from_template_() parameters. More... | |
static | unlink_plan_from_template_returns () |
Returns description of unlink_plan_from_template_() result value. More... | |
static | update_competency ($competency) |
Update an existing competency. More... | |
static | update_competency_framework ($competencyframework) |
Update an existing competency framework. More... | |
static | update_competency_framework_parameters () |
Returns description of update_competency_framework() parameters. More... | |
static | update_competency_framework_returns () |
Returns description of update_competency_framework() result value. More... | |
static | update_competency_parameters () |
Returns description of update_competency() parameters. More... | |
static | update_competency_returns () |
Returns description of update_competency_framework() result value. More... | |
static | update_course_competency_settings ($courseid, $settings) |
Update the course competency settings. More... | |
static | update_course_competency_settings_parameters () |
Returns description of update_course_competency_settings() parameters. More... | |
static | update_course_competency_settings_returns () |
Returns description of update_course_competency_settings() result value. More... | |
static | update_plan ($plan) |
Updates a new learning plan. More... | |
static | update_plan_parameters () |
Returns description of update_plan() parameters. More... | |
static | update_plan_returns () |
Returns description of update_plan() result value. More... | |
static | update_template ($template) |
Update an existing learning plan template. More... | |
static | update_template_parameters () |
Returns description of update_template() parameters. More... | |
static | update_template_returns () |
Returns description of update_template() result value. More... | |
static | user_competency_cancel_review_request ($userid, $competencyid) |
External function user_competency_cancel_review_request. More... | |
static | user_competency_cancel_review_request_parameters () |
Returns description of external function parameters. More... | |
static | user_competency_cancel_review_request_returns () |
Returns description of external function result value. More... | |
static | user_competency_plan_viewed ($competencyid, $userid, $planid) |
Log user competency plan viewed event. More... | |
static | user_competency_plan_viewed_parameters () |
Returns description of user_competency_plan_viewed() parameters. More... | |
static | user_competency_plan_viewed_returns () |
Returns description of user_competency_plan_viewed() result value. More... | |
static | user_competency_request_review ($userid, $competencyid) |
External function user_competency_request_review. More... | |
static | user_competency_request_review_parameters () |
Returns description of external function parameters. More... | |
static | user_competency_request_review_returns () |
Returns description of external function result value. More... | |
static | user_competency_start_review ($userid, $competencyid) |
External function user_competency_start_review. More... | |
static | user_competency_start_review_parameters () |
Returns description of external function parameters. More... | |
static | user_competency_start_review_returns () |
Returns description of external function result value. More... | |
static | user_competency_stop_review ($userid, $competencyid) |
External function user_competency_stop_review. More... | |
static | user_competency_stop_review_parameters () |
Returns description of external function parameters. More... | |
static | user_competency_stop_review_returns () |
Returns description of external function result value. More... | |
static | user_competency_viewed ($usercompetencyid) |
Log user competency viewed event. More... | |
static | user_competency_viewed_in_course ($competencyid, $userid, $courseid) |
Log user competency viewed in course event. More... | |
static | user_competency_viewed_in_course_parameters () |
Returns description of user_competency_viewed_in_course() parameters. More... | |
static | user_competency_viewed_in_course_returns () |
Returns description of user_competency_viewed_in_course() result value. More... | |
static | user_competency_viewed_in_plan ($competencyid, $userid, $planid) |
Log user competency viewed in plan event. More... | |
static | user_competency_viewed_in_plan_parameters () |
Returns description of user_competency_viewed_in_plan() parameters. More... | |
static | user_competency_viewed_in_plan_returns () |
Returns description of user_competency_viewed_in_plan() result value. More... | |
static | user_competency_viewed_parameters () |
Returns description of user_competency_viewed() parameters. More... | |
static | user_competency_viewed_returns () |
Returns description of user_competency_viewed() result value. More... | |
static | validate_context ($context) |
Makes sure user may execute functions in this context. More... | |
static | validate_parameters (external_description $description, $params) |
Validates submitted function parameters, if anything is incorrect invalid_parameter_exception is thrown. More... | |
Static Protected Member Functions | |
static | get_context_from_params ($param) |
Get context from passed parameters. More... | |
static | get_context_parameters () |
Returns a prepared structure to use a context parameters. More... | |
External API class.
|
static |
Count the competencies (visible to this user) in this course.
int | $courseid | The course id to check. |
int | $competencyid | Competency id. |
int |
|
static |
Returns description of add_competency_to_course() parameters.
external_function_parameters |
|
static |
Returns description of add_competency_to_course() result value.
external_description |
|
static |
add competency to a learning plan.
int | $planid | Plan id. |
int | $competencyid | Competency id. |
int |
|
static |
Returns description of add_competency_to_plan() parameters.
external_function_parameters |
|
static |
Returns description of add_competency_to_plan() result value.
external_description |
|
static |
Count the competencies (visible to this user) in this template.
int | $templateid | Template id. |
int | $competencyid | Competency id. |
int |
|
static |
Returns description of add_competency_to_template() parameters.
external_function_parameters |
|
static |
Returns description of add_competency_to_template() result value.
external_description |
|
static |
Adds a related competency.
int | $competencyid | |
int | $relatedcompetencyid |
bool |
|
static |
Returns the description of the add_related_competency_parameters() parameters.
external_function_parameters. |
|
static |
Returns description of add_related_competency_returns() result value.
external_description |
|
static |
External function approve_plan.
int | $id | The plan ID. |
boolean |
|
static |
Returns description of external function parameters.
external_function_parameters |
|
static |
Returns description of external function result value.
external_function_parameters |
|
staticinherited |
Call an external function validating all params/returns correctly.
Note that an external function may modify the state of the current page, so this wrapper saves and restores tha PAGE and COURSE global variables before/after calling the external function.
string | $function | A webservice function name. |
array | $args | Params array (named params) |
boolean | $ajaxonly | If true, an extra check will be peformed to see if ajax is required. |
array | containing keys for error (bool), exception and data. |
|
staticinherited |
Clean response If a response attribute is unknown from the description, we just ignore the attribute.
If a response attribute is incorrect, invalid_response_exception is thrown. Note: this function is similar to validate parameters, however it is distinct because parameters validation must be distinct from cleaning return values.
external_description | $description | description of the return values |
mixed | $response | the actual response |
mixed | response with added defaults for optional items, invalid_response_exception thrown if any problem found |
|
static |
Log event competency framework viewed.
int | $id | The competency framework ID. |
boolean |
|
static |
Returns description of competency_framework_viewed() parameters.
external_function_parameters |
|
static |
Returns description of competency_framework_viewed() result value.
external_description |
|
static |
Log event competency viewed.
int | $id | The competency ID. |
boolean |
|
static |
Returns description of competency_viewed() parameters.
external_function_parameters |
|
static |
Returns description of competency_viewed() result value.
external_description |
|
static |
Complete Learning plan.
int | $planid | plan id (id is required) |
boolean |
|
static |
Returns description of complete_plan() parameters.
external_function_parameters |
|
static |
Returns description of complete_plan() result value.
external_description |
|
static |
Count the existing competency frameworks.
string | $filters | Filters to use. |
boolean |
|
static |
Count the competencies (visible to this user) in this course.
int | $courseid | The course id to check. |
int |
|
static |
Returns description of count_competencies_in_course() parameters.
external_function_parameters |
|
static |
Returns description of count_competencies_in_course() result value.
external_description |
|
static |
Count the competencies (visible to this user) in this learning plan template.
int | $templateid | The template id to check |
int |
|
static |
Returns description of count_competencies_in_template() parameters.
external_function_parameters |
|
static |
Returns description of count_competencies_in_template() result value.
external_description |
|
static |
Returns description of count_competencies() parameters.
external_function_parameters |
|
static |
Returns description of count_competencies() result value.
external_description |
|
static |
Count the existing competency frameworks.
array | $context | |
string | $includes |
int |
|
static |
Returns description of count_competency_frameworks() parameters.
external_function_parameters |
|
static |
Returns description of count_competency_frameworks() result value.
external_description |
|
static |
List the course modules using this competency (visible to this user) in this course.
int | $cmid | The course module id to check. |
array |
|
static |
Returns description of count_course_module_competencies() parameters.
external_function_parameters |
|
static |
Returns description of count_course_module_competencies() result value.
external_description |
|
static |
Count the courses (visible to this user) that use this competency.
int | $competencyid | Competency id. |
int |
|
static |
Returns description of count_courses_using_competency() parameters.
external_function_parameters |
|
static |
Returns description of count_courses_using_competency() result value.
external_description |
|
static |
Count the existing learning plan templates.
array | $context | |
string | $includes |
int |
|
static |
Returns description of count_templates() parameters.
external_function_parameters |
|
static |
Returns description of count_templates() result value.
external_description |
|
static |
Count the learning plan templates (visible to this user) that use this competency.
int | $competencyid | Competency id. |
int |
|
static |
Returns description of count_templates_using_competency() parameters.
external_function_parameters |
|
static |
Returns description of count_templates_using_competency() result value.
external_description |
|
static |
Create a new competency.
array | $competency | All the fields for a competency record (including id) |
array | the competency |
|
static |
Create a new competency framework.
array | $competencyframework | A single param with all the fields for a competency framework. |
stdClass | The new record |
|
static |
Returns description of create_competency_framework() parameters.
external_function_parameters |
|
static |
Returns description of create_competency_framework() result value.
external_description |
|
static |
Returns description of create_competency() parameters.
external_function_parameters |
|
static |
Returns description of create_competency() result value.
external_description |
|
static |
Create a new learning plan.
array | $plan | List of fields for the plan. |
array | New plan record. |
|
static |
Returns description of create_plan() parameters.
external_function_parameters |
|
static |
Returns description of create_plan() result value.
external_description |
|
static |
Create a new learning plan template.
array | $template | The list of fields for the template. |
stdClass | Record of new template. |
|
static |
Returns description of create_template() parameters.
external_function_parameters |
|
static |
Returns description of create_template() result value.
external_description |
|
static |
Delete a user evidence competency relationship.
int | $userevidenceid | The user evidence id. |
int | $competencyid | The competency id. |
boolean |
|
static |
Returns description of external function parameters.
external_function_parameters |
|
static |
Returns description of external function result value.
external_description |
|
static |
Delete a competency.
int | $id | The competency id |
boolean |
|
static |
Delete a competency framework.
int | $id | The competency framework id |
boolean |
|
static |
Returns description of delete_competency_framework() parameters.
external_function_parameters |
|
static |
Returns description of delete_competency_framework() result value.
external_description |
|
static |
Returns description of delete_competency() parameters.
external_function_parameters |
|
static |
Returns description of delete_competency() result value.
external_description |
|
static |
External function delete_evidence.
int | $id | The evidence ID. |
boolean |
|
static |
Returns description of external function parameters.
external_function_parameters |
|
static |
Returns description of external function result value.
external_function_parameters |
|
static |
Delete a plan.
int | $id | The plan id |
boolean |
|
static |
Returns description of delete_plan() parameters.
external_function_parameters |
|
static |
Returns description of delete_plan() result value.
external_description |
|
static |
Delete a learning plan template.
int | $id | The learning plan template id |
boolean | $deleteplans | True to delete the plans associated to template or false to unlink them |
boolean |
|
static |
Returns description of delete_template() parameters.
external_function_parameters |
|
static |
Returns description of delete_template() result value.
external_description |
|
static |
Delete a user evidence.
int | $id | The evidence id |
boolean |
|
static |
Delete a user evidence competency relationship.
int | $userevidenceid | The user evidence id. |
int | $competencyid | The competency id. |
boolean |
|
static |
Returns description of external function parameters.
external_function_parameters |
|
static |
Returns description of external function result value.
external_description |
|
static |
Returns description of external function parameters.
external_function_parameters |
|
static |
Returns description of external function result value.
external_description |
|
static |
Duplicate a competency framework.
int | $id | The competency framework id |
boolean |
|
static |
Returns description of duplicate_competency_framework() parameters.
external_function_parameters |
|
static |
Returns description of duplicate_competency_framework() result value.
external_description |
|
static |
Duplicate a learning plan template.
int | $id | the id of the learning plan template to duplicate |
boolean | Record of new template. |
|
static |
Returns description of duplicate_template() parameters.
external_function_parameters |
|
static |
Returns description of duplicate_template() result value.
external_description |
|
staticinherited |
Returns detailed function information.
string | object | $function | name of external function or record from external_function |
int | $strictness | IGNORE_MISSING means compatible mode, false returned if record not found, debug message if more found; MUST_EXIST means throw exception if no record or multiple records found |
stdClass | description or false if not found or exception thrown |
|
staticprotectedinherited |
Get context from passed parameters.
The passed array must either contain a contextid or a combination of context level and instance id to fetch the context. For example, the context level can be "course" and instanceid can be courseid.
See context_helper::get_all_levels() for a list of valid context levels.
array | $param |
invalid_parameter_exception |
context |
|
staticprotected |
Returns a prepared structure to use a context parameters.
external_single_structure |
Reimplemented from external_api.
|
static |
Get the values associated with a scale.
int | $scaleid | Scale ID |
array | Values for a scale. |
|
static |
Returns the description of the get_scale_values() parameters.
external_function_parameters. |
|
static |
Returns description of get_scale_values() result value.
external_multiple_structure |
|
static |
Grade a competency.
int | $userid | The user ID. |
int | $competencyid | The competency id |
int | $grade | The new grade value |
string | $note | A note to attach to the evidence |
bool |
|
static |
Grade a competency in a course.
int | $courseid | The course id |
int | $userid | The user id |
int | $competencyid | The competency id |
int | $grade | The new grade value |
string | $note | A note to add to the evidence |
bool |
|
static |
Returns description of grade_competency_in_course() parameters.
external_function_parameters |
|
static |
Returns description of grade_competency_in_course() result value.
external_value |
|
static |
Grade a competency in a plan.
int | $planid | The plan id |
int | $competencyid | The competency id |
int | $grade | The new grade value |
string | $note | A note to add to the evidence |
bool |
|
static |
Returns description of grade_competency_in_plan() parameters.
external_function_parameters |
|
static |
Returns description of grade_competency_in_plan() result value.
external_value |
|
static |
Returns description of external function parameters.
external_function_parameters |
|
static |
Returns description of external function result value.
external_value |
|
static |
List the existing competency.
string | $filters | |
int | $sort | |
string | $order | |
string | $skip | |
int | $limit |
array |
|
static |
List the competencies (visible to this user) in this learning plan template.
int | $templateid | Template id. |
array |
|
static |
Returns description of list_competencies_in_template() parameters.
external_function_parameters |
|
static |
Returns description of list_competencies_in_template() result value.
external_description |
|
static |
Returns description of list_competencies() parameters.
external_function_parameters |
|
static |
Returns description of list_competencies() result value.
external_description |
|
static |
List the existing competency frameworks.
int | $sort | |
string | $order | |
string | $skip | |
int | $limit | |
array | $context | |
bool | $includes | |
bool | $onlyvisible | |
string | $query |
array |
|
static |
Returns description of list_competency_frameworks() parameters.
external_function_parameters |
|
static |
Returns description of list_competency_frameworks() result value.
external_description |
|
static |
List the competencies (visible to this user) in this course.
int | $courseid | The course id to check. |
array |
|
static |
Returns description of list_course_competencies() parameters.
external_function_parameters |
|
static |
Returns description of list_course_competencies() result value.
external_description |
|
static |
List the course modules using this competency (visible to this user) in this course.
int | $cmid | The course module id to check. |
array |
|
static |
Returns description of list_course_module_competencies() parameters.
external_function_parameters |
|
static |
Returns description of list_course_module_competencies() result value.
external_description |
|
static |
List plan competencies.
int | $id | The plan ID. |
array |
|
static |
External function parameters structure.
external_description |
|
static |
External function return structure.
external_description |
|
static |
List the existing learning plan templates.
string | $sort | Field to sort by. |
string | $order | Sort order. |
int | $skip | Limitstart. |
int | $limit | Number of rows to return. |
array | $context | |
bool | $includes | |
bool | $onlyvisible |
array |
|
static |
Returns description of list_templates() parameters.
external_function_parameters |
|
static |
Returns description of list_templates() result value.
external_description |
|
static |
List the learning plan templates (visible to this user) that use this competency.
int | $competencyid | Competency id. |
array |
|
static |
Returns description of list_templates_using_competency() parameters.
external_function_parameters |
|
static |
Returns description of list_templates_using_competency() result value.
external_description |
|
static |
External function list_user_plans.
int | $userid | The user ID. |
boolean |
|
static |
Returns description of external function parameters.
external_function_parameters |
|
static |
Returns description of external function result value.
external_function_parameters |
|
static |
Change the sort order of a competency.
int | $competencyid | Competency id. |
boolean |
|
static |
Returns description of move_down_competency() parameters.
external_function_parameters |
|
static |
Returns description of move_down_competency() result value.
external_description |
|
static |
Change the sort order of a competency.
int | $competencyid | Competency id. |
boolean |
|
static |
Returns description of move_up_competency() parameters.
external_function_parameters |
|
static |
Returns description of move_up_competency() result value.
external_description |
|
static |
External function plan_cancel_review_request.
int | $id | The plan ID. |
boolean |
|
static |
Returns description of external function parameters.
external_function_parameters |
|
static |
Returns description of external function result value.
external_function_parameters |
|
static |
External function plan_request_review.
int | $id | The plan ID. |
boolean |
|
static |
Returns description of external function parameters.
external_function_parameters |
|
static |
Returns description of external function result value.
external_function_parameters |
|
static |
External function plan_start_review.
int | $id | The plan ID. |
boolean |
|
static |
Returns description of external function parameters.
external_function_parameters |
|
static |
Returns description of external function result value.
external_function_parameters |
|
static |
External function plan_stop_review.
int | $id | The plan ID. |
boolean |
|
static |
Returns description of external function parameters.
external_function_parameters |
|
static |
Returns description of external function result value.
external_function_parameters |
|
static |
Read a competency by id.
int | $id | The id of the competency |
stdClass |
|
static |
Read a competency framework by id.
int | $id | The id of the framework. |
stdClass |
|
static |
Returns description of read_competency_framework() parameters.
external_function_parameters |
|
static |
Returns description of read_competency_framework() result value.
external_description |
|
static |
Returns description of read_competency() parameters.
external_function_parameters |
|
static |
Returns description of read_competency() result value.
external_description |
|
static |
Read a plan by id.
int | $id | The id of the plan. |
stdClass |
|
static |
Returns description of read_plan() parameters.
external_function_parameters |
|
static |
Returns description of read_plan() result value.
external_description |
|
static |
Read a learning plan template by id.
int | $id | The id of the template. |
stdClass |
|
static |
Returns description of read_template() parameters.
external_function_parameters |
|
static |
Returns description of read_template() result value.
external_description |
|
static |
Delete a user evidence.
int | $id | The evidence id |
boolean |
|
static |
Returns description of external function parameters.
external_description |
|
static |
Returns description of external function result value.
external_description |
|
static |
Count the competencies (visible to this user) in this course.
int | $courseid | The course id to check. |
int | $competencyid | Competency id. |
int |
|
static |
Returns description of remove_competency_from_course() parameters.
external_function_parameters |
|
static |
Returns description of remove_competency_from_course() result value.
external_description |
|
static |
Remove a competency from plan.
int | $planid | Plan id. |
int | $competencyid | Competency id. |
int |
|
static |
Returns description of remove_competency_from_plan() parameters.
external_function_parameters |
|
static |
Returns description of remove_competency_from_plan() result value.
external_description |
|
static |
Count the competencies (visible to this user) in this learning plan template.
int | $templateid | Template id. |
int | $competencyid | Competency id. |
int |
|
static |
Returns description of remove_competency_from_template() parameters.
external_function_parameters |
|
static |
Returns description of remove_competency_from_template() result value.
external_description |
|
static |
Removes a related competency.
int | $competencyid | |
int | $relatedcompetencyid |
bool |
|
static |
Returns the description of the remove_related_competency_parameters() parameters.
external_function_parameters. |
|
static |
Returns description of remove_related_competency_returns() result value.
external_description |
|
static |
Reopen Learning plan.
int | $planid | plan id (id is required) |
boolean |
|
static |
Returns description of reopen_plan() parameters.
external_function_parameters |
|
static |
Returns description of reopen_plan() result value.
external_description |
|
static |
Change the order of course competencies.
int | $courseid | The course id |
int | $competencyidfrom | The competency to move. |
int | $competencyidto | The competency to move to. |
bool |
|
static |
Returns description of reorder_course_competency() parameters.
external_function_parameters |
|
static |
Returns description of reorder_course_competency() result value.
external_description |
|
static |
Change the order of plan competencies.
int | $planid | The plan id |
int | $competencyidfrom | The competency to move. |
int | $competencyidto | The competency to move to. |
bool |
|
static |
Returns description of reorder_plan_competency() parameters.
external_function_parameters |
|
static |
Returns description of reorder_plan_competency() result value.
external_description |
|
static |
Change the order of template competencies.
int | $templateid | The template id |
int | $competencyidfrom | The competency to move. |
int | $competencyidto | The competency to move to. |
bool |
|
static |
Returns description of reorder_template_competency() parameters.
external_function_parameters |
|
static |
Returns description of reorder_template_competency() result value.
external_description |
|
static |
Send user evidence competencies to review.
int | $id | The user evidence id. |
boolean |
|
static |
Returns description of external function parameters.
external_function_parameters |
|
static |
Returns description of external function result value.
external_description |
|
static |
List the existing competency frameworks.
string | $searchtext | Text to search. |
int | $competencyframeworkid | Framework id. |
array |
|
static |
Returns description of search_competencies() parameters.
external_function_parameters |
|
static |
Returns description of search_competencies() result value.
external_description |
|
staticinherited |
Set context restriction for all following subsequent function calls.
stdClass | $context | the context restriction |
|
static |
Change the ruleoutcome of a course competency.
int | $coursecompetencyid | The course competency id |
int | $ruleoutcome | The ruleoutcome value |
bool |
|
static |
Returns description of update_ruleoutcome_course_competency() parameters.
external_function_parameters |
|
static |
Returns description of update_ruleoutcome_course_competency() result value.
external_value |
|
static |
Move the competency to a new parent.
int | $competencyid | Competency id. |
int | $parentid | Parent id. |
bool |
|
static |
Returns description of set_parent_competency() parameters.
external_function_parameters |
|
static |
Returns description of set_parent_competency() result value.
external_description |
|
staticinherited |
This method has to be called before every operation that takes a longer time to finish!
int | $seconds | max expected time the next operation needs |
|
static |
Check if template has related data.
int | $templateid | Template id. |
boolean |
|
static |
Returns description of template_has_related_data() parameters.
external_function_parameters |
|
static |
Returns description of template_has_related_data() result value.
external_description |
|
static |
Log the template viewed event.
int | $id | the template id |
array | of warnings and status result |
moodle_exception |
|
static |
Returns description of template_viewed() parameters.
external_function_parameters |
|
static |
Returns description of template_viewed() result value.
external_value |
|
static |
External function unapprove_plan.
int | $id | The plan ID. |
boolean |
|
static |
Returns description of external function parameters.
external_function_parameters |
|
static |
Returns description of external function result value.
external_function_parameters |
|
static |
Unlink the plan from the template.
int | $planid | The plan id |
bool |
|
static |
Returns description of unlink_plan_from_template_() parameters.
external_function_parameters |
|
static |
Returns description of unlink_plan_from_template_() result value.
external_value |
|
static |
Update an existing competency.
array | $competency | The array of competency fields (id is required). |
boolean |
|
static |
Update an existing competency framework.
array | $competencyframework | An array with all the fields for a competency framework. |
boolean |
|
static |
Returns description of update_competency_framework() parameters.
external_function_parameters |
|
static |
Returns description of update_competency_framework() result value.
external_description |
|
static |
Returns description of update_competency() parameters.
external_function_parameters |
|
static |
Returns description of update_competency_framework() result value.
external_description |
|
static |
Update the course competency settings.
int | $courseid | the course id |
stdClass | $settings | The list of settings (currently only pushratingstouserplans). |
moodle_exception |
|
static |
Returns description of update_course_competency_settings() parameters.
external_function_parameters |
|
static |
Returns description of update_course_competency_settings() result value.
external_value |
|
static |
Updates a new learning plan.
array | $plan | Fields for the plan (id is required) |
mixed |
|
static |
Returns description of update_plan() parameters.
external_function_parameters |
|
static |
Returns description of update_plan() result value.
external_description |
|
static |
Update an existing learning plan template.
array | $template | The list of fields for the template. |
boolean |
|
static |
Returns description of update_template() parameters.
external_function_parameters |
|
static |
Returns description of update_template() result value.
external_description |
|
static |
External function user_competency_cancel_review_request.
int | $userid | The user ID. |
int | $competencyid | The competency ID. |
boolean |
|
static |
Returns description of external function parameters.
external_function_parameters |
|
static |
Returns description of external function result value.
external_function_parameters |
|
static |
Log user competency plan viewed event.
int | $competencyid | The competency ID. |
int | $userid | The user ID. |
int | $planid | The plan ID. |
boolean |
|
static |
Returns description of user_competency_plan_viewed() parameters.
external_function_parameters |
|
static |
Returns description of user_competency_plan_viewed() result value.
external_description |
|
static |
External function user_competency_request_review.
int | $userid | The user ID. |
int | $competencyid | The competency ID. |
boolean |
|
static |
Returns description of external function parameters.
external_function_parameters |
|
static |
Returns description of external function result value.
external_function_parameters |
|
static |
External function user_competency_start_review.
int | $userid | The user ID. |
int | $competencyid | The competency ID. |
boolean |
|
static |
Returns description of external function parameters.
external_function_parameters |
|
static |
Returns description of external function result value.
external_function_parameters |
|
static |
External function user_competency_stop_review.
int | $userid | The user ID. |
int | $competencyid | The competency ID. |
boolean |
|
static |
Returns description of external function parameters.
external_function_parameters |
|
static |
Returns description of external function result value.
external_function_parameters |
|
static |
Log user competency viewed event.
int | $usercompetencyid | The user competency ID. |
boolean |
|
static |
Log user competency viewed in course event.
int | $competencyid | The competency ID. |
int | $userid | The user ID. |
int | $courseid | The course ID. |
boolean |
|
static |
Returns description of user_competency_viewed_in_course() parameters.
external_function_parameters |
|
static |
Returns description of user_competency_viewed_in_course() result value.
external_description |
|
static |
Log user competency viewed in plan event.
int | $competencyid | The competency ID. |
int | $userid | The user ID. |
int | $planid | The plan ID. |
boolean |
|
static |
Returns description of user_competency_viewed_in_plan() parameters.
external_function_parameters |
|
static |
Returns description of user_competency_viewed_in_plan() result value.
external_description |
|
static |
Returns description of user_competency_viewed() parameters.
external_function_parameters |
|
static |
Returns description of user_competency_viewed() result value.
external_description |
|
staticinherited |
Makes sure user may execute functions in this context.
stdClass | $context |
|
staticinherited |
Validates submitted function parameters, if anything is incorrect invalid_parameter_exception is thrown.
This is a simple recursive method which is intended to be called from each implementation method of external API.
external_description | $description | description of parameters |
mixed | $params | the actual parameters |
mixed | params with added defaults for optional items, invalid_parameters_exception thrown if any problem found |