MDL-53700 competency: Migrating exporters to core
authorFrederic Massart <fred@moodle.com>
Tue, 5 Apr 2016 04:10:28 +0000 (12:10 +0800)
committerFrederic Massart <fred@moodle.com>
Mon, 18 Apr 2016 03:05:59 +0000 (11:05 +0800)
50 files changed:
admin/tool/lp/classes/course_competencies_form_element.php
admin/tool/lp/classes/course_competency_rule_form_element.php
admin/tool/lp/classes/external.php
admin/tool/lp/classes/external/cohort_summary_exporter.php
admin/tool/lp/classes/external/competency_path_exporter.php
admin/tool/lp/classes/external/competency_summary_exporter.php
admin/tool/lp/classes/external/course_competency_statistics_exporter.php
admin/tool/lp/classes/external/course_module_summary_exporter.php
admin/tool/lp/classes/external/course_summary_exporter.php
admin/tool/lp/classes/external/path_node_exporter.php
admin/tool/lp/classes/external/template_statistics_exporter.php
admin/tool/lp/classes/external/user_competency_summary_exporter.php
admin/tool/lp/classes/external/user_competency_summary_in_course_exporter.php
admin/tool/lp/classes/external/user_competency_summary_in_plan_exporter.php
admin/tool/lp/classes/external/user_evidence_competency_summary_exporter.php
admin/tool/lp/classes/external/user_evidence_summary_exporter.php
admin/tool/lp/classes/output/course_competencies_page.php
admin/tool/lp/classes/output/manage_competencies_page.php
admin/tool/lp/classes/output/manage_competency_frameworks_page.php
admin/tool/lp/classes/output/manage_templates_page.php
admin/tool/lp/classes/output/plan_page.php
admin/tool/lp/classes/output/plans_page.php
admin/tool/lp/classes/output/related_competencies.php
admin/tool/lp/classes/output/template_competencies_page.php
admin/tool/lp/classes/output/user_competency_course_navigation.php
admin/tool/lp/templates/course_competency_statistics.mustache
admin/tool/lp/templates/template_statistics.mustache
admin/tool/lp/tests/exporter_test.php
admin/tool/lp/user_competency.php
competency/classes/external/comment_area_exporter.php [moved from admin/tool/lp/classes/external/comment_area_exporter.php with 97% similarity]
competency/classes/external/competency_exporter.php [moved from admin/tool/lp/classes/external/competency_exporter.php with 95% similarity]
competency/classes/external/competency_framework_exporter.php [moved from admin/tool/lp/classes/external/competency_framework_exporter.php with 97% similarity]
competency/classes/external/course_competency_exporter.php [moved from admin/tool/lp/classes/external/course_competency_exporter.php with 94% similarity]
competency/classes/external/course_competency_settings_exporter.php [moved from admin/tool/lp/classes/external/course_competency_settings_exporter.php with 92% similarity]
competency/classes/external/course_module_competency_exporter.php [moved from admin/tool/lp/classes/external/course_module_competency_exporter.php with 94% similarity]
competency/classes/external/evidence_exporter.php [moved from admin/tool/lp/classes/external/evidence_exporter.php with 97% similarity]
competency/classes/external/exporter.php [moved from admin/tool/lp/classes/external/exporter.php with 99% similarity]
competency/classes/external/persistent_exporter.php [moved from admin/tool/lp/classes/external/persistent_exporter.php with 95% similarity]
competency/classes/external/plan_competency_exporter.php [moved from admin/tool/lp/classes/external/plan_competency_exporter.php with 94% similarity]
competency/classes/external/plan_exporter.php [moved from admin/tool/lp/classes/external/plan_exporter.php with 99% similarity]
competency/classes/external/related_competency_exporter.php [moved from admin/tool/lp/classes/external/related_competency_exporter.php with 94% similarity]
competency/classes/external/stored_file_exporter.php [moved from admin/tool/lp/classes/external/stored_file_exporter.php with 98% similarity]
competency/classes/external/template_competency_exporter.php [moved from admin/tool/lp/classes/external/template_competency_exporter.php with 94% similarity]
competency/classes/external/template_exporter.php [moved from admin/tool/lp/classes/external/template_exporter.php with 97% similarity]
competency/classes/external/user_competency_course_exporter.php [moved from admin/tool/lp/classes/external/user_competency_course_exporter.php with 97% similarity]
competency/classes/external/user_competency_exporter.php [moved from admin/tool/lp/classes/external/user_competency_exporter.php with 98% similarity]
competency/classes/external/user_competency_plan_exporter.php [moved from admin/tool/lp/classes/external/user_competency_plan_exporter.php with 97% similarity]
competency/classes/external/user_evidence_competency_exporter.php [moved from admin/tool/lp/classes/external/user_evidence_competency_exporter.php with 92% similarity]
competency/classes/external/user_evidence_exporter.php [moved from admin/tool/lp/classes/external/user_evidence_exporter.php with 97% similarity]
competency/classes/external/user_summary_exporter.php [moved from admin/tool/lp/classes/external/user_summary_exporter.php with 98% similarity]

