Browse Source

Plugin: Rename to SurveyExportTxt - refs BT#15281

Angel Fernando Quiroz Campos 6 years ago
parent
commit
b12d2f98a8

+ 0 - 7
plugin/apaexportsurvey/lang/english.php

@@ -1,7 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-$strings['plugin_title'] = "APA Export Survey";
-$strings['plugin_comment'] = "Export surveys for APA.";
-
-$strings['enabled'] = 'Enabled';

+ 0 - 7
plugin/apaexportsurvey/lang/spanish.php

@@ -1,7 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-$strings['plugin_title'] = "APA Export Survey";
-$strings['plugin_comment'] = "Exportar encuestas para APA.";
-
-$strings['enabled'] = 'Habilitado';

+ 0 - 4
plugin/apaexportsurvey/plugin.php

@@ -1,4 +0,0 @@
-<?php
-/* For licensing terms, see /license.txt */
-
-$plugin_info = ApaExportSurvey::create()->get_info();

+ 2 - 2
plugin/apaexportsurvey/README.md → plugin/surveyexporttxt/README.md

@@ -1,6 +1,6 @@
-# APA Export Survey
+# Survey Export TXT
 
-Export surveys for APA.
+Export surveys to TXT file.
 
 This plugin will add a new action button in survey list allowing export the survey.
 

+ 8 - 8
plugin/apaexportsurvey/ApaExportSurvey.php → plugin/surveyexporttxt/SurveyExportTxtPlugin.php

@@ -2,12 +2,12 @@
 /* For licensing terms, see /license.txt */
 
 /**
- * Class ApaExportSurvey.
+ * Class SurveyExportTxtPlugin.
  */
-class ApaExportSurvey extends Plugin
+class SurveyExportTxtPlugin extends Plugin
 {
     /**
-     * ApaExportSurvey constructor.
+     * SurveyExportTxtPlugin constructor.
      */
     protected function __construct()
     {
@@ -15,11 +15,11 @@ class ApaExportSurvey extends Plugin
             'enabled' => 'boolean',
         ];
 
-        parent::__construct('0.1', 'Angel Fernado Quiroz Campos', $settings);
+        parent::__construct('0.1', 'Angel Fernando Quiroz Campos', $settings);
     }
 
     /**
-     * @return ApaExportSurvey|null
+     * @return SurveyExportTxtPlugin|null
      */
     public static function create()
     {
@@ -49,7 +49,7 @@ class ApaExportSurvey extends Plugin
      */
     public static function filterModify($params)
     {
-        $enabled = api_get_plugin_setting('apaexportsurvey', 'enabled');
+        $enabled = api_get_plugin_setting('SurveyExportTxtPlugin', 'enabled');
 
         if ($enabled !== 'true') {
             return '';
@@ -64,7 +64,7 @@ class ApaExportSurvey extends Plugin
 
         return Display::url(
             Display::return_icon('export_evaluation.png', get_lang('Export'), [], $iconSize),
-            api_get_path(WEB_PLUGIN_PATH).'apaexportsurvey/export.php?survey='.$surveyId.'&'.api_get_cidreq()
+            api_get_path(WEB_PLUGIN_PATH).'surveyexporttxt/export.php?survey='.$surveyId.'&'.api_get_cidreq()
         );
     }
 
@@ -89,6 +89,6 @@ class ApaExportSurvey extends Plugin
     {
         Database::getManager()
             ->createQuery('DELETE FROM ChamiloCourseBundle:CTool t WHERE t.link LIKE :link AND t.category = :category')
-            ->execute(['link' => 'apaexportsurvey/start.php%', 'category' => 'plugin']);
+            ->execute(['link' => 'surveyexporttxt/start.php%', 'category' => 'plugin']);
     }
 }

+ 1 - 1
plugin/apaexportsurvey/export.php → plugin/surveyexporttxt/export.php

@@ -16,7 +16,7 @@ if (empty($surveyData)) {
     api_not_allowed(true);
 }
 
-$plugin = ApaExportSurvey::create();
+$plugin = SurveyExportTxtPlugin::create();
 
 if ($plugin->get('enabled') !== 'true') {
     api_not_allowed(true);

+ 1 - 1
plugin/apaexportsurvey/install.php → plugin/surveyexporttxt/install.php

@@ -1,4 +1,4 @@
 <?php
 /* For licensing terms, see /license.txt */
 
-ApaExportSurvey::create()->install();
+SurveyExportTxtPlugin::create()->install();

+ 7 - 0
plugin/surveyexporttxt/lang/english.php

@@ -0,0 +1,7 @@
+<?php
+/* For licensing terms, see /license.txt */
+
+$strings['plugin_title'] = "Survey Export TXT";
+$strings['plugin_comment'] = "Export surveys results to TXT file";
+
+$strings['enabled'] = 'Enabled';

+ 7 - 0
plugin/surveyexporttxt/lang/spanish.php

@@ -0,0 +1,7 @@
+<?php
+/* For licensing terms, see /license.txt */
+
+$strings['plugin_title'] = "Survey Export TXT";
+$strings['plugin_comment'] = "Exportar resultados de encuestas en archivo TXT.";
+
+$strings['enabled'] = 'Habilitado';

+ 4 - 0
plugin/surveyexporttxt/plugin.php

@@ -0,0 +1,4 @@
+<?php
+/* For licensing terms, see /license.txt */
+
+$plugin_info = SurveyExportTxtPlugin::create()->get_info();

+ 3 - 3
plugin/apaexportsurvey/start.php → plugin/surveyexporttxt/start.php

@@ -6,7 +6,7 @@ require_once __DIR__.'/../../main/inc/global.inc.php';
 api_protect_course_script(true);
 api_protect_teacher_script();
 
-$plugin = ApaExportSurvey::create();
+$plugin = SurveyExportTxtPlugin::create();
 
 $courseCode = api_get_course_id();
 
@@ -33,10 +33,10 @@ $table->set_column_filter(8, ['SurveyUtil', 'anonymous_filter']);
 if (api_get_configuration_value('allow_mandatory_survey')) {
     $table->set_header(9, get_lang('IsMandatory'), true, ['class' => 'text-center'], ['class' => 'text-center']);
     $table->set_header(10, get_lang('Export'), false, ['class' => 'text-center'], ['class' => 'text-center']);
-    $table->set_column_filter(10, ['ApaExportSurvey', 'filterModify']);
+    $table->set_column_filter(10, ['SurveyExportTxtPlugin', 'filterModify']);
 } else {
     $table->set_header(9, get_lang('Export'), false, ['class' => 'text-center'], ['class' => 'text-center']);
-    $table->set_column_filter(9, ['ApaExportSurvey', 'filterModify']);
+    $table->set_column_filter(9, ['SurveyExportTxtPlugin', 'filterModify']);
 }
 
 $pageTitle = $plugin->get_title();

+ 1 - 1
plugin/apaexportsurvey/uninstall.php → plugin/surveyexporttxt/uninstall.php

@@ -1,4 +1,4 @@
 <?php
 /* For licensing terms, see /license.txt */
 
-ApaExportSurvey::create()->uninstall();
+SurveyExportTxtPlugin::create()->uninstall();