From cc066c3a13b5aa7b9653b701af2f76e0fc2afe45 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 20 Mar 2018 14:53:47 +0100 Subject: [PATCH] Applied fixed from FlintCI --- plugin/test2pdf/config.php | 4 +- plugin/test2pdf/install.php | 2 +- plugin/test2pdf/plugin.php | 4 +- plugin/test2pdf/src/download-pdf.php | 2 +- plugin/test2pdf/src/index.test2pdf.php | 3 +- plugin/test2pdf/src/test2pdf.lib.php | 41 +++++++++++-------- plugin/test2pdf/src/test2pdf_plugin.class.php | 12 +++--- plugin/test2pdf/src/view-pdf.php | 2 +- plugin/test2pdf/start.php | 2 +- plugin/test2pdf/uninstall.php | 2 +- 10 files changed, 40 insertions(+), 34 deletions(-) diff --git a/plugin/test2pdf/config.php b/plugin/test2pdf/config.php index 473ca3ce6c..ec2c4fe994 100644 --- a/plugin/test2pdf/config.php +++ b/plugin/test2pdf/config.php @@ -2,9 +2,9 @@ /* For licensing terms, see /license.txt */ /** * Config the plugin. - * + * * @package chamilo.plugin.test2pdf - * + * * @author Jose Angel Ruiz */ require_once __DIR__.'/../../main/inc/global.inc.php'; diff --git a/plugin/test2pdf/install.php b/plugin/test2pdf/install.php index 8df0f2f651..aced5c1e62 100644 --- a/plugin/test2pdf/install.php +++ b/plugin/test2pdf/install.php @@ -3,7 +3,7 @@ /** * This script is included by main/admin/settings.lib.php and generally * includes things to execute in the main database (settings_current table). - * + * * @package chamilo.plugin.test2pdf */ /** diff --git a/plugin/test2pdf/plugin.php b/plugin/test2pdf/plugin.php index a339145b2c..72f2327a67 100644 --- a/plugin/test2pdf/plugin.php +++ b/plugin/test2pdf/plugin.php @@ -3,11 +3,11 @@ /** * This script is a configuration file for the date plugin. You can use it as a master for other platform plugins (course plugins are slightly different). * These settings will be used in the administration interface for plugins (Chamilo configuration settings->Plugins). - * + * * @package chamilo.plugin.test2pdf */ /** - * Plugin details (must be present) + * Plugin details (must be present). */ require_once __DIR__.'/config.php'; $plugin_info = Test2pdfPlugin::create()->get_info(); diff --git a/plugin/test2pdf/src/download-pdf.php b/plugin/test2pdf/src/download-pdf.php index cd4b812adf..a55a660a26 100644 --- a/plugin/test2pdf/src/download-pdf.php +++ b/plugin/test2pdf/src/download-pdf.php @@ -52,7 +52,7 @@ if ($_GET['type'] == 'question' || $_GET['type'] == 'all') { if (!empty($infoQuestion['description'])) { $pdf->WriteHTML(removeQuotes($infoQuestion['description'])); } - + $infoAnswer = getAnswers($courseId, $value); foreach ($infoAnswer as $key2 => $value2) { $pdf->SetFont('Arial', 'I', 10); diff --git a/plugin/test2pdf/src/index.test2pdf.php b/plugin/test2pdf/src/index.test2pdf.php index b5793ddd64..819a049ce3 100644 --- a/plugin/test2pdf/src/index.test2pdf.php +++ b/plugin/test2pdf/src/index.test2pdf.php @@ -1,6 +1,7 @@ */ class Test2pdfPlugin extends Plugin { public $isCoursePlugin = true; - + protected function __construct() { parent::__construct( @@ -20,14 +20,14 @@ class Test2pdfPlugin extends Plugin ] ); } - + /** * @return StaticPlugin */ public static function create() { static $result = null; - + return $result ? $result : $result = new self(); } @@ -38,7 +38,7 @@ class Test2pdfPlugin extends Plugin { //Installing course settings $this->install_course_fields_in_all_courses(); - + $srcfile1 = __DIR__.'/../resources/img/64/test2pdf.png'; $srcfile2 = __DIR__.'/../resources/img/64/test2pdf_na.png'; $srcfile3 = __DIR__.'/../resources/img/22/test2pdf.png'; diff --git a/plugin/test2pdf/src/view-pdf.php b/plugin/test2pdf/src/view-pdf.php index 70a9d86db3..6a72600cc2 100644 --- a/plugin/test2pdf/src/view-pdf.php +++ b/plugin/test2pdf/src/view-pdf.php @@ -2,7 +2,7 @@ /* For license terms, see /license.txt */ /** * Configuration script for the Test to Pdf plugin. - * + * * @package chamilo.plugin.test2pdf */ /** diff --git a/plugin/test2pdf/start.php b/plugin/test2pdf/start.php index ffd8eb9f7a..e657ee989b 100644 --- a/plugin/test2pdf/start.php +++ b/plugin/test2pdf/start.php @@ -3,7 +3,7 @@ /** * This script initiates a test2pdf plugin. - * + * * @package chamilo.plugin.test2pdf */ require_once __DIR__.'/../../vendor/autoload.php'; diff --git a/plugin/test2pdf/uninstall.php b/plugin/test2pdf/uninstall.php index 626312d065..048e9f35b0 100644 --- a/plugin/test2pdf/uninstall.php +++ b/plugin/test2pdf/uninstall.php @@ -4,7 +4,7 @@ * This script is included by main/admin/settings.lib.php when unselecting a plugin * and is meant to remove things installed by the install.php script in both * the global database and the courses tables. - * + * * @package chamilo.plugin.test2pdf */ /**