From eff07a3b914f869791711aedc09afa3719a9c876 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 22 Mar 2018 13:37:11 +0100 Subject: [PATCH] Applied fixed from FlintCI + Codacy --- main/mySpace/myStudents.php | 2 +- plugin/notebookteacher/config.php | 6 +- plugin/notebookteacher/database.php | 2 +- plugin/notebookteacher/install.php | 4 +- plugin/notebookteacher/lang/english.php | 3 +- plugin/notebookteacher/lang/spanish.php | 3 +- plugin/notebookteacher/plugin.php | 4 +- plugin/notebookteacher/src/index.php | 42 +++--- .../src/notebookteacher.lib.php | 134 +++++++++++------- .../src/notebookteacher_plugin.class.php | 11 +- plugin/notebookteacher/start.php | 4 +- plugin/notebookteacher/uninstall.php | 4 +- plugin/notebookteacher/update.php | 2 +- 13 files changed, 132 insertions(+), 89 deletions(-) diff --git a/main/mySpace/myStudents.php b/main/mySpace/myStudents.php index d20cc4e9e9..726b3acdc6 100755 --- a/main/mySpace/myStudents.php +++ b/main/mySpace/myStudents.php @@ -429,7 +429,7 @@ if ($notebookTeacherEnable && !empty($student_id) && !empty($course_code)) { Display::return_icon('notebookteacher.png', get_lang('Notebook'), '', ICON_SIZE_MEDIUM). ''; } - + if (api_can_login_as($student_id)) { echo ''. Display::return_icon('login_as.png', get_lang('LoginAs'), null, ICON_SIZE_MEDIUM).'  '; diff --git a/plugin/notebookteacher/config.php b/plugin/notebookteacher/config.php index 92993537b6..b16a08e10a 100644 --- a/plugin/notebookteacher/config.php +++ b/plugin/notebookteacher/config.php @@ -7,6 +7,6 @@ * * @author Jose Angel Ruiz */ -require_once __DIR__ . '/../../main/inc/global.inc.php'; -require_once api_get_path(LIBRARY_PATH) . 'plugin.class.php'; -require_once api_get_path(SYS_PLUGIN_PATH) . 'notebookteacher/src/notebookteacher_plugin.class.php'; +require_once __DIR__.'/../../main/inc/global.inc.php'; +require_once api_get_path(LIBRARY_PATH).'plugin.class.php'; +require_once api_get_path(SYS_PLUGIN_PATH).'notebookteacher/src/notebookteacher_plugin.class.php'; diff --git a/plugin/notebookteacher/database.php b/plugin/notebookteacher/database.php index 621a20b8e9..af586f334c 100644 --- a/plugin/notebookteacher/database.php +++ b/plugin/notebookteacher/database.php @@ -7,7 +7,7 @@ * @package chamilo.plugin.notebookteacher */ /** - * Check if script can be called + * Check if script can be called. */ if (!function_exists('api_get_path')) { die('This script must be loaded through the Chamilo plugin installer sequence'); diff --git a/plugin/notebookteacher/install.php b/plugin/notebookteacher/install.php index f9a7d6573c..8a9836753b 100644 --- a/plugin/notebookteacher/install.php +++ b/plugin/notebookteacher/install.php @@ -7,9 +7,9 @@ * @package chamilo.plugin.notebookteacher */ /** - * Initialization + * Initialization. */ -require_once __DIR__ . '/config.php'; +require_once __DIR__.'/config.php'; if (!api_is_platform_admin()) { die('You must have admin permissions to install plugins'); } diff --git a/plugin/notebookteacher/lang/english.php b/plugin/notebookteacher/lang/english.php index 8086d55b89..f3f8200432 100644 --- a/plugin/notebookteacher/lang/english.php +++ b/plugin/notebookteacher/lang/english.php @@ -1,6 +1,7 @@ get_info(); diff --git a/plugin/notebookteacher/src/index.php b/plugin/notebookteacher/src/index.php index 9f3e34c33a..7091f95741 100644 --- a/plugin/notebookteacher/src/index.php +++ b/plugin/notebookteacher/src/index.php @@ -21,7 +21,7 @@ if ($enable) { $location = 'index.php?'.api_get_cidreq(); // Additional javascript - $htmlHeadXtra[] = NotebookTeacher::javascript_notebook(); + $htmlHeadXtra[] = NotebookTeacher::javascriptNotebook(); $htmlHeadXtra[] = '