index 70398fd..b61f201 100644 (file)
@@ -28,7 +28,7 @@ defined('MOODLE_INTERNAL') || die();
 global $CFG;
 
 use tool_lp\api;
-use tool_lp\external\competency_exporter;
+use core_competency\external\competency_exporter;
 require_once($CFG->libdir . '/form/autocomplete.php');
 
 /**
index 001fe7c..724a715 100644 (file)
@@ -28,7 +28,7 @@ defined('MOODLE_INTERNAL') || die();
 global $CFG;
 
 use tool_lp\api;
-use tool_lp\external\competency_exporter;
+use core_competency\external\competency_exporter;
 use core_competency\course_module_competency;
 
 require_once($CFG->libdir . '/form/select.php');
index b77a274..56269d1 100644 (file)
@@ -42,46 +42,46 @@ use external_multiple_structure;
 use invalid_parameter_exception;
 use required_capability_exception;
 use grade_scale;
-use \core_competency\competency;
-use \core_competency\competency_framework;
-use \core_competency\course_competency;
-use \core_competency\course_competency_settings;
-use \core_competency\course_module_competency;
-use \core_competency\evidence;
-use \core_competency\plan;
-use \core_competency\plan_competency;
-use \core_competency\related_competency;
-use \core_competency\template;
-use \core_competency\template_cohort;
-use \core_competency\template_competency;
-use \core_competency\user_competency;
-use \core_competency\user_competency_course;
-use \core_competency\user_competency_plan;
-use \core_competency\user_evidence;
-use \core_competency\user_evidence_competency;
-use tool_lp\external\competency_framework_exporter;
-use tool_lp\external\competency_summary_exporter;
-use tool_lp\external\competency_path_exporter;
-use tool_lp\external\course_competency_settings_exporter;
+use core_competency\competency;
+use core_competency\competency_framework;
+use core_competency\course_competency;
+use core_competency\course_competency_settings;
+use core_competency\course_module_competency;
+use core_competency\evidence;
+use core_competency\plan;
+use core_competency\plan_competency;
+use core_competency\related_competency;
+use core_competency\template;
+use core_competency\template_cohort;
+use core_competency\template_competency;
+use core_competency\user_competency;
+use core_competency\user_competency_course;
+use core_competency\user_competency_plan;
+use core_competency\user_evidence;
+use core_competency\user_evidence_competency;
 use tool_lp\external\cohort_summary_exporter;
+use core_competency\external\competency_exporter;
+use core_competency\external\competency_framework_exporter;
+use tool_lp\external\competency_path_exporter;
+use tool_lp\external\competency_summary_exporter;
+use core_competency\external\course_competency_exporter;
+use core_competency\external\course_competency_settings_exporter;
+use tool_lp\external\course_competency_statistics_exporter;
+use tool_lp\external\course_module_summary_exporter;
+use tool_lp\external\course_summary_exporter;
+use core_competency\external\evidence_exporter;
+use core_competency\external\plan_exporter;
+use core_competency\external\template_exporter;
 use tool_lp\external\template_statistics_exporter;
-use tool_lp\external\user_summary_exporter;
-use tool_lp\external\user_competency_exporter;
-use tool_lp\external\user_competency_plan_exporter;
+use core_competency\external\user_competency_exporter;
+use core_competency\external\user_competency_plan_exporter;
 use tool_lp\external\user_competency_summary_exporter;
 use tool_lp\external\user_competency_summary_in_course_exporter;
 use tool_lp\external\user_competency_summary_in_plan_exporter;
-use tool_lp\external\user_evidence_exporter;
+use core_competency\external\user_evidence_competency_exporter;
+use core_competency\external\user_evidence_exporter;
 use tool_lp\external\user_evidence_summary_exporter;
-use tool_lp\external\user_evidence_competency_exporter;
-use tool_lp\external\competency_exporter;
-use tool_lp\external\course_competency_exporter;
-use tool_lp\external\course_competency_statistics_exporter;
-use tool_lp\external\course_summary_exporter;
-use tool_lp\external\course_module_summary_exporter;
-use tool_lp\external\plan_exporter;
-use tool_lp\external\template_exporter;
-use tool_lp\external\evidence_exporter;
+use core_competency\external\user_summary_exporter;
 use tool_lp\output\user_competency_summary_in_plan;
 use tool_lp\output\user_competency_summary_in_course;
 
index a08901c..a22ac9f 100644 (file)
@@ -33,7 +33,7 @@ use moodle_url;
  * @copyright  2015 Damyon Wiese
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-class cohort_summary_exporter extends exporter {
+class cohort_summary_exporter extends \core_competency\external\exporter {
 
     protected static function define_related() {
         // Cohorts can exist on a category context.
index ee5ed75..1e9e1cf 100644 (file)
@@ -33,7 +33,7 @@ use moodle_url;
  * @copyright  2016 Issam Taboubi <issam.taboubi@umontreal.ca>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-class competency_path_exporter extends exporter {
+class competency_path_exporter extends \core_competency\external\exporter {
 
     /**
      * Constructor.
index bc37167..ff17471 100644 (file)
@@ -27,7 +27,9 @@ defined('MOODLE_INTERNAL') || die();
 use context_course;
 use renderer_base;
 use stdClass;
-use \core_competency\competency_framework;
+use core_competency\competency_framework;
+use core_competency\external\competency_exporter;
+use core_competency\external\competency_framework_exporter;
 
 /**
  * Class for exporting competency data with additional related data.
@@ -35,7 +37,7 @@ use \core_competency\competency_framework;
  * @copyright  2015 Damyon Wiese
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-class competency_summary_exporter extends exporter {
+class competency_summary_exporter extends \core_competency\external\exporter {
 
     protected static function define_related() {
         // We cache the context so it does not need to be retrieved from the framework every time.
index 9eec8da..ffa5259 100644 (file)
@@ -26,6 +26,7 @@ defined('MOODLE_INTERNAL') || die();
 
 use renderer_base;
 use moodle_url;
+use core_competency\competency_exporter;
 
 /**
  * Class for exporting a course competency statistics summary.
@@ -33,7 +34,7 @@ use moodle_url;
  * @copyright  2015 Damyon Wiese
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-class course_competency_statistics_exporter extends exporter {
+class course_competency_statistics_exporter extends \core_competency\external\exporter {
 
     public static function define_properties() {
         return array(
index 1eff044..dfd24fd 100644 (file)
@@ -33,7 +33,7 @@ use renderer_base;
  * @copyright  2015 Damyon Wiese
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-class course_module_summary_exporter extends exporter {
+class course_module_summary_exporter extends \core_competency\external\exporter {
 
     protected static function define_related() {
         return array('cm' => 'cm_info');
index ad71a24..4f44a7d 100644 (file)
@@ -33,7 +33,7 @@ use moodle_url;
  * @copyright  2015 Damyon Wiese
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-class course_summary_exporter extends exporter {
+class course_summary_exporter extends \core_competency\external\exporter {
 
     protected static function define_related() {
         // We cache the context so it does not need to be retrieved from the course.
index bd899c8..2b25ed2 100644 (file)
@@ -31,7 +31,7 @@ defined('MOODLE_INTERNAL') || die();
  * @copyright  2016 Issam Taboubi <issam.taboubi@umontreal.ca>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-class path_node_exporter extends exporter {
+class path_node_exporter extends \core_competency\external\exporter {
 
     /**
      * Return the list of properties.
index 8b005ff..1afd3a9 100644 (file)
@@ -26,6 +26,7 @@ defined('MOODLE_INTERNAL') || die();
 
 use renderer_base;
 use moodle_url;
+use core_competency\external\competency_exporter;
 
 /**
  * Class for exporting a cohort summary from an stdClass.
@@ -33,7 +34,7 @@ use moodle_url;
  * @copyright  2015 Damyon Wiese
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-class template_statistics_exporter extends exporter {
+class template_statistics_exporter extends \core_competency\external\exporter {
 
     public static function define_properties() {
         return array(
index 3f948da..97a4a39 100644 (file)
@@ -26,6 +26,11 @@ namespace tool_lp\external;
 use context_user;
 use renderer_base;
 use stdClass;
+use core_competency\external\comment_area_exporter;
+use core_competency\external\evidence_exporter;
+use core_competency\external\user_competency_exporter;
+use core_competency\external\user_competency_plan_exporter;
+use core_competency\external\user_summary_exporter;
 use core_competency\user_competency;
 
 /**
@@ -34,7 +39,7 @@ use core_competency\user_competency;
  * @copyright  2015 Damyon Wiese
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-class user_competency_summary_exporter extends exporter {
+class user_competency_summary_exporter extends \core_competency\external\exporter {
 
     protected static function define_related() {
         // We cache the context so it does not need to be retrieved from the framework every time.
index e2ec69e..4c5b272 100644 (file)
@@ -34,7 +34,7 @@ use stdClass;
  * @copyright  2015 Damyon Wiese
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-class user_competency_summary_in_course_exporter extends exporter {
+class user_competency_summary_in_course_exporter extends \core_competency\external\exporter {
 
     protected static function define_related() {
         // We cache the context so it does not need to be retrieved from the framework every time.
index 4bd44a8..05684ec 100644 (file)
@@ -26,6 +26,7 @@ namespace tool_lp\external;
 use context_user;
 use renderer_base;
 use stdClass;
+use core_competency\external\plan_exporter;
 
 /**
  * Class for exporting user competency data with additional related data in a plan.
@@ -33,7 +34,7 @@ use stdClass;
  * @copyright  2015 Damyon Wiese
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-class user_competency_summary_in_plan_exporter extends exporter {
+class user_competency_summary_in_plan_exporter extends \core_competency\external\exporter {
 
     protected static function define_related() {
         // We cache the context so it does not need to be retrieved from the framework every time.
index cee50a8..aa97b0b 100644 (file)
@@ -25,6 +25,8 @@ namespace tool_lp\external;
 
 use moodle_url;
 use renderer_base;
+use core_competency\external\competency_exporter;
+use core_competency\external\user_competency_exporter;
 
 /**
  * Class for exporting user evidence competency data.
@@ -32,7 +34,7 @@ use renderer_base;
  * @copyright  2016 Serge Gauthier - <serge.gauthier.2@umontreal.ca>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-class user_evidence_competency_summary_exporter extends exporter {
+class user_evidence_competency_summary_exporter extends \core_competency\external\exporter {
 
     protected static function define_related() {
         return array('competency' => '\\core_competency\\competency',
index a1c5d33..828724d 100644 (file)
 namespace tool_lp\external;
 defined('MOODLE_INTERNAL') || die();
 
-use tool_lp\api;
 use moodle_url;
 use renderer_base;
-use tool_lp\external\user_evidence_competency_summary_exporter;
+use core_competency\external\stored_file_exporter;
 
 /**
  * Class for exporting user evidence with all competencies.
@@ -35,7 +34,7 @@ use tool_lp\external\user_evidence_competency_summary_exporter;
  * @copyright  2016 Serge Gauthier - <serge.gauthier.2@umontreal.ca>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-class user_evidence_summary_exporter extends persistent_exporter {
+class user_evidence_summary_exporter extends \core_competency\external\persistent_exporter {
 
     protected static function define_class() {
         return 'core_competency\\user_evidence';
index 83cf933..27e94f2 100644 (file)
@@ -32,17 +32,17 @@ use moodle_url;
 use context_system;
 use context_course;
 use tool_lp\api;
-use core_competency\course_competency;
-use core_competency\course_competency_statistics;
+use tool_lp\course_competency_statistics;
 use core_competency\competency;
-use tool_lp\external\competency_exporter;
+use core_competency\course_competency;
+use core_competency\external\competency_exporter;
+use core_competency\external\course_competency_exporter;
+use core_competency\external\course_competency_settings_exporter;
+use core_competency\external\user_competency_course_exporter;
+use core_competency\external\user_competency_exporter;
 use tool_lp\external\competency_path_exporter;
-use tool_lp\external\course_competency_exporter;
 use tool_lp\external\course_competency_statistics_exporter;
-use tool_lp\external\course_competency_settings_exporter;
 use tool_lp\external\course_module_summary_exporter;
-use tool_lp\external\user_competency_exporter;
-use tool_lp\external\user_competency_course_exporter;
 
 /**
  * Class containing data for course competencies page
index f7fdd67..fd6d9a2 100644 (file)
@@ -34,7 +34,7 @@ use context_system;
 use tool_lp\api;
 use core_competency\competency;
 use core_competency\competency_framework;
-use tool_lp\external\competency_framework_exporter;
+use core_competency\external\competency_framework_exporter;
 
 /**
  * Class containing data for managecompetencies page
index 2594bb4..11213c5 100644 (file)
@@ -34,7 +34,7 @@ use context;
 use context_system;
 use tool_lp\api;
 use core_competency\competency_framework;
-use tool_lp\external\competency_framework_exporter;
+use core_competency\external\competency_framework_exporter;
 
 /**
  * Class containing data for managecompetencyframeworks page
index ec132dc..400145d 100644 (file)
@@ -34,7 +34,7 @@ use moodle_url;
 use context_system;
 use tool_lp\api;
 use core_competency\template;
-use tool_lp\external\template_exporter;
+use core_competency\external\template_exporter;
 
 /**
  * Class containing data for managecompetencyframeworks page
index cbd32c3..031cc98 100644 (file)
@@ -30,9 +30,9 @@ use stdClass;
 use moodle_url;
 use tool_lp\api;
 use core_competency\plan;
-use tool_lp\external\competency_exporter;
+use core_competency\external\competency_exporter;
+use core_competency\external\plan_exporter;
 use tool_lp\external\competency_path_exporter;
-use tool_lp\external\plan_exporter;
 
 /**
  * Plan page class.
@@ -75,10 +75,10 @@ class plan_page implements renderable, templatable {
 
         if ($data->plan->iscompleted) {
             $ucproperty = 'usercompetencyplan';
-            $ucexporter = 'tool_lp\\external\\user_competency_plan_exporter';
+            $ucexporter = 'core_competency\\external\\user_competency_plan_exporter';
         } else {
             $ucproperty = 'usercompetency';
-            $ucexporter = 'tool_lp\\external\\user_competency_exporter';
+            $ucexporter = 'core_competency\\external\\user_competency_exporter';
         }
 
         $pclist = api::list_plan_competencies($this->plan);
index 0a7e8df..f94e13a 100644 (file)
@@ -31,7 +31,7 @@ use stdClass;
 use single_button;
 use moodle_url;
 use tool_lp\api;
-use tool_lp\external\plan_exporter;
+use core_competency\external\plan_exporter;
 use core_competency\plan;
 use core_competency\user_evidence;
 use context_user;
index c55bbf9..436e9e9 100644 (file)
@@ -30,7 +30,7 @@ use renderer_base;
 use stdClass;
 use moodle_url;
 use tool_lp\api;
-use tool_lp\external\competency_exporter;
+use core_competency\external\competency_exporter;
 
 /**
  * Class containing data for related competencies.
index 6bcde1e..96e23ca 100644 (file)
@@ -31,12 +31,12 @@ use stdClass;
 use context;
 use context_system;
 use moodle_url;
+use core_competency\external\template_exporter;
+use core_competency\template;
 use tool_lp\api;
 use tool_lp\external\competency_summary_exporter;
-use core_competency\template;
-use core_competency\template_statistics;
-use tool_lp\external\template_exporter;
 use tool_lp\external\template_statistics_exporter;
+use tool_lp\template_statistics;
 
 /**
  * Class containing data for learning plan template competencies page
index eaabed5..954ed5e 100644 (file)
@@ -27,8 +27,8 @@ use renderable;
 use renderer_base;
 use templatable;
 use context_course;
-use \tool_lp\external\user_summary_exporter;
-use \tool_lp\external\competency_exporter;
+use \core_competency\external\competency_exporter;
+use \core_competency\external\user_summary_exporter;
 use stdClass;
 
 /**
index 5915a63..cfb9df3 100644 (file)
@@ -28,7 +28,7 @@
 
     Context variables required for this template:
 
-    See admin/tool/lp/classes/external/course_competency_statistics_exporter
+    See competency/classes/external/course_competency_statistics_exporter
 
     Example context (json):
     {
index b8acd95..c344dde 100644 (file)
@@ -28,7 +28,7 @@
 
     Context variables required for this template:
 
-    See admin/tool/lp/classes/external/template_statistics_exporter
+    See competency/classes/external/template_statistics_exporter
 
     Example context (json):
     {
index 9658072..272b55e 100644 (file)
@@ -117,7 +117,7 @@ class tool_lp_exporter_testcase extends advanced_testcase {
  * @copyright  2015 Frédéric Massart - FMCorz.net
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-class tool_lp_testable_exporter extends \tool_lp\external\exporter {
+class tool_lp_testable_exporter extends \core_competency\external\exporter {
 
     protected static function define_related() {
         // We cache the context so it does not need to be retrieved from the course.
index 1c24e99..890422d 100644 (file)
@@ -43,7 +43,7 @@ if (!$user || !core_user::is_real_user($user->id)) {
 $iscurrentuser = ($USER->id == $user->id);
 
 $competency = $uc->get_competency();
-$compexporter = new \tool_lp\external\competency_exporter($competency, array('context' => $competency->get_context()));
+$compexporter = new \core_competency\external\competency_exporter($competency, array('context' => $competency->get_context()));
 
 $PAGE->set_pagelayout('standard');
 $PAGE->set_url($url);
  *
  * A comment area is the set of information about a defined comments area.
  *
- * @package    tool_lp
+ * @package    core_competency
  * @copyright  2015 Frédéric Massart - FMCorz.net
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-namespace tool_lp\external;
+namespace core_competency\external;
 require_once($CFG->dirroot . '/comment/lib.php');
 
 // TODO MDL-52243 Move this to core.
@@ -36,7 +36,7 @@ use stdClass;
 /**
  * Class for exporting a comment area.
  *
- * @package    tool_lp
+ * @package    core_competency
  * @copyright  2015 Frédéric Massart - FMCorz.net
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 /**
  * Class for exporting competency data.
  *
- * @package    tool_lp
+ * @package    core_competency
  * @copyright  2015 Damyon Wiese
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-namespace tool_lp\external;
+namespace core_competency\external;
 defined('MOODLE_INTERNAL') || die();
 
 /**
 /**
  * Class for exporting competency_framework data.
  *
- * @package    tool_lp
+ * @package    core_competency
  * @copyright  2015 Damyon Wiese
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-namespace tool_lp\external;
+namespace core_competency\external;
 defined('MOODLE_INTERNAL') || die();
 
 use tool_lp\api;
 /**
  * Class for exporting course competency data.
  *
- * @package    tool_lp
+ * @package    core_competency
  * @copyright  2015 Damyon Wiese
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-namespace tool_lp\external;
+namespace core_competency\external;
 defined('MOODLE_INTERNAL') || die();
 
 /**
 /**
  * Class for exporting course_competency_settings data.
  *
- * @package    tool_lp
+ * @package    core_competency
  * @copyright  2016 Damyon Wiese
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-namespace tool_lp\external;
+namespace core_competency\external;
 
 /**
  * Class for exporting course_competency_settings data.
  *
- * @package    tool_lp
+ * @package    core_competency
  * @copyright  2016 Damyon Wiese
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 /**
  * Class for exporting course module competency data.
  *
- * @package    tool_lp
+ * @package    core_competency
  * @copyright  2015 Damyon Wiese
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-namespace tool_lp\external;
+namespace core_competency\external;
 defined('MOODLE_INTERNAL') || die();
 
 /**
 /**
  * Class for exporting evidence data.
  *
- * @package    tool_lp
+ * @package    core_competency
  * @copyright  2015 Damyon Wiese
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-namespace tool_lp\external;
+namespace core_competency\external;
 
 use renderer_base;
 
similarity index 99%
rename from admin/tool/lp/classes/external/exporter.php
rename to competency/classes/external/exporter.php
index 9346c5d..1f8f7f7 100644 (file)
 /**
  * Generic exporter to take a stdClass and prepare it for return by webservice.
  *
- * @package    tool_lp
+ * @package    core_competency
  * @copyright  2015 Damyon Wiese
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-namespace tool_lp\external;
+namespace core_competency\external;
 defined('MOODLE_INTERNAL') || die();
 
 require_once($CFG->libdir . '/externallib.php');
@@ -151,7 +151,7 @@ abstract class exporter {
                     throw new coding_exception('Unexpected property ' . $propertyformat);
                 }
                 $format = $record->$propertyformat;
-                list($text, $format) = external_format_text($data->$property, $format, $context->id, 'tool_lp', '', 0);
+                list($text, $format) = external_format_text($data->$property, $format, $context->id, 'core_competency', '', 0);
                 $data->$property = $text;
                 $data->$propertyformat = $format;
 
 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 
 /**
- * Abstract class for tool_lp objects saved to the DB.
+ * Abstract class for core_competency objects saved to the DB.
  *
- * @package    tool_lp
+ * @package    core_competency
  * @copyright  2015 Damyon Wiese
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-namespace tool_lp\external;
+namespace core_competency\external;
 defined('MOODLE_INTERNAL') || die();
 
 require_once($CFG->libdir . '/externallib.php');
 /**
  * Class for exporting plan competency data.
  *
- * @package    tool_lp
+ * @package    core_competency
  * @copyright  2015 Damyon Wiese
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-namespace tool_lp\external;
+namespace core_competency\external;
 defined('MOODLE_INTERNAL') || die();
 
 /**
 /**
  * Class for exporting plan data.
  *
- * @package    tool_lp
+ * @package    core_competency
  * @copyright  2015 Damyon Wiese
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-namespace tool_lp\external;
+namespace core_competency\external;
 defined('MOODLE_INTERNAL') || die();
 
 use core_user;
 /**
  * Class for exporting plan data.
  *
- * @package    tool_lp
+ * @package    core_competency
  * @copyright  2015 Damyon Wiese
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-namespace tool_lp\external;
+namespace core_competency\external;
 defined('MOODLE_INTERNAL') || die();
 
 /**
 /**
  * Class for exporting stored_file data.
  *
- * @package    tool_lp
+ * @package    core_competency
  * @copyright  2015 Frédéric Massart - FMCorz.net
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-namespace tool_lp\external;
+namespace core_competency\external;
 
 use coding_exception;
 use core_text;
@@ -33,7 +33,7 @@ use stored_file;
 /**
  * Class for exporting stored_file data.
  *
- * @package    tool_lp
+ * @package    core_competency
  * @copyright  2015 Frédéric Massart - FMCorz.net
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 /**
  * Class for exporting template competency data.
  *
- * @package    tool_lp
+ * @package    core_competency
  * @copyright  2015 Damyon Wiese
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-namespace tool_lp\external;
+namespace core_competency\external;
 defined('MOODLE_INTERNAL') || die();
 
 /**
 /**
  * Class for exporting template data.
  *
- * @package    tool_lp
+ * @package    core_competency
  * @copyright  2015 Damyon Wiese
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-namespace tool_lp\external;
+namespace core_competency\external;
 defined('MOODLE_INTERNAL') || die();
 
 use moodle_url;
 /**
  * Class for exporting user competency course data.
  *
- * @package    tool_lp
+ * @package    core_competency
  * @copyright  2016 Damyon Wiese
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-namespace tool_lp\external;
+namespace core_competency\external;
 defined('MOODLE_INTERNAL') || die();
 
 use core_user;
 /**
  * Class for exporting user competency data.
  *
- * @package    tool_lp
+ * @package    core_competency
  * @copyright  2015 Damyon Wiese
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-namespace tool_lp\external;
+namespace core_competency\external;
 defined('MOODLE_INTERNAL') || die();
 
 use core_user;
 /**
  * Class for exporting plan competency data.
  *
- * @package    tool_lp
+ * @package    core_competency
  * @copyright  2015 Damyon Wiese
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-namespace tool_lp\external;
+namespace core_competency\external;
 defined('MOODLE_INTERNAL') || die();
 
 use renderer_base;
 /**
  * User evidence competency exporter.
  *
- * @package    tool_lp
+ * @package    core_competency
  * @copyright  2015 Frédéric Massart - FMCorz.net
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-namespace tool_lp\external;
+namespace core_competency\external;
 defined('MOODLE_INTERNAL') || die();
 
 /**
  * User evidence competency exporter class.
  *
- * @package    tool_lp
+ * @package    core_competency
  * @copyright  2015 Frédéric Massart - FMCorz.net
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 /**
  * Class for exporting user_evidence data.
  *
- * @package    tool_lp
+ * @package    core_competency
  * @copyright  2015 Frédéric Massart - FMCorz.net
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-namespace tool_lp\external;
+namespace core_competency\external;
 
 use moodle_url;
 use renderer_base;
@@ -29,7 +29,7 @@ use renderer_base;
 /**
  * Class for exporting user_evidence data.
  *
- * @package    tool_lp
+ * @package    core_competency
  * @copyright  2015 Frédéric Massart - FMCorz.net
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 /**
  * Class for exporting a user summary from an stdClass.
  *
- * @package    tool_lp
+ * @package    core_competency
  * @copyright  2015 Damyon Wiese
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-namespace tool_lp\external;
+namespace core_competency\external;
 defined('MOODLE_INTERNAL') || die();
 
 use renderer_base;