From deff2ac9ce73a31f598efe548f6ed9a910c3fcd7 Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Wed, 19 Apr 2017 11:10:07 -0500 Subject: [PATCH] Minor - Code style --- main/admin/configure_homepage.php | 3 ++- main/auth/cas/authcas.php | 2 +- main/exercise/export/aiken/aiken_classes.php | 2 +- main/gradebook/lib/be/evallink.class.php | 2 +- main/gradebook/lib/fe/gradebooktable.class.php | 4 +++- main/lp/lp_controller.php | 1 - main/webservices/cm_webservice_user.php | 2 +- plugin/buycourses/src/process_confirm.php | 1 - plugin/vchamilo/lib/Virtual.php | 2 +- 9 files changed, 10 insertions(+), 9 deletions(-) diff --git a/main/admin/configure_homepage.php b/main/admin/configure_homepage.php index dc86b36bc9..c3e948738c 100755 --- a/main/admin/configure_homepage.php +++ b/main/admin/configure_homepage.php @@ -1236,6 +1236,7 @@ switch ($action) { - id); return $answer; - default : + default: $answer = null; break; } diff --git a/main/gradebook/lib/be/evallink.class.php b/main/gradebook/lib/be/evallink.class.php index a209eea518..fb238f8f65 100755 --- a/main/gradebook/lib/be/evallink.class.php +++ b/main/gradebook/lib/be/evallink.class.php @@ -49,7 +49,7 @@ abstract class EvalLink extends AbstractLink if (api_is_allowed_to_edit()) { return 'gradebook_view_result.php?'.api_get_cidreq().'&selecteval='.$eval->get_id(); } // students can go to the statistics page (if custom display enabled) - elseif (ScoreDisplay :: instance()->is_custom()) { + elseif (ScoreDisplay::instance()->is_custom()) { return 'gradebook_statistics.php?'.api_get_cidreq().'&selecteval='.$eval->get_id(); } else { return null; diff --git a/main/gradebook/lib/fe/gradebooktable.class.php b/main/gradebook/lib/fe/gradebooktable.class.php index d91a5f1e1d..6ac9a85062 100755 --- a/main/gradebook/lib/fe/gradebooktable.class.php +++ b/main/gradebook/lib/fe/gradebooktable.class.php @@ -982,7 +982,8 @@ class GradebookTable extends SortableTable .$item->get_name() .'' .($item->is_course() ? '  ['.$item->get_course_code().']'.$show_message : ''); - // evaluation + // evaluation + //no break because of return case 'E': $cat = new Category(); $course_id = CourseManager::get_course_by_category($categoryId); @@ -1021,6 +1022,7 @@ class GradebookTable extends SortableTable } else { return '['.get_lang('Evaluation').']  '.$item->get_name().$show_message; } + // no break because of return case 'L': // link $cat = new Category(); diff --git a/main/lp/lp_controller.php b/main/lp/lp_controller.php index 4d88846853..ddc5291480 100755 --- a/main/lp/lp_controller.php +++ b/main/lp/lp_controller.php @@ -1197,7 +1197,6 @@ switch ($action) { require 'lp_view.php'; break; case 'switch_view_mode': - if (!$lp_found) { error_log('New LP - No learnpath given for switch', 0); require 'lp_list.php'; diff --git a/main/webservices/cm_webservice_user.php b/main/webservices/cm_webservice_user.php index d66f1022c1..e51933840e 100755 --- a/main/webservices/cm_webservice_user.php +++ b/main/webservices/cm_webservice_user.php @@ -88,7 +88,7 @@ class WSCMUser extends WSCM case 'bothlf' : return $userInfo['lastname']." ".$userInfo['firstname']; break; - default : + default: return $userInfo['firstname']; } diff --git a/plugin/buycourses/src/process_confirm.php b/plugin/buycourses/src/process_confirm.php index 977d9fc1da..d9c176a533 100644 --- a/plugin/buycourses/src/process_confirm.php +++ b/plugin/buycourses/src/process_confirm.php @@ -163,7 +163,6 @@ switch ($sale['payment_type']) { break; case BuyCoursesPlugin::PAYMENT_TYPE_CULQI: - // We need to include the main online script, acording to the Culqi documentation the JS needs to be loeaded // directly from the main url "https://integ-pago.culqi.com" because a local copy of this JS is not supported $htmlHeadXtra[] = ''; diff --git a/plugin/vchamilo/lib/Virtual.php b/plugin/vchamilo/lib/Virtual.php index 853f3382fe..fb7fd3e682 100644 --- a/plugin/vchamilo/lib/Virtual.php +++ b/plugin/vchamilo/lib/Virtual.php @@ -38,7 +38,7 @@ class Virtual // pre hook to chamilo main table and get alternate configuration. // sure Database object is not set up. Soo use bootstrap connection /** @var \Doctrine\DBAL\Connection $connection */ - $connection = Virtual::bootConnection($_configuration); + $connection = self::bootConnection($_configuration); $query = "SELECT * FROM vchamilo WHERE root_web = '$virtualChamiloWebRoot'"; $result = $connection->executeQuery($query);