diff --git a/plugin/buycourses/src/buy_course_plugin.class.php b/plugin/buycourses/src/buy_course_plugin.class.php index c54aff705a..1bafd0cb3f 100644 --- a/plugin/buycourses/src/buy_course_plugin.class.php +++ b/plugin/buycourses/src/buy_course_plugin.class.php @@ -1,16 +1,13 @@ - * @author Imanol Losada - * @author Alex Aragón + * @author Jose Angel Ruiz + * @author Imanol Losada + * @author Alex Aragón * @author Angel Fernando Quiroz Campos */ -/** - * Plugin class for the BuyCourses plugin - */ class BuyCoursesPlugin extends Plugin { const TABLE_PAYPAL = 'plugin_buycourses_paypal_account'; @@ -72,14 +69,14 @@ class BuyCoursesPlugin extends Plugin self::TABLE_CURRENCY ); $em = Database::getManager(); - $cn = $em -> getConnection(); - $sm = $cn -> getSchemaManager(); - $tables = $sm ->tablesExist($tablesToBeCompared); - + $cn = $em->getConnection(); + $sm = $cn->getSchemaManager(); + $tables = $sm->tablesExist($tablesToBeCompared); + if ($tables) { return false; } - + require_once api_get_path(SYS_PLUGIN_PATH) . 'buycourses/database.php'; } @@ -237,7 +234,7 @@ class BuyCoursesPlugin extends Plugin { $entityManager = Database::getManager(); $query = $entityManager->createQueryBuilder(); - + $courses = $query ->select('c') ->from('ChamiloCoreBundle:Course', 'c') @@ -419,7 +416,7 @@ class BuyCoursesPlugin extends Plugin 'title' => $course->getTitle(), 'coaches' => [] ]; - + $userCourseSubscriptions = $session->getUserCourseSubscriptionsByStatus( $course, Chamilo\CoreBundle\Entity\Session::COACH @@ -602,7 +599,7 @@ class BuyCoursesPlugin extends Plugin * @param array $sessionId The session ID * @return array */ - public function getSessionInfo($sessionId) + public function getSessionInfo($sessionId) { $entityManager = Database::getManager(); $session = $entityManager->find('ChamiloCoreBundle:Session', $sessionId); diff --git a/src/Chamilo/CoreBundle/Entity/Skill.php b/src/Chamilo/CoreBundle/Entity/Skill.php index ddeb9704d9..25f2bdebc1 100644 --- a/src/Chamilo/CoreBundle/Entity/Skill.php +++ b/src/Chamilo/CoreBundle/Entity/Skill.php @@ -198,7 +198,8 @@ class Skill * Get the icon URL * @return string */ - public function getWebIconPath(){ + public function getWebIconPath() + { if ($this->getIcon()) { return api_get_path(WEB_UPLOAD_PATH) . "badges/{$this->getIcon()}"; }