From 03ef19cb1c9f3df6826942e53ba5e1cbf75ba491 Mon Sep 17 00:00:00 2001 From: Scrutinizer Auto-Fixer Date: Tue, 11 Jul 2017 11:47:13 +0000 Subject: [PATCH] Scrutinizer Auto-Fixes This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com --- main/auth/courses_controller.php | 2 +- main/exercise/exercise_show.php | 2 +- plugin/bbb/lang/french.php | 2 +- plugin/sepe/install.php | 2 +- plugin/sepe/src/configuration.php | 2 +- plugin/sepe/src/identification-data.php | 2 +- plugin/sepe/src/sepe.lib.php | 8 ++-- plugin/sepe/src/specialty-classroom-edit.php | 2 +- plugin/sepe/ws/Sepe.php | 46 ++++++++++---------- 9 files changed, 34 insertions(+), 34 deletions(-) diff --git a/main/auth/courses_controller.php b/main/auth/courses_controller.php index 79f7fa2b03..9c418702e8 100755 --- a/main/auth/courses_controller.php +++ b/main/auth/courses_controller.php @@ -186,7 +186,7 @@ class CoursesController $limit, $justVisible ); - $data['browse_course_categories'] = $browse_course_categories; + $data['browse_course_categories'] = $browse_course_categories; $data['search_term'] = Security::remove_XSS($search_term); //filter before showing in template // getting all the courses to which the user is subscribed to diff --git a/main/exercise/exercise_show.php b/main/exercise/exercise_show.php index 882bd1fb4f..e54f0fe46a 100755 --- a/main/exercise/exercise_show.php +++ b/main/exercise/exercise_show.php @@ -801,7 +801,7 @@ foreach ($questionList as $questionId) { } } else { foreach ($model['score_list'] as $item) { - $i = api_number_format($item['score_to_qualify']/100 * $questionWeighting, 2); + $i = api_number_format($item['score_to_qualify'] / 100 * $questionWeighting, 2); $model = ExerciseLib::getModelStyle($item, $i); echo ''; } diff --git a/plugin/bbb/lang/french.php b/plugin/bbb/lang/french.php index 2e3a3fed6c..f2583c80ec 100755 --- a/plugin/bbb/lang/french.php +++ b/plugin/bbb/lang/french.php @@ -42,7 +42,7 @@ $strings['NoGroup'] = 'Sans groupe'; $strings['UrlMeetingToShare'] = 'URL à partager'; $strings['AdminView'] = 'View for administrators'; -$strings['max_users_limit'] = 'Utilisateurs maximum' ; +$strings['max_users_limit'] = 'Utilisateurs maximum'; $strings['max_users_limit_help'] = 'Nombre maximum d\'utilisateurs simultanés dans une salle de vidéoconférence de cours ou cours-session. Laisser vide ou sur 0 pour ne pas assigner de limite.'; $strings['MaxXUsersWarning'] = 'Cette salle de conférence est limitée à %s utilisateurs simultanés.'; $strings['MaxXUsersReached'] = 'La limite de %s utilisateurs simultanés a été atteinte dans cette salle de conférence. Veuillez rafraîchir dans quelque minutes pour voir si un siège s\'est libéré, ou attendre l\'ouverture d\'une nouvelle salle de conférence pour participer.'; diff --git a/plugin/sepe/install.php b/plugin/sepe/install.php index e69df0b23b..6bf62e5de0 100644 --- a/plugin/sepe/install.php +++ b/plugin/sepe/install.php @@ -4,7 +4,7 @@ * Config the plugin * @package chamilo.plugin.sepe */ -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/sepe/src/configuration.php b/plugin/sepe/src/configuration.php index 9781846f74..dc8b4353b9 100644 --- a/plugin/sepe/src/configuration.php +++ b/plugin/sepe/src/configuration.php @@ -37,5 +37,5 @@ if (api_is_platform_admin()) { $tpl->assign('content', $content); $tpl->display_one_col_template(); } else { - header('Location:' . api_get_path(WEB_PATH)); + header('Location:'.api_get_path(WEB_PATH)); } diff --git a/plugin/sepe/src/identification-data.php b/plugin/sepe/src/identification-data.php index 5b48769b9a..5f918c4233 100644 --- a/plugin/sepe/src/identification-data.php +++ b/plugin/sepe/src/identification-data.php @@ -32,5 +32,5 @@ if (api_is_platform_admin()) { $tpl->assign('content', $content); $tpl->display_one_col_template(); } else { - header('Location:' . api_get_path(WEB_PATH)); + header('Location:'.api_get_path(WEB_PATH)); } diff --git a/plugin/sepe/src/sepe.lib.php b/plugin/sepe/src/sepe.lib.php index 7c815309a8..6687ca58cd 100644 --- a/plugin/sepe/src/sepe.lib.php +++ b/plugin/sepe/src/sepe.lib.php @@ -52,7 +52,7 @@ function checkIdentificationData() $result = Database::query($sql); if (Database::affected_rows($result) > 0) { return true; - }else{ + } else { return false; } } @@ -218,7 +218,7 @@ function getTutorsSpecialty($specialtyId) $res = Database::query($sql); $aux = array(); while ($row = Database::fetch_assoc($res)) { - if (!in_array($row['id'],$tutorsList)) { + if (!in_array($row['id'], $tutorsList)) { $tutor = array(); $tutor['id'] = $row['id']; if (trim($row['firstname']) != '' || trim($row['lastname']) != '') { @@ -253,7 +253,7 @@ function getInfoSpecialtyTutor($tutorId) return $row; } -function freeTeacherList($teacherList,$specialtyId,$platform_user_id) +function freeTeacherList($teacherList, $specialtyId, $platform_user_id) { global $tableSepeSpecialtyTutors; global $tableSepeTutors; @@ -492,7 +492,7 @@ function getSpecialtyTutorId($specialtyId, $tutorId) return $row['id']; } -function checkInsertNewLog($platformUserId,$actionId) +function checkInsertNewLog($platformUserId, $actionId) { global $tableSepeLogParticipant; $sql = "SELECT * FROM $tableSepeLogParticipant WHERE platform_user_id = $platformUserId AND action_id = $actionId"; diff --git a/plugin/sepe/src/specialty-classroom-edit.php b/plugin/sepe/src/specialty-classroom-edit.php index bf6b4fe961..8bcfc6f94e 100644 --- a/plugin/sepe/src/specialty-classroom-edit.php +++ b/plugin/sepe/src/specialty-classroom-edit.php @@ -129,5 +129,5 @@ if (api_is_platform_admin()) { $tpl->assign('content', $content); $tpl->display_one_col_template(); } else { - header('Location:' . api_get_path(WEB_PATH)); + header('Location:'.api_get_path(WEB_PATH)); } diff --git a/plugin/sepe/ws/Sepe.php b/plugin/sepe/ws/Sepe.php index b73fb71510..e9db8c4e90 100644 --- a/plugin/sepe/ws/Sepe.php +++ b/plugin/sepe/ws/Sepe.php @@ -350,10 +350,10 @@ class Sepe 'action_id' => $actionId, 'specialty_origin' => $specialtyOrigin, 'professional_area' => $professionalArea, - 'specialty_code' =>$specialtyCode , + 'specialty_code' =>$specialtyCode, 'center_origin' => $centerOrigin, 'center_code' => $centerCode, - 'start_date' => $startDate , + 'start_date' => $startDate, 'end_date' => $endDate, 'modality_impartition' => $modalityImpartition, 'classroom_hours' => $classroomHours, @@ -368,7 +368,7 @@ class Sepe 'night_access_number' => $nightAccessNumber, 'night_total_duration' => $nightTotalDuration, 'attendees_count' => $attendeesCount, - 'learning_activity_count' => $learningActivityCount , + 'learning_activity_count' => $learningActivityCount, 'attempt_count' => $attemptCount, 'evaluation_activity_count' => $evaluationActivityCount ); @@ -400,17 +400,17 @@ class Sepe $centerCode = $centro->CODIGO_CENTRO; $sql = "SELECT id FROM $tableCenters WHERE center_origin='".$centerOrigin."' AND center_code='".$centerCode."';"; $res = Database::query($sql); - if (Database::num_rows($res)>0) { + if (Database::num_rows($res) > 0) { $aux_row = Database::fetch_assoc($res); $centerId = $aux_row['id']; } else { $sql = "INSERT INTO $tableCenters (center_origin, center_code) - VALUES ('" . $centerOrigin . "','" . $centerCode . "');"; + VALUES ('".$centerOrigin."','".$centerCode."');"; Database::query($sql); $centerId = Database::insert_id(); } $sql = "INSERT INTO $tableSpecialtyClassroom (specialty_id, center_id) - VALUES ('" . $specialtyId . "','" . $centerId . "')"; + VALUES ('".$specialtyId."','".$centerId."')"; Database::query($sql); $id = Database::insert_id(); @@ -450,12 +450,12 @@ class Sepe $sql = "SELECT id FROM $tableTutors WHERE document_type='".$documentType."' AND document_number='".$documentNumber."' AND document_letter='".$documentLetter."';"; $res = Database::query($sql); - if (Database::num_rows($res)>0) { + if (Database::num_rows($res) > 0) { $aux_row = Database::fetch_assoc($res); $tutorId = $aux_row['id']; } else { $sql = "INSERT INTO $tableTutors (document_type, document_number, document_letter) - VALUES ('" . $documentType . "','" . $documentNumber . "','" . $documentLetter . "');"; + VALUES ('".$documentType."','".$documentNumber."','".$documentLetter."');"; Database::query($sql); $tutorId = Database::insert_id(); } @@ -469,7 +469,7 @@ class Sepe ); } $sql = "INSERT INTO $tableSpecialityTutors (specialty_id, tutor_id, tutor_accreditation, professional_experience, teaching_competence, experience_teleforming, training_teleforming) - VALUES ('" . $specialtyId . "','" . $tutorId . "','" . $tutorAccreditation . "','" . $professionalExperience . "','" . $teachingCompetence . "','" . $experienceTeleforming . "','" . $trainingTeleforming . "');"; + VALUES ('".$specialtyId."','".$tutorId."','".$tutorAccreditation."','".$professionalExperience."','".$teachingCompetence."','".$experienceTeleforming."','".$trainingTeleforming."');"; Database::query($sql); } } @@ -511,7 +511,7 @@ class Sepe $documentLetterCompany = isset($participant->CONTRATO_FORMACION->ID_TUTOR_EMPRESA->LETRA_NIF) ? $participant->CONTRATO_FORMACION->ID_TUTOR_EMPRESA->LETRA_NIF : null; if (!empty($documentTypeCompany) || !empty($documentNumberCompany) || !empty($documentLetterCompany)) { $tmp_e = Database::query('SELECT id FROM '.$tableTutorsCompany.' WHERE document_type="'.$documentTypeCompany.'" AND document_number="'.$documentNumberCompany.'" AND document_letter="'.$documentLetterCompany.'";'); - if (Database::num_rows($tmp_e)>0) { + if (Database::num_rows($tmp_e) > 0) { $row_tmp = Database::fetch_assoc($tmp_e); $tutorIdCompany = $row_tmp['id']; Database::query("UPDATE $tableTutorsCompany SET company='1' WHERE id='".$tutorIdCompany."'"); @@ -531,7 +531,7 @@ class Sepe $documentLetterTraining = isset($participant->CONTRATO_FORMACION->ID_TUTOR_FORMACION->LETRA_NIF) ? $participant->CONTRATO_FORMACION->ID_TUTOR_FORMACION->LETRA_NIF : null; if (!empty($documentTypeTraining) || !empty($documentNumberTraining) || !empty($documentLetterTraining)) { $tmp_f = Database::query('SELECT id FROM '.$tableTutorsCompany.' WHERE document_type="'.$documentTypeTraining.'" AND document_number="'.$documentNumberTraining.'" AND document_letter="'.$documentLetterTraining.'";'); - if (Database::num_rows($tmp_f)>0) { + if (Database::num_rows($tmp_f) > 0) { $row_tmp = Database::fetch_assoc($tmp_f); $tutorIdTraining = $row_tmp['id']; Database::query("UPDATE $tableTutorsCompany SET training='1' WHERE id='".$tutorIdTraining."'"); @@ -623,7 +623,7 @@ class Sepe $table_aux = Database::get_main_table('plugin_sepe_participants_specialty'); $sql = "INSERT INTO $table_aux (participant_id,specialty_origin,professional_area,specialty_code,registration_date,leaving_date,center_origin,center_code,start_date,end_date,final_result,final_qualification,final_score) - VALUES ('" . $participantId . "','" . $specialtyOrigin . "','" . $professionalArea . "','" . $specialtyCode . "','" . $registrationDate . "','" . $leavingDate . "','" . $centerOrigin . "','" . $centerCode . "','" . $startDate . "','" . $endDate . "','" . $finalResult . "','" . $finalQualification . "','" . $finalScore . "');"; + VALUES ('".$participantId."','".$specialtyOrigin."','".$professionalArea."','".$specialtyCode."','".$registrationDate."','".$leavingDate."','".$centerOrigin."','".$centerCode."','".$startDate."','".$endDate."','".$finalResult."','".$finalQualification."','".$finalScore."');"; Database::query($sql); $participantSpecialtyId = Database::insert_id(); if (empty($participantSpecialtyId)) { @@ -653,7 +653,7 @@ class Sepe $table_aux2 = Database::get_main_table('plugin_sepe_participants_specialty_tutorials'); $sql = "INSERT INTO $table_aux2 (participant_specialty_id,center_origin,center_code,start_date,end_date) - VALUES ('" . $participantSpecialtyId . "','" . $centerOrigin . "','" . $centerCode . "','" . $startDate . "','" . $endDate . "');"; + VALUES ('".$participantSpecialtyId."','".$centerOrigin."','".$centerCode."','".$startDate."','".$endDate."');"; $rs = Database::query($sql); if (!$rs) { return array( @@ -747,7 +747,7 @@ class Sepe while ($aux = Database::fetch_assoc($rs)) { $specialtyId = $aux['id']; $sql = "SELECT * FROM $classRoomTable - WHERE specialty_id='" . $specialtyId . "'"; + WHERE specialty_id='".$specialtyId."'"; $resultClassroom = Database::query($sql); if (Database::num_rows($resultClassroom) === 0) { return array( @@ -772,14 +772,14 @@ class Sepe $classroomCenterList->append($classroomCenter); } $sql = "SELECT * FROM $specialityTutorTable - WHERE specialty_id='" . $specialtyId . "'"; + WHERE specialty_id='".$specialtyId."'"; $resultSpecialtyTutor = Database::query($sql); $trainingTutors = new ArrayObject(); if (Database::num_rows($resultSpecialtyTutor)) { while ($tmp_aux = Database::fetch_assoc($resultSpecialtyTutor)) { $sql = "SELECT * FROM $tutorTable - WHERE id='" . $tmp_aux['tutor_id'] . "' + WHERE id='".$tmp_aux['tutor_id']."' LIMIT 1"; $rs_tutor = Database::query($sql); if (Database::num_rows($rs_tutor)) { @@ -906,8 +906,8 @@ class Sepe $obj->HORARIO_TARDE->DURACION_TOTAL = $aux['afternoon_total_duration']; } - if (!empty($aux['night_participants_number']) || - !empty($aux['night_access_number']) || + if (!empty($aux['night_participants_number']) || + !empty($aux['night_access_number']) || !empty($aux['night_total_duration']) ) { $obj->HORARIO_NOCHE = new stdClass(); @@ -916,9 +916,9 @@ class Sepe $obj->HORARIO_NOCHE->DURACION_TOTAL = $aux['night_total_duration']; } - if (!empty($aux['attendees_count']) || - !empty($aux['learning_activity_count']) || - !empty($aux['attempt_count']) || + if (!empty($aux['attendees_count']) || + !empty($aux['learning_activity_count']) || + !empty($aux['attempt_count']) || !empty($aux['evaluation_activity_count']) ) { $obj->SEGUIMIENTO_EVALUACION = new stdClass(); @@ -963,7 +963,7 @@ class Sepe $participantId = $aux['id']; $sql = "SELECT * FROM $participantsSpecialityTable - WHERE participant_id='" . $participantId . "'"; + WHERE participant_id='".$participantId."'"; $resultParticipantSpecialty = Database::query($sql); $namespace = null; @@ -971,7 +971,7 @@ class Sepe while ($tmp = Database::fetch_assoc($resultParticipantSpecialty)) { $participantSpecialtyId = $tmp['id']; $sql = "SELECT * FROM $participantsSpecialityTutorialsTable - WHERE participant_specialty_id='" . $participantSpecialtyId . "'"; + WHERE participant_specialty_id='".$participantSpecialtyId."'"; $resultTutorials = Database::query($sql); $classroomTutorials = new ArrayObject();