diff --git a/plugin/sepe/src/configuration.php b/plugin/sepe/src/configuration.php index dc8b4353b9..baa289e574 100644 --- a/plugin/sepe/src/configuration.php +++ b/plugin/sepe/src/configuration.php @@ -1,12 +1,12 @@ 0) { $tmp = Database::fetch_assoc($result); $info = $tmp['api']; - } else { $info = ''; } diff --git a/plugin/sepe/src/formative-action-edit.php b/plugin/sepe/src/formative-action-edit.php index f5c265e762..6595dcf1e6 100644 --- a/plugin/sepe/src/formative-action-edit.php +++ b/plugin/sepe/src/formative-action-edit.php @@ -1,10 +1,11 @@ get_lang('formativeActionEdit'); $tpl = new Template($templateName); $tpl->assign('info', $info); - if ($info['start_date'] != "0000-00-00" && $info['start_date'] != NULL) { + if ($info['start_date'] != "0000-00-00" && $info['start_date'] != null) { $tpl->assign('day_start', date("j", strtotime($info['start_date']))); $tpl->assign('month_start', date("n", strtotime($info['start_date']))); $tpl->assign('year_start', date("Y", strtotime($info['start_date']))); @@ -173,7 +174,7 @@ if (api_is_platform_admin()) { } else { $yearStart = date("Y"); } - if ($info['end_date'] != "0000-00-00" && $info['end_date'] != NULL) { + if ($info['end_date'] != "0000-00-00" && $info['end_date'] != null) { $tpl->assign('day_end', date("j", strtotime($info['end_date']))); $tpl->assign('month_end', date("n", strtotime($info['end_date']))); $tpl->assign('year_end', date("Y", strtotime($info['end_date']))); diff --git a/plugin/sepe/src/formative-action.php b/plugin/sepe/src/formative-action.php index 171afa45f7..dcdb095c31 100644 --- a/plugin/sepe/src/formative-action.php +++ b/plugin/sepe/src/formative-action.php @@ -1,12 +1,12 @@ get_lang('FormativeActionData'); $interbreadcrumb[] = array("url" => "/plugin/sepe/src/sepe-administration-menu.php", "name" => $plugin->get_lang('MenuSepe')); $interbreadcrumb[] = array("url" => "formative-actions-list.php", "name" => $plugin->get_lang('FormativesActionsList')); $tpl = new Template($templateName); - + if (isset($_SESSION['sepe_message_info'])) { - $tpl->assign('message_info', $_SESSION['sepe_message_info']); + $tpl->assign('message_info', $_SESSION['sepe_message_info']); unset($_SESSION['sepe_message_info']); } if (isset($_SESSION['sepe_message_error'])) { - $tpl->assign('message_error', $_SESSION['sepe_message_error']); + $tpl->assign('message_error', $_SESSION['sepe_message_error']); unset($_SESSION['sepe_message_error']); } diff --git a/plugin/sepe/src/formative-actions-list.php b/plugin/sepe/src/formative-actions-list.php index d5aa893b25..2868a96ce0 100644 --- a/plugin/sepe/src/formative-actions-list.php +++ b/plugin/sepe/src/formative-actions-list.php @@ -1,11 +1,11 @@ get_lang('FormativesActionsList'); $interbreadcrumb[] = array("url" => "/plugin/sepe/src/sepe-administration-menu.php", "name" => $plugin->get_lang('MenuSepe')); $tpl = new Template($templateName); - + if (isset($_SESSION['sepe_message_info'])) { - $tpl->assign('message_info', $_SESSION['sepe_message_info']); + $tpl->assign('message_info', $_SESSION['sepe_message_info']); unset($_SESSION['sepe_message_info']); } if (isset($_SESSION['sepe_message_error'])) { - $tpl->assign('message_error', $_SESSION['sepe_message_error']); + $tpl->assign('message_error', $_SESSION['sepe_message_error']); unset($_SESSION['sepe_message_error']); } $courseActionList = listCourseAction(); diff --git a/plugin/sepe/src/identification-data-edit.php b/plugin/sepe/src/identification-data-edit.php index 54aa2f9f0b..cfcc75858e 100644 --- a/plugin/sepe/src/identification-data-edit.php +++ b/plugin/sepe/src/identification-data-edit.php @@ -1,10 +1,11 @@ get_lang('ProblemToken'); session_write_close(); header("Location: participant-action-edit.php?new_participant=".$newParticipant."&participant_id=".$participantId."&action_id=".$actionId); + exit; } } else { $token = Security::get_token(); diff --git a/plugin/sepe/src/participant-specialty-edit.php b/plugin/sepe/src/participant-specialty-edit.php index a54b932d3c..d0432ada78 100644 --- a/plugin/sepe/src/participant-specialty-edit.php +++ b/plugin/sepe/src/participant-specialty-edit.php @@ -1,11 +1,12 @@ get_lang('ProblemToken'); session_write_close(); header("Location: participant-specialty-edit.php?new_specialty=".$newSpecialty."&specialty_id=".$specialtyId."&participant_id=".$participantId."&action_id=".$actionId); + exit; } } else { $token = Security::get_token(); @@ -182,7 +185,7 @@ if (api_is_platform_admin()) { $info = getInfoSpecialtyParticipant(intval($_GET['specialty_id'])); $tpl->assign('info', $info); $tpl->assign('new_specialty', '0'); - if ($info['registration_date'] != '0000-00-00' && $info['registration_date'] != NULL) { + if ($info['registration_date'] != '0000-00-00' && $info['registration_date'] != null) { $tpl->assign('day_registration', date("j", strtotime($info['registration_date']))); $tpl->assign('month_registration', date("n", strtotime($info['registration_date']))); $tpl->assign('year_registration', date("Y", strtotime($info['registration_date']))); @@ -192,7 +195,7 @@ if (api_is_platform_admin()) { } else { $registrationYear = date("Y"); } - if ($info['leaving_date'] != '0000-00-00' && $info['leaving_date'] != NULL) { + if ($info['leaving_date'] != '0000-00-00' && $info['leaving_date'] != null) { $tpl->assign('day_leaving', date("j", strtotime($info['leaving_date']))); $tpl->assign('month_leaving', date("n", strtotime($info['leaving_date']))); $tpl->assign('year_leaving', date("Y", strtotime($info['leaving_date']))); @@ -202,7 +205,7 @@ if (api_is_platform_admin()) { } else { $leaveYear = date("Y"); } - if ($info['start_date'] != '0000-00-00' && $info['start_date'] != NULL) { + if ($info['start_date'] != '0000-00-00' && $info['start_date'] != null) { $tpl->assign('day_start', date("j", strtotime($info['start_date']))); $tpl->assign('month_start', date("n", strtotime($info['start_date']))); $tpl->assign('year_start', date("Y", strtotime($info['start_date']))); @@ -212,7 +215,7 @@ if (api_is_platform_admin()) { } else { $startYear = date("Y"); } - if ($info['end_date'] != '0000-00-00' && $info['end_date'] != NULL) { + if ($info['end_date'] != '0000-00-00' && $info['end_date'] != null) { $tpl->assign('day_end', date("j", strtotime($info['end_date']))); $tpl->assign('month_end', date("n", strtotime($info['end_date']))); $tpl->assign('year_end', date("Y", strtotime($info['end_date']))); diff --git a/plugin/sepe/src/sepe-administration-menu.php b/plugin/sepe/src/sepe-administration-menu.php index 8520d4165a..5253c472ac 100644 --- a/plugin/sepe/src/sepe-administration-menu.php +++ b/plugin/sepe/src/sepe-administration-menu.php @@ -1,12 +1,12 @@ 'boolean') ); } - + /** * This method creates the tables required to this plugin */ @@ -82,7 +83,7 @@ class SepePlugin extends Plugin require_once api_get_path(SYS_PLUGIN_PATH).'sepe/database.php'; } - + /** * This method drops the plugin tables */ @@ -128,7 +129,7 @@ class SepePlugin extends Plugin . $oldTableTutorsCompany." TO ".self::TABLE_SEPE_TUTORS_COMPANY.", " . $oldTableCompetence." TO ".self::TABLE_SEPE_TEACHING_COMPETENCE.";"; Database::query($sql); - + $sepeCourseActionsTable = self::TABLE_SEPE_COURSE_ACTIONS; $sql = "ALTER TABLE ".$sepeCourseActionsTable." CHANGE `cod` `id` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT"; Database::query($sql); @@ -136,7 +137,7 @@ class SepePlugin extends Plugin Database::query($sql); $sql = "ALTER TABLE ".$sepeCourseActionsTable." CHANGE `id_course` `course_id` INT( 10 ) UNSIGNED NOT NULL"; Database::query($sql); - + $sepeActionsTable = self::TABLE_SEPE_ACTIONS; $sql = "ALTER TABLE ".$sepeActionsTable." CHANGE `cod` `id` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT"; Database::query($sql); @@ -174,7 +175,7 @@ class SepePlugin extends Plugin Database::query($sql); $sql = "ALTER TABLE ".$sepeActionsTable." CHANGE `CONTACTO_ACCION` `contact_action` LONGTEXT"; Database::query($sql); - + $sepeSpecialtyTable = self::TABLE_SEPE_SPECIALTY; $sql = "ALTER TABLE ".$sepeSpecialtyTable." CHANGE `cod` `id` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT"; Database::query($sql); @@ -226,7 +227,7 @@ class SepePlugin extends Plugin Database::query($sql); $sql = "ALTER TABLE ".$sepeSpecialtyTable." CHANGE `NUMERO_ACTIVIDADES_EVALUACION` `evaluation_activity_count` INT( 10 ) UNSIGNED"; Database::query($sql); - + $sepeParticipantTable = self::TABLE_SEPE_PARTICIPANTS; $sql = "ALTER TABLE ".$sepeParticipantTable." CHANGE `cod` `id` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT"; Database::query($sql); @@ -250,7 +251,7 @@ class SepePlugin extends Plugin Database::query($sql); $sql = "ALTER TABLE ".$sepeParticipantTable." CHANGE `CIF_EMPRESA` `company_fiscal_number` VARCHAR( 9 )"; Database::query($sql); - + $sepeCenterTable = self::TABLE_SEPE_CENTERS; $sql = "ALTER TABLE ".$sepeCenterTable." CHANGE `cod` `id` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT"; Database::query($sql); @@ -258,7 +259,7 @@ class SepePlugin extends Plugin Database::query($sql); $sql = "ALTER TABLE ".$sepeCenterTable." CHANGE `CODIGO_CENTRO` `center_code` VARCHAR(16)"; Database::query($sql); - + $sepeSpecialtyClassroomTable = self::TABLE_SEPE_SPECIALTY_CLASSROOM; $sql = "ALTER TABLE ".$sepeSpecialtyClassroomTable." CHANGE `cod` `id` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT"; Database::query($sql); @@ -266,7 +267,7 @@ class SepePlugin extends Plugin Database::query($sql); $sql = "ALTER TABLE ".$sepeSpecialtyClassroomTable." CHANGE `cod_centro` `center_id` INT( 10 ) UNSIGNED NOT NULL"; Database::query($sql); - + $sepeSpecialtyTutorsTable = self::TABLE_SEPE_SPECIALTY_TUTORS; $sql = "ALTER TABLE ".$sepeSpecialtyTutorsTable." CHANGE `cod` `id` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT"; Database::query($sql); @@ -284,7 +285,7 @@ class SepePlugin extends Plugin Database::query($sql); $sql = "ALTER TABLE ".$sepeSpecialtyTutorsTable." CHANGE `FORMACION_MODALIDAD_TELEFORMACION` `training_teleforming` VARCHAR(2)"; Database::query($sql); - + $sepeTutorsTable = self::TABLE_SEPE_TUTORS; $sql = "ALTER TABLE ".$sepeTutorsTable." CHANGE `cod` `id` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT"; Database::query($sql); @@ -306,7 +307,7 @@ class SepePlugin extends Plugin Database::query($sql); $sql = "ALTER TABLE ".$sepeTutorsTable." CHANGE `FORMACION_MODALIDAD_TELEFORMACION` `training_teleforming` VARCHAR(2)"; Database::query($sql); - + $sepeParticipantSpecialtyTable = self::TABLE_SEPE_PARTICIPANTS_SPECIALTY; $sql = "ALTER TABLE ".$sepeParticipantSpecialtyTable." CHANGE `cod` `id` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT"; Database::query($sql); @@ -336,7 +337,7 @@ class SepePlugin extends Plugin Database::query($sql); $sql = "ALTER TABLE ".$sepeParticipantSpecialtyTable." CHANGE `PUNTUACION_FINAL` `final_score` VARCHAR(4)"; Database::query($sql); - + $sepeParticipantSpecialtyTutorialsTable = self::TABLE_SEPE_PARTICIPANTS_SPECIALTY_TUTORIALS; $sql = "ALTER TABLE ".$sepeParticipantSpecialtyTutorialsTable." CHANGE `cod` `id` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT"; Database::query($sql); @@ -350,9 +351,9 @@ class SepePlugin extends Plugin Database::query($sql); $sql = "ALTER TABLE ".$sepeParticipantSpecialtyTutorialsTable." CHANGE `FECHA_FIN` `end_date` DATE"; Database::query($sql); - + $sepeTutorsCompanyTable = self::TABLE_SEPE_TUTORS_COMPANY; - + $sql = "UPDATE ".$sepeTutorsCompanyTable." SET empresa='1' WHERE empresa='SI'"; Database::query($sql); $sql = "UPDATE ".$sepeTutorsCompanyTable." SET empresa='0' WHERE empresa='NO'"; @@ -361,7 +362,7 @@ class SepePlugin extends Plugin Database::query($sql); $sql = "UPDATE ".$sepeTutorsCompanyTable." SET formacion='0' WHERE formacion='NO'"; Database::query($sql); - + $sql = "ALTER TABLE ".$sepeTutorsCompanyTable." CHANGE `cod` `id` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT"; Database::query($sql); $sql = "ALTER TABLE ".$sepeTutorsCompanyTable." CHANGE `alias` `alias` VARCHAR(255)"; @@ -376,13 +377,13 @@ class SepePlugin extends Plugin Database::query($sql); $sql = "ALTER TABLE ".$sepeTutorsCompanyTable." CHANGE `formacion` `training` VARCHAR(1)"; Database::query($sql); - + $sepeCompetenceTable = self::TABLE_SEPE_TEACHING_COMPETENCE; $sql = "ALTER TABLE ".$sepeCompetenceTable." CHANGE `cod` `id` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT"; Database::query($sql); $sql = "ALTER TABLE ".$sepeCompetenceTable." CHANGE `valor` `value` LONGTEXT"; Database::query($sql); - + $sepeLogParticipantTable = self::TABLE_SEPE_LOG_PARTICIPANT; $sql = "ALTER TABLE ".$sepeLogParticipantTable." CHANGE `cod` `id` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT"; Database::query($sql); @@ -394,7 +395,7 @@ class SepePlugin extends Plugin Database::query($sql); $sql = "ALTER TABLE ".$sepeLogParticipantTable." CHANGE `fecha_baja` `leaving_date` DATE"; Database::query($sql); - + $sepeLogModParticipantTable = self::TABLE_SEPE_LOG_MOD_PARTICIPANT; $sql = "ALTER TABLE ".$sepeLogModParticipantTable." CHANGE `cod` `id` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT"; Database::query($sql); @@ -404,7 +405,7 @@ class SepePlugin extends Plugin Database::query($sql); $sql = "ALTER TABLE ".$sepeLogModParticipantTable." CHANGE `fecha_mod` `change_date` DATE"; Database::query($sql); - + $sepeCenterTable = self::TABLE_SEPE_CENTER; $sql = "ALTER TABLE ".$sepeCenterTable." CHANGE `cod` `id` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT"; Database::query($sql); diff --git a/plugin/sepe/src/specialty-action-edit.php b/plugin/sepe/src/specialty-action-edit.php index f8c4469c82..6e6779bc68 100644 --- a/plugin/sepe/src/specialty-action-edit.php +++ b/plugin/sepe/src/specialty-action-edit.php @@ -1,11 +1,12 @@ "/plugin/sepe/src/sepe-administration-menu.php", "name" => $plugin->get_lang('MenuSepe')); - $interbreadcrumb[] = array("url" => "formative-actions-list.php", "name" => $plugin->get_lang('FormativesActionsList')); - $interbreadcrumb[] = array("url" => "formative-action.php?cid=".$id_course, "name" => $plugin->get_lang('FormativeAction')); + $interbreadcrumb[] = array( + "url" => "/plugin/sepe/src/sepe-administration-menu.php", + "name" => $plugin->get_lang('MenuSepe'), + ); + $interbreadcrumb[] = array( + "url" => "formative-actions-list.php", + "name" => $plugin->get_lang('FormativesActionsList'), + ); + $interbreadcrumb[] = array( + "url" => "formative-action.php?cid=".$id_course, + "name" => $plugin->get_lang('FormativeAction'), + ); if (isset($_GET['new_specialty']) && intval($_GET['new_specialty']) == 1) { $templateName = $plugin->get_lang('NewSpecialtyAccion'); $tpl = new Template($templateName); @@ -172,7 +182,7 @@ if (api_is_platform_admin()) { $tpl->assign('action_id', intval($_GET['action_id'])); $info = getSpecialtActionInfo(intval($_GET['specialty_id'])); $tpl->assign('info', $info); - if ($info['start_date'] != '0000-00-00' && $info['start_date'] != NULL) { + if ($info['start_date'] != '0000-00-00' && $info['start_date'] != null) { $tpl->assign('day_start', date("j", strtotime($info['start_date']))); $tpl->assign('month_start', date("n", strtotime($info['start_date']))); $tpl->assign('year_start', date("Y", strtotime($info['start_date']))); @@ -182,7 +192,7 @@ if (api_is_platform_admin()) { } else { $yearStart = date("Y"); } - if ($info['end_date'] != '0000-00-00' && $info['end_date'] != NULL) { + if ($info['end_date'] != '0000-00-00' && $info['end_date'] != null) { $tpl->assign('day_end', date("j", strtotime($info['end_date']))); $tpl->assign('month_end', date("n", strtotime($info['end_date']))); $tpl->assign('year_end', date("Y", strtotime($info['end_date']))); diff --git a/plugin/sepe/src/specialty-classroom-edit.php b/plugin/sepe/src/specialty-classroom-edit.php index d173ce45f7..0e3ca2f866 100644 --- a/plugin/sepe/src/specialty-classroom-edit.php +++ b/plugin/sepe/src/specialty-classroom-edit.php @@ -1,11 +1,11 @@ get_lang('ProblemToken'); session_write_close(); header("Location: specialty-tutor-edit.php?new_tutor=".$newTutor."&specialty_id=".$specialtyId."&tutor_id=".$specialtyTutorId."&action_id=".$actionId); + exit; } } else { $token = Security::get_token(); @@ -217,4 +220,5 @@ if (api_is_platform_admin()) { $tpl->display_one_col_template(); } else { header('Location:'.api_get_path(WEB_PATH)); + exit; } diff --git a/plugin/sepe/src/specialty-tutorial-edit.php b/plugin/sepe/src/specialty-tutorial-edit.php index 22533239c6..30ddf36ccc 100644 --- a/plugin/sepe/src/specialty-tutorial-edit.php +++ b/plugin/sepe/src/specialty-tutorial-edit.php @@ -1,11 +1,12 @@ get_lang('ProblemToken'); session_write_close(); header("Location: specialty-tutorial-edit.php?new_tutorial=".$newTutorial."&specialty_id=".$specialtyId."&tutorial_id=".$tutorialId."&action_id=".$actionId); + exit; } } else { $token = Security::get_token(); @@ -102,7 +105,7 @@ if (api_is_platform_admin()) { $info = getInfoSpecialtyTutorial(intval($_GET['tutorial_id'])); $tpl->assign('info', $info); $tpl->assign('new_tutorial', '0'); - if ($info['start_date'] != '0000-00-00' && $info['start_date'] != NULL) { + if ($info['start_date'] != '0000-00-00' && $info['start_date'] != null) { $tpl->assign('day_start', date("j", strtotime($info['start_date']))); $tpl->assign('month_start', date("n", strtotime($info['start_date']))); $tpl->assign('year_start', date("Y", strtotime($info['start_date']))); @@ -112,7 +115,7 @@ if (api_is_platform_admin()) { } else { $startYear = date("Y"); } - if ($info['end_date'] != '0000-00-00' && $info['end_date'] != NULL) { + if ($info['end_date'] != '0000-00-00' && $info['end_date'] != null) { $tpl->assign('day_end', date("j", strtotime($info['end_date']))); $tpl->assign('month_end', date("n", strtotime($info['end_date']))); $tpl->assign('year_end', date("Y", strtotime($info['end_date']))); @@ -154,4 +157,5 @@ if (api_is_platform_admin()) { $tpl->display_one_col_template(); } else { header('Location:'.api_get_path(WEB_PATH)); + exit; }