[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 <?php 2 // This file is part of Moodle - http://moodle.org/ 3 // 4 // Moodle is free software: you can redistribute it and/or modify 5 // it under the terms of the GNU General Public License as published by 6 // the Free Software Foundation, either version 3 of the License, or 7 // (at your option) any later version. 8 // 9 // Moodle is distributed in the hope that it will be useful, 10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 // GNU General Public License for more details. 13 // 14 // You should have received a copy of the GNU General Public License 15 // along with Moodle. If not, see <http://www.gnu.org/licenses/>. 16 17 /** 18 * Class for exporting user evidence competency data. 19 * 20 * @package tool_lp 21 * @copyright 2016 Serge Gauthier - <serge.gauthier.2@umontreal.ca> 22 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 */ 24 namespace tool_lp\external; 25 26 use moodle_url; 27 use renderer_base; 28 use core_competency\external\competency_exporter; 29 use core_competency\external\user_competency_exporter; 30 31 /** 32 * Class for exporting user evidence competency data. 33 * 34 * @copyright 2016 Serge Gauthier - <serge.gauthier.2@umontreal.ca> 35 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 36 */ 37 class user_evidence_competency_summary_exporter extends \core_competency\external\exporter { 38 39 protected static function define_related() { 40 return array('competency' => '\\core_competency\\competency', 41 'usercompetency' => '\\core_competency\\user_competency', 42 'scale' => 'grade_scale', 43 'context' => '\\context' 44 ); 45 } 46 47 protected static function define_other_properties() { 48 return array( 49 'competency' => array( 50 'type' => competency_exporter::read_properties_definition() 51 ), 52 'usercompetency' => array( 53 'type' => user_competency_exporter::read_properties_definition(), 54 ) 55 ); 56 } 57 58 protected function get_other_values(renderer_base $output) { 59 $competencyexporter = new competency_exporter($this->related['competency'], 60 array('context' => $this->related['context'])); 61 $usercompetencyexporter = new user_competency_exporter($this->related['usercompetency'], 62 array('scale' => $this->related['scale'])); 63 64 $values = array( 65 'competency' => $competencyexporter->export($output), 66 'usercompetency' => $usercompetencyexporter->export($output) 67 ); 68 69 return $values; 70 } 71 72 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |