/** * Returns description of data_for_plan_page() result value. * * @return \external_description */ public static function data_for_plan_page_returns() { $uc = user_competency_exporter::get_read_structure(); $ucp = user_competency_plan_exporter::get_read_structure(); $uc->required = VALUE_OPTIONAL; $ucp->required = VALUE_OPTIONAL; return new external_single_structure(array('plan' => plan_exporter::get_read_structure(), 'contextid' => new external_value(PARAM_INT, 'Context ID.'), 'pluginbaseurl' => new external_value(PARAM_URL, 'Plugin base URL.'), 'competencies' => new external_multiple_structure(new external_single_structure(array('competency' => competency_exporter::get_read_structure(), 'comppath' => competency_path_exporter::get_read_structure(), 'usercompetency' => $uc, 'usercompetencyplan' => $ucp))), 'competencycount' => new external_value(PARAM_INT, 'Count of competencies'), 'proficientcompetencycount' => new external_value(PARAM_INT, 'Count of proficientcompetencies'), 'proficientcompetencypercentage' => new external_value(PARAM_FLOAT, 'Percentage of competencies proficient'), 'proficientcompetencypercentageformatted' => new external_value(PARAM_RAW, 'Displayable percentage'))); }