Add Sepe plugin

pull/2487/head
nosolored 9 years ago
parent b9a37c49e5
commit e33c20ca80
  1. 1
      composer.json
  2. 13
      plugin/sepe/admin.php
  3. 9
      plugin/sepe/config.php
  4. 880
      plugin/sepe/database.php
  5. 7
      plugin/sepe/index.php
  6. 16
      plugin/sepe/install.php
  7. 224
      plugin/sepe/js/sepe.js
  8. 43
      plugin/sepe/lang/english.php
  9. 45
      plugin/sepe/lang/spanish.php
  10. 13
      plugin/sepe/plugin.php
  11. 24
      plugin/sepe/readme.txt
  12. BIN
      plugin/sepe/resources/button_delete.gif
  13. BIN
      plugin/sepe/resources/edit.png
  14. BIN
      plugin/sepe/resources/folder.png
  15. BIN
      plugin/sepe/resources/forms.png
  16. BIN
      plugin/sepe/resources/icon-delete.png
  17. BIN
      plugin/sepe/resources/icon-edit.png
  18. BIN
      plugin/sepe/resources/list.png
  19. BIN
      plugin/sepe/resources/options-lines.png
  20. 127
      plugin/sepe/resources/plugin.css
  21. BIN
      plugin/sepe/resources/settings.png
  22. 60
      plugin/sepe/src/accion-formativa.php
  23. 41
      plugin/sepe/src/configuracion.php
  24. 37
      plugin/sepe/src/datos-identificativos.php
  25. 112
      plugin/sepe/src/editar-accion-formativa.php
  26. 67
      plugin/sepe/src/editar-datos-identificativos.php
  27. 145
      plugin/sepe/src/editar-especialidad-accion.php
  28. 123
      plugin/sepe/src/editar-especialidad-classroom.php
  29. 170
      plugin/sepe/src/editar-especialidad-participante.php
  30. 146
      plugin/sepe/src/editar-especialidad-tutor.php
  31. 112
      plugin/sepe/src/editar-especialidad-tutorials.php
  32. 171
      plugin/sepe/src/editar-participante-accion.php
  33. 225
      plugin/sepe/src/function.php
  34. 1
      plugin/sepe/src/index.php
  35. 46
      plugin/sepe/src/index.sepe.php
  36. 53
      plugin/sepe/src/listado-acciones-formativas.php
  37. 59
      plugin/sepe/src/menu_sepe_administracion.php
  38. 587
      plugin/sepe/src/sepe.lib.php
  39. 118
      plugin/sepe/src/sepe_plugin.class.php
  40. 200
      plugin/sepe/src/wsse/soap-server-wsse.php
  41. 152
      plugin/sepe/src/wsse/soap-wsa.php
  42. 497
      plugin/sepe/src/wsse/soap-wsse.php
  43. 1817
      plugin/sepe/src/wsse/xmlseclibs.php
  44. 13
      plugin/sepe/uninstall.php
  45. 267
      plugin/sepe/view/accion_formativa.tpl
  46. 40
      plugin/sepe/view/configuracion.tpl
  47. 95
      plugin/sepe/view/datos_identificativos.tpl
  48. 357
      plugin/sepe/view/editar_accion_formativa.tpl
  49. 89
      plugin/sepe/view/editar_datos_identificativos.tpl
  50. 435
      plugin/sepe/view/editar_especialidad_accion.tpl
  51. 95
      plugin/sepe/view/editar_especialidad_classroom.tpl
  52. 480
      plugin/sepe/view/editar_especialidad_participante.tpl
  53. 299
      plugin/sepe/view/editar_especialidad_tutor.tpl
  54. 199
      plugin/sepe/view/editar_especialidad_tutorials.tpl
  55. 410
      plugin/sepe/view/editar_participante_accion.tpl
  56. 72
      plugin/sepe/view/listado_acciones_formativas.tpl
  57. 5
      plugin/sepe/view/menu_sepe_administracion.tpl
  58. 913
      plugin/sepe/ws/ProveedorCentroTFWS.wsdl
  59. 1275
      plugin/sepe/ws/Sepe.php
  60. 170
      plugin/sepe/ws/service.php

@ -71,6 +71,7 @@
"emojione/emojione": "1.3.0",
"zendframework/zend-config": "2.5.1",
"zendframework/zend-soap": "2.*",
"zendframework/zend-feed": "2.5.1",
"zendframework/zend-http": "2.5.1",

@ -0,0 +1,13 @@
<?php
require_once dirname(__FILE__).'/config.php';
$plugin = SepePlugin::create();
$enable = $plugin->get('sepe_enable');
$pluginPath = api_get_path(WEB_PLUGIN_PATH).'sepe/src/menu_sepe_administracion.php';
if ($enable == "true" && api_is_platform_admin()) {
header('Location:'.$pluginPath);
} else {
header('Location: ../../index.php');
}

@ -0,0 +1,9 @@
<?php
/* For licensing terms, see /license.txt */
require_once __DIR__ . '/../../main/inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH).'plugin.class.php';
require_once 'src/sepe.lib.php';
require_once 'src/sepe_plugin.class.php';

@ -0,0 +1,880 @@
<?php
/* For license terms, see /license.txt */
/**
* Plugin database installation script. Can only be executed if included
* inside another script loading global.inc.php
* @package chamilo.plugin.sepe
*/
/**
* Check if script can be called
*/
if (!function_exists('api_get_path')) {
die('This script must be loaded through the Chamilo plugin installer sequence');
}
$entityManager = Database::getManager();
$pluginSchema = new \Doctrine\DBAL\Schema\Schema();
$connection = $entityManager->getConnection();
$platform = $connection->getDatabasePlatform();
//Create tables
/* ========== PLUGIN_SEPE_CENTER ========== */
$sepeCenterTable = $pluginSchema->createTable(SepePlugin::TABLE_SEPE_CENTER);
$sepeCenterTable->addColumn(
'cod',
\Doctrine\DBAL\Types\Type::INTEGER,
array('autoincrement' => true, 'unsigned' => true)
);
$sepeCenterTable->addColumn('origen_centro', \Doctrine\DBAL\Types\Type::STRING);
$sepeCenterTable->addColumn('codigo_centro', \Doctrine\DBAL\Types\Type::STRING);
$sepeCenterTable->addColumn('nombre_centro', \Doctrine\DBAL\Types\Type::STRING);
$sepeCenterTable->addColumn('url', \Doctrine\DBAL\Types\Type::STRING);
$sepeCenterTable->addColumn('url_seguimiento', \Doctrine\DBAL\Types\Type::STRING);
$sepeCenterTable->addColumn('telefono', \Doctrine\DBAL\Types\Type::STRING);
$sepeCenterTable->addColumn('email', \Doctrine\DBAL\Types\Type::STRING);
$sepeCenterTable->setPrimaryKey(array('cod'));
/* ========== PLUGIN_SEPE_ACTIONS ========== */
$sepeActionsTable = $pluginSchema->createTable(SepePlugin::TABLE_SEPE_ACTIONS);
$sepeActionsTable->addColumn(
'cod',
\Doctrine\DBAL\Types\Type::INTEGER,
array('autoincrement' => true, 'unsigned' => true)
);
$sepeActionsTable->addColumn(
'ORIGEN_ACCION',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 2)
);
$sepeActionsTable->addColumn(
'CODIGO_ACCION',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 30)
);
$sepeActionsTable->addColumn(
'SITUACION',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 2)
);
$sepeActionsTable->addColumn(
'ORIGEN_ESPECIALIDAD',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 2)
);
$sepeActionsTable->addColumn(
'AREA_PROFESIONAL',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 4)
);
$sepeActionsTable->addColumn(
'CODIGO_ESPECIALIDAD',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 14)
);
$sepeActionsTable->addColumn(
'DURACION',
\Doctrine\DBAL\Types\Type::INTEGER,
array('unsigned' => true)
);
$sepeActionsTable->addColumn('FECHA_INICIO', \Doctrine\DBAL\Types\Type::DATE);
$sepeActionsTable->addColumn('FECHA_FIN', \Doctrine\DBAL\Types\Type::DATE);
$sepeActionsTable->addColumn(
'IND_ITINERARIO_COMPLETO',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 2)
); //enum('SI','NO')
$sepeActionsTable->addColumn(
'TIPO_FINANCIACION',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 2)
);
$sepeActionsTable->addColumn(
'NUMERO_ASISTENTES',
\Doctrine\DBAL\Types\Type::INTEGER,
array('unsigned' => true)
);
$sepeActionsTable->addColumn(
'DENOMINACION_ACCION',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 250)
);
$sepeActionsTable->addColumn('INFORMACION_GENERAL', \Doctrine\DBAL\Types\Type::TEXT);
$sepeActionsTable->addColumn('HORARIOS', \Doctrine\DBAL\Types\Type::TEXT);
$sepeActionsTable->addColumn('REQUISITOS', \Doctrine\DBAL\Types\Type::TEXT);
$sepeActionsTable->addColumn('CONTACTO_ACCION', \Doctrine\DBAL\Types\Type::TEXT);
$sepeActionsTable->setPrimaryKey(array('cod'));
/* ========== PLUGIN_SEPE_SPECIALTY ========== */
$sepeSpecialtyTable = $pluginSchema->createTable(SepePlugin::TABLE_SEPE_SPECIALTY);
$sepeSpecialtyTable->addColumn(
'cod',
\Doctrine\DBAL\Types\Type::INTEGER,
array('autoincrement' => true, 'unsigned' => true)
);
$sepeSpecialtyTable->addColumn(
'cod_action',
\Doctrine\DBAL\Types\Type::INTEGER,
array('unsigned' => true)
);
$sepeSpecialtyTable->addColumn(
'ORIGEN_ESPECIALIDAD',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 2)
);
$sepeSpecialtyTable->addColumn(
'AREA_PROFESIONAL',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 4)
);
$sepeSpecialtyTable->addColumn(
'CODIGO_ESPECIALIDAD',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 14)
);
$sepeSpecialtyTable->addColumn(
'ORIGEN_CENTRO',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 2)
);
$sepeSpecialtyTable->addColumn(
'CODIGO_CENTRO',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 16)
);
$sepeSpecialtyTable->addColumn('FECHA_INICIO', \Doctrine\DBAL\Types\Type::DATE);
$sepeSpecialtyTable->addColumn('FECHA_FIN', \Doctrine\DBAL\Types\Type::DATE);
$sepeSpecialtyTable->addColumn(
'MODALIDAD_IMPARTICION',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 2)
);
$sepeSpecialtyTable->addColumn(
'HORAS_PRESENCIAL',
\Doctrine\DBAL\Types\Type::INTEGER,
array('unsigned' => true)
);
$sepeSpecialtyTable->addColumn(
'HORAS_TELEFORMACION',
\Doctrine\DBAL\Types\Type::INTEGER,
array('unsigned' => true)
);
$sepeSpecialtyTable->addColumn(
'HM_NUM_PARTICIPANTES',
\Doctrine\DBAL\Types\Type::INTEGER,
array('unsigned' => true, 'notnull' => false)
);
$sepeSpecialtyTable->addColumn(
'HM_NUMERO_ACCESOS',
\Doctrine\DBAL\Types\Type::INTEGER,
array('unsigned' => true, 'notnull' => false)
);
$sepeSpecialtyTable->addColumn(
'HM_DURACION_TOTAL',
\Doctrine\DBAL\Types\Type::INTEGER,
array('unsigned' => true, 'notnull' => false)
);
$sepeSpecialtyTable->addColumn(
'HT_NUM_PARTICIPANTES',
\Doctrine\DBAL\Types\Type::INTEGER,
array('unsigned' => true, 'notnull' => false)
);
$sepeSpecialtyTable->addColumn(
'HT_NUMERO_ACCESOS',
\Doctrine\DBAL\Types\Type::INTEGER,
array('unsigned' => true, 'notnull' => false)
);
$sepeSpecialtyTable->addColumn(
'HT_DURACION_TOTAL',
\Doctrine\DBAL\Types\Type::INTEGER,
array('unsigned' => true, 'notnull' => false)
);
$sepeSpecialtyTable->addColumn(
'HN_NUM_PARTICIPANTES',
\Doctrine\DBAL\Types\Type::INTEGER,
array('unsigned' => true, 'notnull' => false)
);
$sepeSpecialtyTable->addColumn(
'HN_NUMERO_ACCESOS',
\Doctrine\DBAL\Types\Type::INTEGER,
array('unsigned' => true, 'notnull' => false)
);
$sepeSpecialtyTable->addColumn(
'HN_DURACION_TOTAL',
\Doctrine\DBAL\Types\Type::INTEGER,
array('unsigned' => true, 'notnull' => false)
);
$sepeSpecialtyTable->addColumn(
'NUM_PARTICIPANTES',
\Doctrine\DBAL\Types\Type::INTEGER,
array('unsigned' => true, 'notnull' => false)
);
$sepeSpecialtyTable->addColumn(
'NUMERO_ACTIVIDADES_APRENDIZAJE',
\Doctrine\DBAL\Types\Type::INTEGER,
array('unsigned' => true, 'notnull' => false)
);
$sepeSpecialtyTable->addColumn(
'NUMERO_INTENTOS',
\Doctrine\DBAL\Types\Type::INTEGER,
array('unsigned' => true, 'notnull' => false)
);
$sepeSpecialtyTable->addColumn(
'NUMERO_ACTIVIDADES_EVALUACION',
\Doctrine\DBAL\Types\Type::INTEGER,
array('unsigned' => true, 'notnull' => false)
);
$sepeSpecialtyTable->setPrimaryKey(array('cod'));
$sepeSpecialtyTable->addForeignKeyConstraint(
$sepeActionsTable,
array('cod_action'),
array('cod'),
array('onDelete' => 'CASCADE')
);
/* ========== PLUGIN_SEPE_CENTROS ========== */
$sepeCentrosTable = $pluginSchema->createTable(SepePlugin::TABLE_SEPE_CENTROS);
$sepeCentrosTable->addColumn(
'cod',
\Doctrine\DBAL\Types\Type::INTEGER,
array('autoincrement' => true, 'unsigned' => true)
);
$sepeCentrosTable->addColumn(
'ORIGEN_CENTRO',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 2)
);
$sepeCentrosTable->addColumn(
'CODIGO_CENTRO',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 16)
);
$sepeCentrosTable->setPrimaryKey(array('cod'));
/* ========== PLUGIN_SEPE_SPECIALTY_CLASSROOM ========== */
$sepeSpecialtyClassroomTable = $pluginSchema->createTable(SepePlugin::TABLE_SEPE_SPECIALTY_CLASSROOM);
$sepeSpecialtyClassroomTable->addColumn(
'cod',
\Doctrine\DBAL\Types\Type::INTEGER,
array('autoincrement' => true, 'unsigned' => true)
);
$sepeSpecialtyClassroomTable->addColumn(
'cod_specialty',
\Doctrine\DBAL\Types\Type::INTEGER,
array('unsigned' => true)
);
$sepeSpecialtyClassroomTable->addColumn(
'cod_centro',
\Doctrine\DBAL\Types\Type::INTEGER,
array('unsigned' => true)
);
$sepeSpecialtyClassroomTable->setPrimaryKey(array('cod'));
$sepeSpecialtyClassroomTable->addForeignKeyConstraint(
$sepeSpecialtyTable,
array('cod_specialty'),
array('cod'),
array('onDelete' => 'CASCADE')
);
/* ========== PLUGIN_SEPE_TUTORS ========== */
$sepeTutorsTable = $pluginSchema->createTable(SepePlugin::TABLE_SEPE_TUTORS);
$sepeTutorsTable->addColumn(
'cod',
\Doctrine\DBAL\Types\Type::INTEGER,
array('autoincrement' => true, 'unsigned' => true)
);
$sepeTutorsTable->addColumn(
'cod_user_chamilo',
\Doctrine\DBAL\Types\Type::INTEGER,
array('unsigned' => true)
);
$sepeTutorsTable->addColumn(
'TIPO_DOCUMENTO',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 1)
); //enum('D','E','U','W','G','H')
$sepeTutorsTable->addColumn(
'NUM_DOCUMENTO',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 10)
);
$sepeTutorsTable->addColumn(
'LETRA_NIF',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 1)
);
$sepeTutorsTable->addColumn(
'ACREDITACION_TUTOR',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 200)
);
$sepeTutorsTable->addColumn(
'EXPERIENCIA_PROFESIONAL',
\Doctrine\DBAL\Types\Type::INTEGER,
array('unsigned' => true)
);
$sepeTutorsTable->addColumn(
'COMPETENCIA_DOCENTE',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 2)
);
$sepeTutorsTable->addColumn(
'EXPERIENCIA_MODALIDAD_TELEFORMACION',
\Doctrine\DBAL\Types\Type::INTEGER,
array('unsigned' => true)
);
$sepeTutorsTable->addColumn(
'FORMACION_MODALIDAD_TELEFORMACION',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 2)
);
$sepeTutorsTable->setPrimaryKey(array('cod'));
/* ========== PLUGIN_SEPE_SPECIALTY_TUTORS ========== */
$sepeSpecialtyTutorsTable = $pluginSchema->createTable(SepePlugin::TABLE_SEPE_SPECIALTY_TUTORS);
$sepeSpecialtyTutorsTable->addColumn(
'cod',
\Doctrine\DBAL\Types\Type::INTEGER,
array('autoincrement' => true, 'unsigned' => true)
);
$sepeSpecialtyTutorsTable->addColumn(
'cod_specialty',
\Doctrine\DBAL\Types\Type::INTEGER,
array('unsigned' => true)
);
$sepeSpecialtyTutorsTable->addColumn(
'cod_tutor',
\Doctrine\DBAL\Types\Type::INTEGER,
array('unsigned' => true)
);
$sepeSpecialtyTutorsTable->addColumn(
'ACREDITACION_TUTOR',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 200)
);
$sepeSpecialtyTutorsTable->addColumn(
'EXPERIENCIA_PROFESIONAL',
\Doctrine\DBAL\Types\Type::INTEGER,
array('unsigned' => true)
);
$sepeSpecialtyTutorsTable->addColumn(
'COMPETENCIA_DOCENTE',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 2)
);
$sepeSpecialtyTutorsTable->addColumn(
'EXPERIENCIA_MODALIDAD_TELEFORMACION',
\Doctrine\DBAL\Types\Type::INTEGER,
array('unsigned' => true)
);
$sepeSpecialtyTutorsTable->addColumn(
'FORMACION_MODALIDAD_TELEFORMACION',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 2)
);
$sepeSpecialtyTutorsTable->setPrimaryKey(array('cod'));
$sepeSpecialtyTutorsTable->addForeignKeyConstraint(
$sepeSpecialtyTable,
array('cod_specialty'),
array('cod'),
array('onDelete' => 'CASCADE')
);
/* ========== PLUGIN_SEPE_TUTORS_EMPRESA ========== */
$sepeTutorsEmpresaTable = $pluginSchema->createTable(SepePlugin::TABLE_SEPE_TUTORS_EMPRESA);
$sepeTutorsEmpresaTable->addColumn(
'cod',
\Doctrine\DBAL\Types\Type::INTEGER,
array('autoincrement' => true, 'unsigned' => true)
);
$sepeTutorsEmpresaTable->addColumn(
'alias',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 255)
);
$sepeTutorsEmpresaTable->addColumn(
'TIPO_DOCUMENTO',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 1, 'notnull' => false)
); //enum('D','E','U','W','G','H')
$sepeTutorsEmpresaTable->addColumn(
'NUM_DOCUMENTO',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 10, 'notnull' => false)
);
$sepeTutorsEmpresaTable->addColumn(
'LETRA_NIF',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 1, 'notnull' => false)
);
$sepeTutorsEmpresaTable->addColumn(
'empresa',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 2)
);
$sepeTutorsEmpresaTable->addColumn(
'formacion',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 2)
);
$sepeTutorsEmpresaTable->setPrimaryKey(array('cod'));
/* ========== PLUGIN_SEPE_PARTICIPANTS ========== */
$sepeParticipantsTable = $pluginSchema->createTable(SepePlugin::TABLE_SEPE_PARTICIPANTS);
$sepeParticipantsTable->addColumn(
'cod',
\Doctrine\DBAL\Types\Type::INTEGER,
array('autoincrement' => true, 'unsigned' => true)
);
$sepeParticipantsTable->addColumn(
'cod_action',
\Doctrine\DBAL\Types\Type::INTEGER,
array('unsigned' => true)
);
$sepeParticipantsTable->addColumn(
'cod_user_chamilo',
\Doctrine\DBAL\Types\Type::INTEGER,
array('unsigned' => true)
);
$sepeParticipantsTable->addColumn(
'TIPO_DOCUMENTO',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 1)
); //enum('D','E','U','W','G','H')
$sepeParticipantsTable->addColumn(
'NUM_DOCUMENTO',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 10)
);
$sepeParticipantsTable->addColumn(
'LETRA_NIF',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 1)
);
$sepeParticipantsTable->addColumn(
'INDICADOR_COMPETENCIAS_CLAVE',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 2)
);
$sepeParticipantsTable->addColumn(
'ID_CONTRATO_CFA',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 14, 'notnull' => false)
);
$sepeParticipantsTable->addColumn(
'CIF_EMPRESA',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 9, 'notnull' => false)
);
$sepeParticipantsTable->addColumn(
'cod_tutor_empresa',
\Doctrine\DBAL\Types\Type::INTEGER,
array('unsigned' => true)
);
$sepeParticipantsTable->addColumn(
'cod_tutor_formacion',
\Doctrine\DBAL\Types\Type::INTEGER,
array('unsigned' => true)
);
$sepeParticipantsTable->setPrimaryKey(array('cod'));
$sepeParticipantsTable->addForeignKeyConstraint(
$sepeActionsTable,
array('cod_action'),
array('cod'),
array('onDelete' => 'CASCADE')
);
$sepeParticipantsTable->addForeignKeyConstraint(
$sepeTutorsEmpresaTable,
array('cod_tutor_empresa'),
array('cod'),
array('onDelete' => 'CASCADE')
);
$sepeParticipantsTable->addForeignKeyConstraint(
$sepeTutorsEmpresaTable,
array('cod_tutor_formacion'),
array('cod'),
array('onDelete' => 'CASCADE')
);
/* ========== PLUGIN_SEPE_PARTICIPANTS_SPECIALTY ========== */
$sepeParticipantsSpecialtyTable = $pluginSchema->createTable(SepePlugin::TABLE_SEPE_PARTICIPANTS_SPECIALTY);
$sepeParticipantsSpecialtyTable->addColumn(
'cod',
\Doctrine\DBAL\Types\Type::INTEGER,
array('autoincrement' => true, 'unsigned' => true)
);
$sepeParticipantsSpecialtyTable->addColumn(
'cod_participant',
\Doctrine\DBAL\Types\Type::INTEGER,
array('unsigned' => true)
);
$sepeParticipantsSpecialtyTable->addColumn(
'ORIGEN_ESPECIALIDAD',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 2, 'notnull' => false)
);
$sepeParticipantsSpecialtyTable->addColumn(
'AREA_PROFESIONAL',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 4, 'notnull' => false)
);
$sepeParticipantsSpecialtyTable->addColumn(
'CODIGO_ESPECIALIDAD',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 14, 'notnull' => false)
);
$sepeParticipantsSpecialtyTable->addColumn(
'FECHA_ALTA',
\Doctrine\DBAL\Types\Type::DATE,
array('notnull' => false)
);
$sepeParticipantsSpecialtyTable->addColumn(
'FECHA_BAJA',
\Doctrine\DBAL\Types\Type::DATE,
array('notnull' => false)
);
$sepeParticipantsSpecialtyTable->addColumn(
'ORIGEN_CENTRO',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 2, 'notnull' => false)
);
$sepeParticipantsSpecialtyTable->addColumn(
'CODIGO_CENTRO',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 16, 'notnull' => false)
);
$sepeParticipantsSpecialtyTable->addColumn(
'FECHA_INICIO',
\Doctrine\DBAL\Types\Type::DATE,
array('notnull' => false)
);
$sepeParticipantsSpecialtyTable->addColumn(
'FECHA_FIN',
\Doctrine\DBAL\Types\Type::DATE,
array('notnull' => false)
);
$sepeParticipantsSpecialtyTable->addColumn(
'RESULTADO_FINAL',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 1, 'notnull' => false)
);
$sepeParticipantsSpecialtyTable->addColumn(
'CALIFICACION_FINAL',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 4, 'notnull' => false)
);
$sepeParticipantsSpecialtyTable->addColumn(
'PUNTUACION_FINAL',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 4, 'notnull' => false)
);
$sepeParticipantsSpecialtyTable->setPrimaryKey(array('cod'));
$sepeParticipantsSpecialtyTable->addForeignKeyConstraint(
$sepeParticipantsTable,
array('cod_participant'),
array('cod'),
array('onDelete' => 'CASCADE')
);
/* ========== PLUGIN_SEPE_PARTICIPANTS_SPECIALTY_TUTORIALS ========== */
$sepeParticipantsSpecialtyTutorialsTable = $pluginSchema->createTable(SepePlugin::TABLE_SEPE_PARTICIPANTS_SPECIALTY_TUTORIALS);
$sepeParticipantsSpecialtyTutorialsTable->addColumn(
'cod',
\Doctrine\DBAL\Types\Type::INTEGER,
array('autoincrement' => true, 'unsigned' => true)
);
$sepeParticipantsSpecialtyTutorialsTable->addColumn(
'cod_participant_specialty',
\Doctrine\DBAL\Types\Type::INTEGER,
array('unsigned' => true)
);
$sepeParticipantsSpecialtyTutorialsTable->addColumn(
'ORIGEN_CENTRO',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 2)
);
$sepeParticipantsSpecialtyTutorialsTable->addColumn(
'CODIGO_CENTRO',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 16)
);
$sepeParticipantsSpecialtyTutorialsTable->addColumn('FECHA_INICIO', \Doctrine\DBAL\Types\Type::DATE);
$sepeParticipantsSpecialtyTutorialsTable->addColumn('FECHA_FIN', \Doctrine\DBAL\Types\Type::DATE);
$sepeParticipantsSpecialtyTutorialsTable->setPrimaryKey(array('cod'));
$sepeParticipantsSpecialtyTutorialsTable->addForeignKeyConstraint(
$sepeParticipantsSpecialtyTable,
array('cod_participant_specialty'),
array('cod'),
array('onDelete' => 'CASCADE')
);
/* ========== PLUGIN_SEPE_COURSE_ACTIONS ========== */
$sepeCourseActionsTable = $pluginSchema->createTable(SepePlugin::TABLE_SEPE_COURSE_ACTIONS);
$sepeCourseActionsTable->addColumn(
'cod',
\Doctrine\DBAL\Types\Type::INTEGER,
array('autoincrement' => true, 'unsigned' => true)
);
$sepeCourseActionsTable->addColumn(
'id_course',
\Doctrine\DBAL\Types\Type::INTEGER,
array('unsigned' => true)
);
$sepeCourseActionsTable->addColumn(
'cod_action',
\Doctrine\DBAL\Types\Type::INTEGER,
array('unsigned' => true)
);
$sepeCourseActionsTable->setPrimaryKey(array('cod'));
$sepeCourseActionsTable->addForeignKeyConstraint(
$sepeActionsTable,
array('cod_action'),
array('cod'),
array('onDelete' => 'CASCADE')
);
/* ========== PLUGIN_SEPE_COMPETENCIA_DOCENTE ========== */
$sepeCompetenciaDocenteTable = $pluginSchema->createTable(SepePlugin::TABLE_SEPE_COMPETENCIA_DOCENTE);
$sepeCompetenciaDocenteTable->addColumn(
'cod',
\Doctrine\DBAL\Types\Type::INTEGER,
array('autoincrement' => true, 'unsigned' => true)
);
$sepeCompetenciaDocenteTable->addColumn(
'code',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 2)
);
$sepeCompetenciaDocenteTable->addColumn('valor', \Doctrine\DBAL\Types\Type::TEXT);
$sepeCompetenciaDocenteTable->setPrimaryKey(array('cod'));
/* ========== PLUGIN_SEPE_LOG_PARTICIPANT ========== */
$sepeLogParticipantTable = $pluginSchema->createTable(SepePlugin::TABLE_SEPE_LOG_PARTICIPANT);
$sepeLogParticipantTable->addColumn(
'cod',
\Doctrine\DBAL\Types\Type::INTEGER,
array('autoincrement' => true, 'unsigned' => true)
);
$sepeLogParticipantTable->addColumn(
'cod_user_chamilo',
\Doctrine\DBAL\Types\Type::INTEGER,
array('unsigned' => true)
);
$sepeLogParticipantTable->addColumn(
'cod_action',
\Doctrine\DBAL\Types\Type::INTEGER,
array('unsigned' => true)
);
$sepeLogParticipantTable->addColumn('fecha_alta', \Doctrine\DBAL\Types\Type::DATETIME);
$sepeLogParticipantTable->addColumn('fecha_baja', \Doctrine\DBAL\Types\Type::DATETIME);
$sepeLogParticipantTable->setPrimaryKey(array('cod'));
/* ========== PLUGIN_SEPE_LOG_MOD_PARTICIPANT ========== */
$sepeLogModParticipantTable = $pluginSchema->createTable(SepePlugin::TABLE_SEPE_LOG_MOD_PARTICIPANT);
$sepeLogModParticipantTable->addColumn(
'cod',
\Doctrine\DBAL\Types\Type::INTEGER,
array('autoincrement' => true, 'unsigned' => true)
);
$sepeLogModParticipantTable->addColumn(
'cod_user_chamilo',
\Doctrine\DBAL\Types\Type::INTEGER,
array('unsigned' => true)
);
$sepeLogModParticipantTable->addColumn(
'cod_action',
\Doctrine\DBAL\Types\Type::INTEGER,
array('unsigned' => true)
);
$sepeLogModParticipantTable->addColumn('fecha_mod', \Doctrine\DBAL\Types\Type::DATETIME);
$sepeLogModParticipantTable->setPrimaryKey(array('cod'));
/* ========== PLUGIN_SEPE_LOG ========== */
$sepeLogTable = $pluginSchema->createTable(SepePlugin::TABLE_SEPE_LOG);
$sepeLogTable->addColumn(
'cod',
\Doctrine\DBAL\Types\Type::INTEGER,
array('autoincrement' => true, 'unsigned' => true)
);
$sepeLogTable->addColumn(
'ip',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 200)
);
$sepeLogTable->addColumn(
'action',
\Doctrine\DBAL\Types\Type::STRING,
array('length' => 255)
);
$sepeLogTable->addColumn('fecha', \Doctrine\DBAL\Types\Type::DATETIME);
$sepeLogTable->setPrimaryKey(array('cod'));
$queries = $pluginSchema->toSql($platform);
foreach ($queries as $query) {
Database::query($query);
}
//Insert data
$sepeCompetenciaDocenteTable = Database::get_main_table(SepePlugin::TABLE_SEPE_COMPETENCIA_DOCENTE);
$competencias = array(
array(1, '01', 'Certificado de profesionalidad de docencia de la formación profesional para el empleo regulado por Real Decreto 1697/2011, de 18 de noviembre.'),
array(2, '02', 'Certificado de profesionalidad de formador ocupacional.'),
array(3, '03', 'Certificado de Aptitud Pedagágica o título profesional de Especialización Didáctica o Certificado de Cualificación Pedagógica.'),
array(4, '04', 'Máster Universitario habilitante para el ejercicio de las Profesiones reguladas de Profesor de Educación Secundaria Obligatoria y Bachillerato, Formación Profesional y Escuelas Oficiales de Idiomas.'),
array(5, '05', 'Curso de formación equivalente a la formación pedagógica y didáctica exigida para aquellas personas que, estando en posesión de una titulación declarada equivalente a efectos de docencia, no pueden realizar los estudios de máster, establecida en la disposición adicional primera del Real Decreto 1834/2008, de 8 de noviembre.'),
array(6, '06', 'Experiencia docente contrastada de al menos 600 horas de impartición de acciones formativas de formación profesional para el empleo o del sistema educativo en modalidad presencial, en los últimos diez años.')
);
foreach ($competencias as $competencia) {
Database::insert(
$sepeCompetenciaDocenteTable,
array(
'cod' => $competencia[0],
'code' => $competencia[1],
'valor' => $competencia[2]
)
);
}
$sepeTutorsEmpresaTable = Database::get_main_table(SepePlugin::TABLE_SEPE_TUTORS_EMPRESA);
Database::insert(
$sepeTutorsEmpresaTable,
array(
'cod' => 1,
'alias' => 'Sin tutor',
'empresa' => 'SI',
'formacion' => 'SI'
)
);
/* Crear campos extras a los usuarios de la plataforma */
$fieldlabel = 'sexo';
$fieldtype = '3';
$fieldtitle = 'Género';
$fielddefault = '';
$field_id = UserManager::create_extra_field($fieldlabel,$fieldtype,$fieldtitle,$fielddefault);
$sql = "INSERT INTO extra_field_options (field_id, option_value, display_text, option_order) VALUES ('".$field_id."', 'Hombre', 'Hombre',1);";
Database::query($sql);
$sql = "INSERT INTO extra_field_options (field_id, option_value, display_text, option_order) VALUES ('".$field_id."', 'Mujer', 'Mujer',2);";
Database::query($sql);
$sql = "INSERT INTO extra_field_options (field_id, option_value, display_text, option_order) VALUES ('".$field_id."', 'Otros', 'Otros',3);";
Database::query($sql);
$fieldlabel = 'edad';
$fieldtype = '6';
$fieldtitle = 'Fecha de nacimiento';
$fielddefault = '';
$field_id = UserManager::create_extra_field($fieldlabel,$fieldtype,$fieldtitle,$fielddefault);
$fieldlabel = 'nivel_formativo';
$fieldtype = '1';
$fieldtitle = 'Nivel formativo';
$fielddefault = '';
$field_id = UserManager::create_extra_field($fieldlabel,$fieldtype,$fieldtitle,$fielddefault);
$fieldlabel = 'situacion_laboral';
$fieldtype = '1';
$fieldtitle = 'Situación Laboral';
$fielddefault = '';
$field_id = UserManager::create_extra_field($fieldlabel,$fieldtype,$fieldtitle,$fielddefault);
$fieldlabel = 'provincia_residencia';
$fieldtype = '4';
$fieldtitle = 'Provincia Residencia';
$fielddefault = '';
$field_id = UserManager::create_extra_field($fieldlabel,$fieldtype,$fieldtitle,$fielddefault);
$provincias = 'Albacete;Alicante/Alacant;Almería;Araba/Álava;Asturias;Ávila;Badajoz;Balears, Illes;Barcelona;Bizkaia;Burgos;Cáceres;Cádiz;Cantabria;Castellón/Castelló;Ciudad Real;Córdoba;Coruña, A;Cuenca;Gipuzkoa;Girona;Granada;Guadalajara;Huelva;Huesca;Jaén;León;Lleida;Lugo;Madrid;Málaga;Murcia;Navarra;Ourense;Palencia;Palmas, Las;Pontevedr;Rioja, La;Salamanca;Santa Cruz de Tenerife;Segovia;Sevilla;Soria;Tarragona;Teruel;Toledo;Valencia/Valéncia;Valladolid;Zamora;Zaragoza;Ceuta;Melilla';
$list_provincias = explode(';',$provincias);
$i = 1;
foreach($list_provincias as $value){
$sql = "INSERT INTO extra_field_options (field_id, option_value, display_text, option_order) VALUES ('".$field_id."', '".$i."', '".$value."','".$i."');";
Database::query($sql);
$i++;
}
$fieldlabel = 'comunidad_residencia';
$fieldtype = '4';
$fieldtitle = 'Comunidad autonoma de residencia';
$fielddefault = '';
$field_id = UserManager::create_extra_field($fieldlabel,$fieldtype,$fieldtitle,$fielddefault);
$ccaa = ';Andalucía;Aragón;Asturias, Principado de;Balears, Illes;Canarias;Cantabria;Castilla y León;Castilla - La Mancha;Cataluña;Comunitat Valenciana;Extremadura;Galicia;Madrid, Comunidad de;Murcia, Región de;Navarra, Comunidad Foral de;País Vasco;Rioja, La;Ceuta;Melilla';
$list_ccaa = explode(';',$ccaa);
$i = 1;
foreach($list_ccaa as $value){
$sql = "INSERT INTO extra_field_options (field_id, option_value, display_text, option_order) VALUES ('".$field_id."', '".$i."', '".$value."','".$i."');";
Database::query($sql);
$i++;
}
$fieldlabel = 'provincia_trabajo';
$fieldtype = '4';
$fieldtitle = 'Provincia Trabajo';
$fielddefault = '';
//$fieldoptions = ';Albacete;Alicante/Alacant;Almería;Araba/Álava;Asturias;Ávila;Badajoz;Balears, Illes;Barcelona;Bizkaia;Burgos;Cáceres;Cádiz;Cantabria;Castellón/Castelló;Ciudad Real;Córdoba;Coruña, A;Cuenca;Gipuzkoa;Girona;Granada;Guadalajara;Huelva;Huesca;Jaén;León;Lleida;Lugo;Madrid;Málaga;Murcia;Navarra;Ourense;Palencia;Palmas, Las;Pontevedr;Rioja, La;Salamanca;Santa Cruz de Tenerife;Segovia;Sevilla;Soria;Tarragona;Teruel;Toledo;Valencia/Valéncia;Valladolid;Zamora;Zaragoza;Ceuta;Melilla';
$field_id = UserManager::create_extra_field($fieldlabel,$fieldtype,$fieldtitle,$fielddefault);
$i = 1;
foreach($list_provincias as $value){
$sql = "INSERT INTO extra_field_options (field_id, option_value, display_text, option_order) VALUES ('".$field_id."', '".$i."', '".$value."','".$i."');";
Database::query($sql);
$i++;
}
$fieldlabel = 'comunidad_trabajo';
$fieldtype = '4';
$fieldtitle = 'Comunidad autonoma Trabajo';
$fielddefault = '';
//$fieldoptions = ';Andalucía;Aragón;Asturias, Principado de;Balears, Illes;Canarias;Cantabria;Castilla y León;Castilla - La Mancha;Cataluña;Comunitat Valenciana;Extremadura;Galicia;Madrid, Comunidad de;Murcia, Región de;Navarra, Comunidad Foral de;País Vasco;Rioja, La;Ceuta;Melilla';
$field_id = UserManager::create_extra_field($fieldlabel,$fieldtype,$fieldtitle,$fielddefault);
$i = 1;
foreach($list_ccaa as $value){
$sql = "INSERT INTO extra_field_options (field_id, option_value, display_text, option_order) VALUES ('".$field_id."', '".$i."', '".$value."','".$i."');";
Database::query($sql);
$i++;
}
$fieldlabel = 'medio_conocimiento';
$fieldtype = '2';
$fieldtitle = 'Medio de conocimiento Acción formativa';
$fielddefault = '';
$field_id = UserManager::create_extra_field($fieldlabel,$fieldtype,$fieldtitle,$fielddefault);
$fieldlabel = 'experiencia_anterior';
$fieldtype = '2';
$fieldtitle = 'Experiencia anterior en la realización de cursos on-line';
$fielddefault = '';
$field_id = UserManager::create_extra_field($fieldlabel,$fieldtype,$fieldtitle,$fielddefault);
$fieldlabel = 'razones_teleformacion';
$fieldtype = '2';
$fieldtitle = 'Razones por la modalidad teleformación';
$fielddefault = '';
$field_id = UserManager::create_extra_field($fieldlabel,$fieldtype,$fieldtitle,$fielddefault);
$fieldlabel = 'valoracion_modalidad';
$fieldtype = '2';
$fieldtitle = 'Valoración general sobre la modalidad';
$fielddefault = '';
$field_id = UserManager::create_extra_field($fieldlabel,$fieldtype,$fieldtitle,$fielddefault);
$fieldlabel = 'categoria_profesional';
$fieldtype = '1';
$fieldtitle = 'Categoría profesional';
$fielddefault = '';
$field_id = UserManager::create_extra_field($fieldlabel,$fieldtype,$fieldtitle,$fielddefault);
$fieldlabel = 'tamano_empresa';
$fieldtype = '1';
$fieldtitle = 'Tamaño de la empresa';
$fielddefault = '';
$field_id = UserManager::create_extra_field($fieldlabel,$fieldtype,$fieldtitle,$fielddefault);
$fieldlabel = 'horario_accion_formativa';
$fieldtype = '1';
$fieldtitle = 'Horario de la acción formativa';
$fielddefault = '';
$field_id = UserManager::create_extra_field($fieldlabel,$fieldtype,$fieldtitle,$fielddefault);

@ -0,0 +1,7 @@
<?php
/* For license terms, see /license.txt */
/**
* Show form
*/
require_once('config.php');
require_once('src/index.sepe.php');

@ -0,0 +1,16 @@
<?php
/* For license terms, see /license.txt */
/**
* This script is included by main/admin/settings.lib.php and generally
* includes things to execute in the main database (settings_current table)
* @package chamilo.plugin.sepe
*/
/**
* Initialization
*/
require_once dirname(__FILE__) . '/config.php';
if (!api_is_platform_admin()) {
die ('You must have admin permissions to install plugins');
}
SepePlugin::create()->install();

@ -0,0 +1,224 @@
/* For licensing terms, see /license.txt */
/**
* JS library for the Chamilo sepe plugin
* @package chamilo.plugin.sepe
*/
$(document).ready(function () {
$("#borrar_datos_identificativos").click(function (e) {
e.preventDefault();
e.stopPropagation();
if(confirm("Confirme si desea borrar todos los datos identificativos del centro y las acciones formativas creadas")){
$.post("function.php", {tab: "borra_datos_centro"},
function (data) {
if (data.status == "false") {
alert(data.content);
} else {
alert(data.content);
location.reload();
}
}, "json");
}
});
$("#borrar_accion_formativa").click(function (e) {
e.preventDefault();
e.stopPropagation();
vcod = $("#cod_action").val();
if(confirm("Confirme si desea borrar la acción formativa y todos los datos almacenados.")){
$.post("function.php", {tab: "borra_accion_formativa", cod:vcod},
function (data) {
if (data.status == "false") {
alert(data.content);
} else {
window.location.replace("listado-acciones-formativas.php");
//location.reload();
}
}, "json");
}
});
$(".del_specialty").click(function(e){
e.preventDefault();
e.stopPropagation();
vcod = $(this).prop("id");
if(confirm("Confirme si desea borrar la especialidad de la acción formativa y todos los datos de centros almacenados.")){
$.post("function.php", {tab: "borra_especialidad_accion", cod:vcod},
function (data) {
if (data.status == "false") {
alert(data.content);
} else {
alert(data.content);
location.reload();
}
}, "json");
}
});
$(".del_classroom").click(function(e){
e.preventDefault();
e.stopPropagation();
vcod = $(this).prop("id");
if(confirm("Confirme si desea borrar el centro presencial de la especialidad de la acción formativa.")){
$.post("function.php", {tab: "borra_especialidad_classroom", cod:vcod},
function (data) {
if (data.status == "false") {
alert(data.content);
} else {
alert(data.content);
location.reload();
}
}, "json");
}
});
$(".del_tutor").click(function(e){
e.preventDefault();
e.stopPropagation();
vcod = $(this).prop("id");
if(confirm("Confirme si desea borrar los datos del tutor de la especialidad de la acción formativa.")){
$.post("function.php", {tab: "borra_especialidad_tutor", cod:vcod},
function (data) {
if (data.status == "false") {
alert(data.content);
} else {
alert(data.content);
location.reload();
}
}, "json");
}
});
$(".del_participant").click(function(e){
e.preventDefault();
e.stopPropagation();
vcod = $(this).prop("id");
if(confirm("Confirme si desea borrar el participante de la acción formativa y todos los datos almacenados.")){
$.post("function.php", {tab: "borra_participante_accion", cod:vcod},
function (data) {
if (data.status == "false") {
alert(data.content);
} else {
alert(data.content);
location.reload();
}
}, "json");
}
});
$(".del_specialty_participant").click(function(e){
e.preventDefault();
e.stopPropagation();
vcod = $(this).prop("id");
if(confirm("Confirme si desea borrar la especialidad del participante.")){
$.post("function.php", {tab: "borra_especialidad_participante", cod:vcod},
function (data) {
if (data.status == "false") {
alert(data.content);
} else {
alert(data.content);
location.reload();
}
}, "json");
}
});
$(".asignar_action_formativa").click(function(e){
e.preventDefault();
e.stopPropagation();
vcourse = $(this).prop("id");
vaction = $(this).parent().prev().children().val();
if(vaction != ''){
$.post("function.php", {tab: "asignar_accion", cod_course:vcourse, cod_action:vaction},
function (data) {
if (data.status == "false") {
alert(data.content);
} else {
location.reload();
}
}, "json");
}else{
alert("Seleccione una accion formativa del desplegable");
}
});
$(".desvincular_accion").click(function(e){
e.preventDefault();
e.stopPropagation();
vcod = $(this).prop("id");
$.post("function.php", {tab: "desvincular_action", cod:vcod},
function (data) {
if (data.status == "false") {
alert(data.content);
} else {
location.reload();
}
}, "json");
});
$(".del_action_formativa").click(function(e){
e.preventDefault();
e.stopPropagation();
vcod = $(this).prop("id").substr(3);
if(confirm("Confirme si desea borrar la acci\u00F3n formativa y desvincular del curso actual")){
$.post("function.php", {tab: "borra_accion_formativa", cod:vcod},
function (data) {
if (data.status == "false") {
alert(data.content);
} else {
location.reload();
}
}, "json");
}
});
$("#slt_user_existente").change(function(){
if($(this).val() == "NO"){
$("#box_datos_tutor").show();
$("#box_listado_tutores").hide();
}else{
$("#box_listado_tutores").show();
$("#box_datos_tutor").hide();
}
});
$(".info_tutor").click(function(e){
e.preventDefault();
e.stopPropagation();
$(this).parent().parent().next().toggle("slow");
});
$("#slt_centro_existente").change(function(){
if($(this).val() == "NO"){
$("#box_datos_centro").show();
$("#box_listado_centros").hide();
}else{
$("#box_listado_centros").show();
$("#box_datos_centro").hide();
}
});
$('form[name="form_participant_action"] input[type="submit"]').click(function(e){
e.preventDefault();
e.stopPropagation();
if($('#cod_user_chamilo').val() == ''){
alert("Debe indicar un usuario de chamilo del curso con el que corresponda");
}else{
$('form[name="form_participant_action"]').submit();
}
});
$("#generar_key_sepe").click(function(e){
e.preventDefault();
e.stopPropagation();
$.post("function.php", {tab: "generar_api_key_sepe"},
function (data) {
if (data.status == "false") {
alert(data.content);
} else {
$("#input_key").val(data.content);
}
}, "json");
});
});

@ -0,0 +1,43 @@
<?php
//Needed in order to show the plugin title
$strings['plugin_title'] = "Manager SEPE";
$strings['plugin_comment'] = "Informes de seguimiento para las certificaciones.";
$strings['datos_centro'] = "Datos identificativos del centro";
$strings['editar_datos_centro'] = "Formulario datos identificativos del centro";
$strings['formulario_acciones_formativas'] = "Formulario acciones formativas";
$strings['listado_acciones_formativas'] = "Listado acciones formativas";
$strings['accion_formativa'] = "Datos acción formativa";
$strings['editar_accion_formativa'] = "Formulario acción formativa";
$strings['new_accion_formativa'] = "Formulario crear acción formativa";
$strings['new_specialty_accion'] = "Formulario crear especialidad acción formativa";
$strings['edit_specialty_accion'] = "Formulario especialidad acción formativa";
$strings['new_participant_accion'] = "Formulario crear participante acción formativa";
$strings['edit_participant_accion'] = "Formulario participante acción formativa";
$strings['informes'] = "Informes";
$strings['configuracion_sepe'] = "Configuración";
$strings['informe_plataforma'] = "Informe plataforma";
$strings['sepe_enable'] = "Habilitar SEPE";
$strings['sepe_url'] = "URL SEPE";
$strings['ProblemToDeleteInfoCenter'] = 'Problema para eliminar los datos identificativos del centro.';
$strings['ProblemToDeleteInfoAction'] = 'Problema para eliminar los datos de la acción formativa.';
$strings['ProblemToDesvincularInfoAction'] = 'Problema para desvincular los datos de la acción formativa.';
$strings['ProblemToDeleteInfoSpecialty'] = 'Problema para eliminar los datos de la especialidad de la acción formativa.';
$strings['ProblemToDeleteInfoParticipant'] = 'Problema para eliminar los datos del participante de la acción formativa.';
$strings['ProblemToDeleteInfoSpecialtyClassroom'] = 'Problema para eliminar los datos del centro presencial de la especialidad de la acción formativa.';
$strings['ProblemToDeleteInfoSpecialtyTutor'] = 'Problema para eliminar los datos del tutor de la especialidad de la acción formativa.';
$strings['DeleteOk'] = 'Borrado con éxito';
$strings['especialidad_accion_formativa'] = "Especialidad de la acción formativa";
$strings['participante_accion_formativa'] = "Participante de la acción formativa";
$strings['participante_especialidad_formativa'] = "Especialidad participante";
$strings['new_specialty_classroom'] = "Formulario crear centro presencial";
$strings['edit_specialty_classroom'] = "Formulario centro presencial";
$strings['new_specialty_tutor'] = "Formulario crear tutor-formador";
$strings['edit_specialty_tutor'] = "Formulario tutor-formador";
$strings['new_specialty_participant'] = "Formulario crear especialidad del participante";
$strings['edit_specialty_participant'] = "Formulario especialidad del participante";
$strings['new_tutorial'] = "Formulario crear tutoria presencial";
$strings['edit_tutorial'] = "Formulario tutoria presencial";
$strings['Inicio'] = "Inicio";
$strings['menu_sepe_administracion'] = 'Menu SEPE Administración';
$strings['menu_sepe'] = 'Menu SEPE';

@ -0,0 +1,45 @@
<?php
//Needed in order to show the plugin title
$strings['plugin_title'] = "Gestión SEPE";
$strings['plugin_comment'] = "Configuración de las acciones formativas del SEPE.";
$strings['datos_centro'] = "Datos identificativos del centro";
$strings['editar_datos_centro'] = "Formulario datos identificativos del centro";
$strings['formulario_acciones_formativas'] = "Formulario acciones formativas";
$strings['listado_acciones_formativas'] = "Listado acciones formativas";
$strings['accion_formativa'] = "Datos acción formativa";
$strings['editar_accion_formativa'] = "Formulario acción formativa";
$strings['new_accion_formativa'] = "Formulario crear acción formativa";
$strings['new_specialty_accion'] = "Formulario crear especialidad acción formativa";
$strings['edit_specialty_accion'] = "Formulario especialidad acción formativa";
$strings['new_participant_accion'] = "Formulario crear participante acción formativa";
$strings['edit_participant_accion'] = "Formulario participante acción formativa";
$strings['informes'] = "Informes";
$strings['configuracion_sepe'] = "Configuración";
$strings['informe_plataforma'] = "Informe plataforma";
$strings['sepe_enable'] = "Habilitar SEPE";
$strings['sepe_url'] = "URL SEPE";
$strings['ProblemToDeleteInfoCenter'] = 'Problema para eliminar los datos identificativos del centro.';
$strings['ProblemToDeleteInfoAction'] = 'Problema para eliminar los datos de la acción formativa.';
$strings['ProblemToDesvincularInfoAction'] = 'Problema para desvincular los datos de la acción formativa.';
$strings['ProblemToDeleteInfoSpecialty'] = 'Problema para eliminar los datos de la especialidad de la acción formativa.';
$strings['ProblemToDeleteInfoParticipant'] = 'Problema para eliminar los datos del participante de la acción formativa.';
$strings['ProblemToDeleteInfoSpecialtyClassroom'] = 'Problema para eliminar los datos del centro presencial de la especialidad de la acción formativa.';
$strings['ProblemToDeleteInfoSpecialtyTutor'] = 'Problema para eliminar los datos del tutor de la especialidad de la acción formativa.';
$strings['DeleteOk'] = 'Borrado con éxito';
$strings['ProblemDataBase'] = 'Problema con la base de datos';
$strings['ModDataTeacher'] = 'Información: Se va a modificar los datos identificativos del profesor de Chamilo';
$strings['especialidad_accion_formativa'] = "Especialidad de la acción formativa";
$strings['participante_accion_formativa'] = "Participante de la acción formativa";
$strings['participante_especialidad_formativa'] = "Especialidad participante";
$strings['new_specialty_classroom'] = "Formulario crear centro presencial";
$strings['edit_specialty_classroom'] = "Formulario centro presencial";
$strings['new_specialty_tutor'] = "Formulario crear tutor-formador";
$strings['edit_specialty_tutor'] = "Formulario tutor-formador";
$strings['new_specialty_participant'] = "Formulario crear especialidad del participante";
$strings['edit_specialty_participant'] = "Formulario especialidad del participante";
$strings['new_tutorial'] = "Formulario crear tutoria presencial";
$strings['edit_tutorial'] = "Formulario tutoria presencial";
$strings['Inicio'] = "Inicio";
$strings['menu_sepe_administracion'] = 'Menu SEPE Administración';
$strings['menu_sepe'] = 'Menú SEPE';

@ -0,0 +1,13 @@
<?php
/* For license terms, see /license.txt */
/**
* This script is a configuration file for the date plugin. You can use it as a master for other platform plugins (course plugins are slightly different).
* These settings will be used in the administration interface for plugins (Chamilo configuration settings->Plugins)
* @package chamilo.plugin.sepe
*/
/**
* Plugin details (must be present)
*/
require_once dirname(__FILE__) . '/config.php';
$plugin_info = SepePlugin::create()->get_info();

@ -0,0 +1,24 @@
Plugin que conecta el SEPE con la plataforma de formación Chamilo.<br>
<br>
<b>Integra:</b><br>
- Conexiones SOAP<br>
- Formularios para editar datos<br>
<br>
<b>Instrucciones:</b><br>
- Instalar plugin
- En configuración del plugin: Habilitar Sepe -> SI -> Guardar <br>
- Seleccionar una región del plugin -> menu_administrator <br>
- Crear un usuario llamado SEPE con perfil de recursos humanos.<br>
- Ir al menú del plugin Sepe (en la sección de plugin activos en administración) y seleccionar el link de "Configuración" -> Generar API key. Usar esta clave para realizar pruebas con el SOAP.<br>
- En el fichero <em>/plugin/sepe/ws/ProveedorCentroTFWS.wsdl</em> modificar la linea 910 para indicar el dominio de la plataforma sustituyendo la cadena ##midominio## por el dominio que corresponda.<br>
<br>
<b>Composer:</b><br>
- Es necesario incluir (en el caso de que no estuviera añadido) en el fichero <i>composer.json</i> en el apartado de "require" bajo la linea <em>"zendframework/zend-config": "2.3.3",</em> insertar <em>"zendframework/zend-soap": "2.*",</em> <br>
- A continuación habrá que actualizar desde la linea de comandos el directorio vendor, usando la orden 'composer update'<br>
<br>
<b>Verificación del Webservices:</b><br>
- Para verificar que el webservice está activo, habrá que entrar desde un navegador web a la siguiente dirección:
<em>http://dominioquecorresponda/plugin/sepe/ws/service.php</em><br>
<br>
<div>Icons made by <a href="http://www.flaticon.com/authors/freepik" title="Freepik">Freepik</a> from <a href="http://www.flaticon.com" title="Flaticon">www.flaticon.com</a> is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0">CC BY 3.0</a></div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 538 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 711 B

@ -0,0 +1,127 @@
.cleared{
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
line-height:0;
}
.campo_texto{
color: #00829c;
font-size: 1.3em;
font-weight: normal;
padding-top: 2px;
}
.sepe_borrar_link {
background: url("icon-delete.png") no-repeat scroll 0px 10px;
padding-left: 30px;
font-size:1.3em;
}
.sepe_editar_link {
background: url("icon-edit.png") no-repeat scroll 0 10px;
padding-left: 30px;
font-size:1.3em;
}
.sepe_listado_link {
background: url("options-lines.png") no-repeat scroll 0 10px;
padding-left: 30px;
font-size:1.3em;
}
input.btn_menu_lateral{
width:100%;
margin-bottom:10px;
}
legend.subcampo {
font-size: 16px;
line-height: 16px;
padding-bottom: 10px;
padding-left: 0;
padding-right: 0;
padding-top: 0;
}
.well.subcampo {
background: none repeat scroll 0 0 #fafafa;
}
em.span4 {
float: none;
margin: 0;
padding: 5px;
display:inline-block;
}
em{
float: none;
margin: 5px 0 0 0;
padding: 5px;
display: block;
}
.mensaje_info{
padding:5px 10px;
}
.slt_fecha {
width:auto;
display:inline-block;
}
textarea.accion_formativa, input.accion_formativa {
margin-bottom: 5px;
width: 95%;
}
input.numerico {
text-align: center;
width: 60px;
}
.subcampo2 {
font-size: 16px;
text-align: center;
}
.mlateral{
margin: 0 5px;
}
#tabla_info_nif{
width:90%;
margin:5px auto;
}
#tabla_info_nif td, #tabla_info_nif th {
background: none repeat scroll 0 0 white;
border: 1px solid;
color: #333;
font-weight: bold;
text-align:center;
}
.va_middle, .table td.va_middle{
vertical-align:middle;
}
.box_centrado{
margin:0 auto;
}
.dinline{
display:inline;
}
.fright{
float:right;
}
.cursor{
cursor:pointer;
}
.ta-center{
text-align:center;
}
.mtop5{
margin-top:5px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

@ -0,0 +1,60 @@
<?php
/* For licensing terms, see /license.txt */
/**
* This script displays a form for registering new users.
* @package chamilo.auth
*/
use \ChamiloSession as Session;
require_once '../config.php';
/*
require_once dirname(__FILE__).'/sepe.lib.php';
require_once '../../../main/inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH) . 'plugin.class.php';
require_once '../lib/sepe_plugin.class.php';
require_once api_get_path(CONFIGURATION_PATH).'profile.conf.php';
*/
$course_plugin = 'sepe';
$plugin = SepePlugin::create();
$_cid = 0;
if (api_is_platform_admin()) {
$cod_action = obtener_cod_action($_GET['cid']);
$info = accion_formativa($cod_action);
if ($info === false) {
header("Location: listado-acciones-formativas.php");
}
$templateName = $plugin->get_lang('accion_formativa');
$interbreadcrumb[] = array("url" => "/plugin/sepe/src/menu_sepe_administracion.php", "name" => $plugin->get_lang('menu_sepe'));
$interbreadcrumb[] = array("url" => "listado-acciones-formativas.php", "name" => $plugin->get_lang('listado_acciones_formativas'));
$tpl = new Template($templateName);
if (isset($_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']);
unset($_SESSION['sepe_message_error']);
}
$tpl->assign('info', $info);
$tpl->assign('fecha_start', date("d/m/Y",strtotime($info['FECHA_INICIO'])));
$tpl->assign('fecha_end', date("d/m/Y",strtotime($info['FECHA_FIN'])));
$tpl->assign('cod_action', $cod_action);
$listSpecialty = listSpecialty($cod_action);
$tpl->assign('listSpecialty', $listSpecialty);
$listParticipant = listParticipant($cod_action);
$tpl->assign('listParticipant', $listParticipant);
$listing_tpl = 'sepe/view/accion_formativa.tpl';
$content = $tpl->fetch($listing_tpl);
$tpl->assign('content', $content);
$tpl->display_one_col_template();
} else {
header("location: http://".$_SERVER['SERVER_NAME']);
}

@ -0,0 +1,41 @@
<?php
/* For licensing terms, see /license.txt */
use \ChamiloSession as Session;
require_once '../config.php';
$course_plugin = 'sepe';
$plugin = SepePlugin::create();
$_cid = 0;
if (api_is_platform_admin()) {
$tUser = Database::get_main_table(TABLE_MAIN_USER);
$tApi = Database::get_main_table(TABLE_MAIN_USER_API_KEY);
$login = 'SEPE';
//$password = api_get_encrypted_password(trim(stripslashes($WSKey)));
$sql = "SELECT a.api_key AS api FROM $tUser u, $tApi a WHERE u.username='".$login."' and u.user_id = a.user_id AND a.api_service = 'dokeos';";
$result = Database::query($sql);
if (Database::num_rows($result) > 0)
{
$tmp = Database::fetch_assoc($result);
$info = $tmp['api'];
} else {
$info = '';
}
$templateName = $plugin->get_lang('configuracion_sepe');
$interbreadcrumb[] = array("url" => "/plugin/sepe/src/menu_sepe_administracion.php", "name" => $plugin->get_lang('menu_sepe'));
$tpl = new Template($templateName);
$tpl->assign('info', $info);
$listing_tpl = 'sepe/view/configuracion.tpl';
$content = $tpl->fetch($listing_tpl);
$tpl->assign('content', $content);
$tpl->display_one_col_template();
} else {
header("location: http://".$_SERVER['SERVER_NAME']);
}

@ -0,0 +1,37 @@
<?php
/* For licensing terms, see /license.txt */
use \ChamiloSession as Session;
require_once '../config.php';
$course_plugin = 'sepe';
$plugin = SepePlugin::create();
$_cid = 0;
if (api_is_platform_admin()) {
$info = datos_identificativos();
$templateName = $plugin->get_lang('datos_centro');
$interbreadcrumb[] = array("url" => "/plugin/sepe/src/menu_sepe_administracion.php", "name" => $plugin->get_lang('menu_sepe'));
$tpl = new Template($templateName);
if (isset($_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']);
unset($_SESSION['sepe_message_error']);
}
$tpl->assign('info', $info);
$listing_tpl = 'sepe/view/datos_identificativos.tpl';
$content = $tpl->fetch($listing_tpl);
$tpl->assign('content', $content);
$tpl->display_one_col_template();
} else {
header("location: http://".$_SERVER['SERVER_NAME']);
}

@ -0,0 +1,112 @@
<?php
/* For licensing terms, see /license.txt */
use \ChamiloSession as Session;
require_once '../config.php';
$course_plugin = 'sepe';
$plugin = SepePlugin::create();
$_cid = 0;
if ( ! empty($_POST))
{
reset ($_POST);
while (list ($param, $val) = each ($_POST)) {
$valor = Database::escape_string($_POST[$param]);
$asignacion = "\$" . $param . "='" . $valor . "';";
//echo $asignacion;
eval($asignacion);
}
$fecha_inicio = $year_start."-".$month_start."-".$day_start;
$fecha_fin = $year_end."-".$month_end."-".$day_end;
if (isset($cod_action) && trim($cod_action)!='' && $cod_action!="NO") {
$sql = "UPDATE plugin_sepe_actions SET ORIGEN_ACCION='".$ORIGEN_ACCION."', CODIGO_ACCION='".$CODIGO_ACCION."', SITUACION='".$SITUACION."', ORIGEN_ESPECIALIDAD='".$ORIGEN_ESPECIALIDAD."', AREA_PROFESIONAL='".$AREA_PROFESIONAL."', CODIGO_ESPECIALIDAD='".$CODIGO_ESPECIALIDAD."', DURACION='".$DURACION."', FECHA_INICIO='".$fecha_inicio."', FECHA_FIN='".$fecha_fin."', IND_ITINERARIO_COMPLETO='".$IND_ITINERARIO_COMPLETO."', TIPO_FINANCIACION='".$TIPO_FINANCIACION."', NUMERO_ASISTENTES='".$NUMERO_ASISTENTES."', DENOMINACION_ACCION='".$DENOMINACION_ACCION."', INFORMACION_GENERAL='".$INFORMACION_GENERAL."', HORARIOS='".$HORARIOS."', REQUISITOS='".$REQUISITOS."', CONTACTO_ACCION='".$CONTACTO_ACCION."' WHERE cod='".$cod_action."';";
} else {
$sql = "INSERT INTO plugin_sepe_actions (ORIGEN_ACCION, CODIGO_ACCION, SITUACION, ORIGEN_ESPECIALIDAD, AREA_PROFESIONAL, CODIGO_ESPECIALIDAD, DURACION, FECHA_INICIO, FECHA_FIN, IND_ITINERARIO_COMPLETO, TIPO_FINANCIACION, NUMERO_ASISTENTES, DENOMINACION_ACCION, INFORMACION_GENERAL, HORARIOS, REQUISITOS, CONTACTO_ACCION) VALUES ('".$ORIGEN_ACCION."','".$CODIGO_ACCION."','".$SITUACION."','".$ORIGEN_ESPECIALIDAD."','".$AREA_PROFESIONAL."','".$CODIGO_ESPECIALIDAD."','".$DURACION."','".$fecha_inicio."','".$fecha_fin."','".$IND_ITINERARIO_COMPLETO."','".$TIPO_FINANCIACION."','".$NUMERO_ASISTENTES."','".$DENOMINACION_ACCION."','".$INFORMACION_GENERAL."','".$HORARIOS."','".$REQUISITOS."','".$CONTACTO_ACCION."');";
}
$res = Database::query($sql);
if (!$res) {
echo Database::error();
$_SESSION['sepe_message_error'] = "No se ha guardado los cambios";
} else {
$_SESSION['sepe_message_info'] = "Se ha guardado los cambios";
if ($cod_action=="NO") {
//Sincronizar acción formativa y curso
$cod_action = Database::insert_id();
$tableSepeCourse = "plugin_sepe_course_actions";
$sql = "SELECT 1 FROM course WHERE id='".$id_course."';";
$rs = Database::query($sql);
if (Database::num_rows($rs) == 0) {
$sepe_message_error .= "[editar-accion-formativa.php] - El curso al que se le asocia la accion formativa no existe";
error_log($sepe_message_error);
} else {
$sql = "INSERT INTO $tableSepeCourse (id_course, cod_action) VALUES ('".$id_course."','".$cod_action."');";
//echo $sql;
$rs = Database::query($sql);
if (!$rs) {
$sepe_message_error .= "[editar-accion-formativa.php] - No se ha podido guardar la seleccion";
error_log($sepe_message_error);
}
}
}
}
$id_course = obtener_course($cod_action);
header("Location: accion-formativa.php?cid=".$id_course);
}
if (api_is_platform_admin()) {
if (isset($_GET['new_action']) && $_GET['new_action']=="SI") {
$info = array();
$templateName = $plugin->get_lang('new_accion_formativa');
$interbreadcrumb[] = array("url" => "/plugin/sepe/src/menu_sepe_administracion.php", "name" => $plugin->get_lang('menu_sepe'));
$interbreadcrumb[] = array("url" => "listado-acciones-formativas.php", "name" => $plugin->get_lang('listado_acciones_formativas'));
$tpl = new Template($templateName);
$inicio_anio = $fin_anio = date("Y");
$tpl->assign('info', $info);
$tpl->assign('new_action', 'SI');
$tpl->assign('id_course', $_GET['cid']);
} else {
$id_course = obtener_course($_GET['cod_action']);
$interbreadcrumb[] = array("url" => "/plugin/sepe/src/menu_sepe_administracion.php", "name" => $plugin->get_lang('menu_sepe'));
$interbreadcrumb[] = array("url" => "listado-acciones-formativas.php", "name" => $plugin->get_lang('listado_acciones_formativas'));
$interbreadcrumb[] = array("url" => "accion-formativa.php?cid=".$id_course, "name" => $plugin->get_lang('accion_formativa'));
$info = accion_formativa($_GET['cod_action']);
$templateName = $plugin->get_lang('editar_accion_formativa');
$tpl = new Template($templateName);
$tpl->assign('info', $info);
$tpl->assign('day_start', date("j",strtotime($info['FECHA_INICIO'])));
$tpl->assign('month_start', date("n",strtotime($info['FECHA_INICIO'])));
$tpl->assign('year_start', date("Y",strtotime($info['FECHA_INICIO'])));
$tpl->assign('day_end', date("j",strtotime($info['FECHA_FIN'])));
$tpl->assign('month_end', date("n",strtotime($info['FECHA_FIN'])));
$tpl->assign('year_end', date("Y",strtotime($info['FECHA_FIN'])));
$tpl->assign('new_action', 'NO');
$inicio_anio = date("Y",strtotime($info['FECHA_INICIO']));
$fin_anio = date("Y",strtotime($info['FECHA_FIN']));
}
$lista_anio = array();
if ($inicio_anio > $fin_anio) {
$tmp = $inicio_anio;
$inicio_anio = $fin_anio;
$fin_anio = $tmp;
}
$inicio_anio -= 5;
$fin_anio += 5;
$fin_rango_anio = (($inicio_anio + 15) < $fin_anio) ? ($fin_anio+1):($inicio_anio +15);
while ($inicio_anio <= $fin_rango_anio) {
$lista_anio[] = $inicio_anio;
$inicio_anio++;
}
$tpl->assign('list_year', $lista_anio);
$listing_tpl = 'sepe/view/editar_accion_formativa.tpl';
$content = $tpl->fetch($listing_tpl);
$tpl->assign('content', $content);
$tpl->display_one_col_template();
} else {
header("location: http://".$_SERVER['SERVER_NAME']);
}

@ -0,0 +1,67 @@
<?php
use \ChamiloSession as Session;
require_once '../config.php';
$course_plugin = 'sepe';
$plugin = SepePlugin::create();
$_cid = 0;
if ( !empty($_POST))
{
$origen_centro = Database::escape_string($_POST['origen_centro']);
$codigo_centro = Database::escape_string($_POST['codigo_centro']);
$nombre_centro = Database::escape_string($_POST['nombre_centro']);
$url = Database::escape_string($_POST['url']);
$url_seguimiento = Database::escape_string($_POST['url_seguimiento']);
$telefono = Database::escape_string($_POST['telefono']);
$email = Database::escape_string($_POST['email']);
$cod = Database::escape_string($_POST['cod']);
if (existeDatosIdentificativos()) {
$sql = "UPDATE plugin_sepe_center
SET origen_centro='".$origen_centro."',
codigo_centro='".$codigo_centro."',
nombre_centro='".$nombre_centro."',
url='".$url."',
url_seguimiento='".$url_seguimiento."',
telefono='".$telefono."',
email='".$email."'
WHERE cod='".$cod."'";
} else {
$sql = "INSERT INTO plugin_sepe_center
(cod, origen_centro, codigo_centro, nombre_centro, url , url_seguimiento, telefono, email)
VALUES
('1','".$origen_centro."','".$codigo_centro."','".$nombre_centro."','".$url."','".$url_seguimiento."','".$telefono."','".$email."');";
}
$res = Database::query($sql);
if (!$res) {
$_SESSION['sepe_message_error'] = "No se ha guardado los cambios";
} else {
$_SESSION['sepe_message_info'] = "Se ha guardado los cambios";
}
header("Location: datos-identificativos.php");
}
if (api_is_platform_admin()) {
$interbreadcrumb[] = array("url" => "/plugin/sepe/src/menu_sepe_administracion.php", "name" => $plugin->get_lang('menu_sepe'));
$interbreadcrumb[] = array("url" => "datos-identificativos.php", "name" => $plugin->get_lang('datos_centro'));
$info = datos_identificativos();
$templateName = $plugin->get_lang('editar_datos_centro');
$tpl = new Template($templateName);
$tpl->assign('info', $info);
$listing_tpl = 'sepe/view/editar_datos_identificativos.tpl';
$content = $tpl->fetch($listing_tpl);
$tpl->assign('content', $content);
$tpl->display_one_col_template();
} else {
header("location: http://".$_SERVER['SERVER_NAME']);
}

@ -0,0 +1,145 @@
<?php
/* For licensing terms, see /license.txt */
use \ChamiloSession as Session;
require_once '../config.php';
$course_plugin = 'sepe';
$plugin = SepePlugin::create();
$_cid = 0;
if ( ! empty($_POST))
{
reset ($_POST);
while (list ($param, $val) = each ($_POST)) {
$valor = Database::escape_string($_POST[$param]);
$asignacion = "\$" . $param . "='" . $valor . "';";
//echo $asignacion;
eval($asignacion);
}
$fecha_inicio = $year_start."-".$month_start."-".$day_start;
$fecha_fin = $year_end."-".$month_end."-".$day_end;
if (isset($new_specialty) && $new_specialty!="SI") {
$sql = "UPDATE plugin_sepe_specialty SET
ORIGEN_ESPECIALIDAD='".$ORIGEN_ESPECIALIDAD."',
AREA_PROFESIONAL='".$AREA_PROFESIONAL."',
CODIGO_ESPECIALIDAD='".$CODIGO_ESPECIALIDAD."',
ORIGEN_CENTRO='".$ORIGEN_CENTRO."',
CODIGO_CENTRO='".$CODIGO_CENTRO."',
FECHA_INICIO='".$fecha_inicio."',
FECHA_FIN='".$fecha_fin."',
MODALIDAD_IMPARTICION='".$MODALIDAD_IMPARTICION."',
HORAS_PRESENCIAL='".$HORAS_PRESENCIAL."',
HORAS_TELEFORMACION='".$HORAS_TELEFORMACION."',
HM_NUM_PARTICIPANTES='".$HM_NUM_PARTICIPANTES."',
HM_NUMERO_ACCESOS='".$HM_NUMERO_ACCESOS."',
HM_DURACION_TOTAL='".$HM_DURACION_TOTAL."',
HT_NUM_PARTICIPANTES='".$HT_NUM_PARTICIPANTES."',
HT_NUMERO_ACCESOS='".$HT_NUMERO_ACCESOS."',
HT_DURACION_TOTAL='".$HT_DURACION_TOTAL."',
HN_NUM_PARTICIPANTES='".$HN_NUM_PARTICIPANTES."',
HN_NUMERO_ACCESOS='".$HN_NUMERO_ACCESOS."',
HN_DURACION_TOTAL='".$HN_DURACION_TOTAL."',
NUM_PARTICIPANTES='".$NUM_PARTICIPANTES."',
NUMERO_ACTIVIDADES_APRENDIZAJE='".$NUMERO_ACTIVIDADES_APRENDIZAJE."',
NUMERO_INTENTOS='".$NUMERO_INTENTOS."',
NUMERO_ACTIVIDADES_EVALUACION='".$NUMERO_ACTIVIDADES_EVALUACION."'
WHERE cod='".$cod_specialty."';";
} else {
$sql = "INSERT INTO plugin_sepe_specialty (cod_action,ORIGEN_ESPECIALIDAD,AREA_PROFESIONAL,CODIGO_ESPECIALIDAD,ORIGEN_CENTRO,CODIGO_CENTRO,FECHA_INICIO,FECHA_FIN,MODALIDAD_IMPARTICION,HORAS_PRESENCIAL,HORAS_TELEFORMACION,HM_NUM_PARTICIPANTES,HM_NUMERO_ACCESOS,HM_DURACION_TOTAL,HT_NUM_PARTICIPANTES,HT_NUMERO_ACCESOS,HT_DURACION_TOTAL,HN_NUM_PARTICIPANTES,HN_NUMERO_ACCESOS,HN_DURACION_TOTAL,NUM_PARTICIPANTES,NUMERO_ACTIVIDADES_APRENDIZAJE,NUMERO_INTENTOS,NUMERO_ACTIVIDADES_EVALUACION) VALUES ('".$cod_action."','".$ORIGEN_ESPECIALIDAD."','".$AREA_PROFESIONAL."','".$CODIGO_ESPECIALIDAD."','".$ORIGEN_CENTRO."','".$CODIGO_CENTRO."','".$fecha_inicio."','".$fecha_fin."','".$MODALIDAD_IMPARTICION."','".$HORAS_PRESENCIAL."','".$HORAS_TELEFORMACION."','".$HM_NUM_PARTICIPANTES."','".$HM_NUMERO_ACCESOS."','".$HM_DURACION_TOTAL."','".$HT_NUM_PARTICIPANTES."','".$HT_NUMERO_ACCESOS."','".$HT_DURACION_TOTAL."','".$HN_NUM_PARTICIPANTES."','".$HN_NUMERO_ACCESOS."','".$HN_DURACION_TOTAL."','".$NUM_PARTICIPANTES."','".$NUMERO_ACTIVIDADES_APRENDIZAJE."','".$NUMERO_INTENTOS."','".$NUMERO_ACTIVIDADES_EVALUACION."');";
}
$res = Database::query($sql);
if (!$res) {
echo Database::error();
$_SESSION['sepe_message_error'] = "No se ha guardado los cambios";
} else {
$_SESSION['sepe_message_info'] = "Se ha guardado los cambios";
if ($new_specialty=="SI") {
$cod_specialty = Database::insert_id();
}
}
session_write_close();
$id_course = obtener_course($cod_action);
header("Location: editar-especialidad-accion.php?new_specialty=NO&cod_specialty=".$cod_specialty."&cod_action=".$cod_action);
}
if (api_is_platform_admin()) {
$id_course = obtener_course($_GET['cod_action']);
$interbreadcrumb[] = array("url" => "/plugin/sepe/src/menu_sepe_administracion.php", "name" => $plugin->get_lang('menu_sepe'));
$interbreadcrumb[] = array("url" => "listado-acciones-formativas.php", "name" => $plugin->get_lang('listado_acciones_formativas'));
$interbreadcrumb[] = array("url" => "accion-formativa.php?cid=".$id_course, "name" => $plugin->get_lang('accion_formativa'));
if (isset($_GET['new_specialty']) && $_GET['new_specialty']=="SI") {
$templateName = $plugin->get_lang('new_specialty_accion');
$tpl = new Template($templateName);
$tpl->assign('cod_action', $_GET['cod_action']);
$info = array();
$tpl->assign('info', $info);
$tpl->assign('new_action', 'SI');
$inicio_anio = $fin_anio = date("Y");
} else {
$templateName = $plugin->get_lang('edit_specialty_accion');
$tpl = new Template($templateName);
$tpl->assign('cod_action', $_GET['cod_action']);
$info = especialidad_accion($_GET['cod_specialty']);
$tpl->assign('info', $info);
if ($info['FECHA_INICIO']!='0000-00-00' && $info['FECHA_INICIO']!=NULL) {
$tpl->assign('day_start', date("j",strtotime($info['FECHA_INICIO'])));
$tpl->assign('month_start', date("n",strtotime($info['FECHA_INICIO'])));
$tpl->assign('year_start', date("Y",strtotime($info['FECHA_INICIO'])));
$inicio_anio = date("Y",strtotime($info['FECHA_INICIO']));
} else {
$inicio_anio = date("Y");
}
if ($info['FECHA_FIN']!='0000-00-00' && $info['FECHA_FIN']!=NULL) {
$tpl->assign('day_end', date("j",strtotime($info['FECHA_FIN'])));
$tpl->assign('month_end', date("n",strtotime($info['FECHA_FIN'])));
$tpl->assign('year_end', date("Y",strtotime($info['FECHA_FIN'])));
$fin_anio = date("Y",strtotime($info['FECHA_FIN']));
} else {
$fin_anio = date("Y");
}
$tpl->assign('new_action', 'NO');
$tpl->assign('cod_specialty', $_GET['cod_specialty']);
$listClassroom = listClassroom($_GET['cod_specialty']);
$tpl->assign('listClassroom', $listClassroom);
$listTutors = listTutors($_GET['cod_specialty']);
$tpl->assign('listTutors', $listTutors);
}
$lista_anio = array();
if ($inicio_anio > $fin_anio) {
$tmp = $inicio_anio;
$inicio_anio = $fin_anio;
$fin_anio = $tmp;
}
$inicio_anio -= 5;
$fin_anio += 5;
$fin_rango_anio = (($inicio_anio + 15) < $fin_anio) ? ($fin_anio+1):($inicio_anio +15);
while ($inicio_anio <= $fin_rango_anio) {
$lista_anio[] = $inicio_anio;
$inicio_anio++;
}
$tpl->assign('list_year', $lista_anio);
if (isset($_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']);
unset($_SESSION['sepe_message_error']);
}
$listing_tpl = 'sepe/view/editar_especialidad_accion.tpl';
$content = $tpl->fetch($listing_tpl);
$tpl->assign('content', $content);
$tpl->display_one_col_template();
} else {
header("location: http://".$_SERVER['SERVER_NAME']);
}

@ -0,0 +1,123 @@
<?php
/* For licensing terms, see /license.txt */
use \ChamiloSession as Session;
require_once '../config.php';
$course_plugin = 'sepe';
$plugin = SepePlugin::create();
$_cid = 0;
if ( ! empty($_POST))
{
reset ($_POST);
while (list ($param, $val) = each ($_POST)) {
$valor = Database::escape_string($_POST[$param]);
$asignacion = "\$" . $param . "='" . $valor . "';";
//echo $asignacion;
eval($asignacion);
}
if ($slt_centro_existente == "SI") {
$sql = "INSERT INTO plugin_sepe_specialty_classroom (cod_specialty, cod_centro)
VALUES ('".$cod_specialty."','".$centro_existente."');";
$res = Database::query($sql);
if (!$res) {
echo Database::error();
$_SESSION['sepe_message_error'] = "No se ha guardado los cambios";
} else {
$_SESSION['sepe_message_info'] = "Se ha guardado los cambios";
if ($new_classroom=="SI") {
$cod_classroom = Database::insert_id();
}
}
} else {
//Comprobamos si existen en los centros existentes
$sql = "SELECT * FROM plugin_sepe_centros
WHERE ORIGEN_CENTRO='".$ORIGEN_CENTRO."' AND CODIGO_CENTRO='".$CODIGO_CENTRO."'";
$rs_tmp = Database::query($sql);
if (Database::num_rows($rs_tmp)>0) {
$aux = Database::fetch_assoc($rs_tmp);
$cod_centro = $aux['cod'];
} else {
$params = array(
'ORIGEN_CENTRO' => $ORIGEN_CENTRO,
'CODIGO_CENTRO' => $CODIGO_CENTRO,
);
$cod_centro = Database::insert('plugin_sepe_centros', $params);
}
if (isset($new_classroom) && $new_classroom!="SI") {
$sql = "UPDATE plugin_sepe_specialty_classroom SET cod_centro='".$cod_centro."' WHERE cod='".$cod_classroom."';";
} else {
$sql = "INSERT INTO plugin_sepe_specialty_classroom (cod_specialty, cod_centro) VALUES ('".$cod_specialty."','".$cod_centro."');";
}
//echo $sql;
//exit;
$res = Database::query($sql);
if (!$res) {
echo Database::error();
$_SESSION['sepe_message_error'] = "No se ha guardado los cambios";
} else {
$_SESSION['sepe_message_info'] = "Se ha guardado los cambios";
if ($new_classroom=="SI") {
$cod_classroom = Database::insert_id();
}
}
}
session_write_close();
$id_course = obtener_course($cod_action);
header("Location: editar-especialidad-accion.php?new_specialty=NO&cod_specialty=".$cod_specialty."&cod_action=".$cod_action);
}
if (api_is_platform_admin()) {
$id_course = obtener_course($_GET['cod_action']);
$interbreadcrumb[] = array("url" => "/plugin/sepe/src/menu_sepe_administracion.php", "name" => $plugin->get_lang('menu_sepe'));
$interbreadcrumb[] = array("url" => "listado-acciones-formativas.php", "name" => $plugin->get_lang('listado_acciones_formativas'));
$interbreadcrumb[] = array("url" => "accion-formativa.php?cid=".$id_course, "name" => $plugin->get_lang('accion_formativa'));
$interbreadcrumb[] = array("url" => "editar-especialidad-accion.php?new_specialty=NO&cod_specialty=".$_GET['cod_specialty']."&cod_action=".$_GET['cod_action'], "name" => $plugin->get_lang('especialidad_accion_formativa'));
if (isset($_GET['new_classroom']) && $_GET['new_classroom']=="SI") {
$templateName = $plugin->get_lang('new_specialty_classroom');
$tpl = new Template($templateName);
$tpl->assign('cod_action', $_GET['cod_action']);
$tpl->assign('cod_specialty', $_GET['cod_specialty']);
$info = array();
$tpl->assign('info', $info);
$tpl->assign('new_classroom', 'SI');
} else {
$templateName = $plugin->get_lang('edit_specialty_classroom');
$tpl = new Template($templateName);
$tpl->assign('cod_action', $_GET['cod_action']);
$tpl->assign('cod_specialty', $_GET['cod_specialty']);
$tpl->assign('cod_classroom', $_GET['cod_classroom']);
$info = especialidad_classroom($_GET['cod_classroom']);
$tpl->assign('info', $info);
$tpl->assign('new_classroom', 'NO');
}
$listCentros = listado_centros();
$tpl->assign('listCentrosExistentes', $listCentros);
if (isset($_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']);
unset($_SESSION['sepe_message_error']);
}
$listing_tpl = 'sepe/view/editar_especialidad_classroom.tpl';
$content = $tpl->fetch($listing_tpl);
$tpl->assign('content', $content);
$tpl->display_one_col_template();
} else {
header("location: http://".$_SERVER['SERVER_NAME']);
}

@ -0,0 +1,170 @@
<?php
/* For licensing terms, see /license.txt */
use \ChamiloSession as Session;
require_once '../config.php';
$course_plugin = 'sepe';
$plugin = SepePlugin::create();
$_cid = 0;
if ( ! empty($_POST))
{
reset ($_POST);
while (list ($param, $val) = each ($_POST)) {
$valor = Database::escape_string($_POST[$param]);
$asignacion = "\$" . $param . "='" . $valor . "';";
//echo $asignacion;
eval($asignacion);
}
$fecha_alta = $year_alta."-".$month_alta."-".$day_alta;
$fecha_baja = $year_baja."-".$month_baja."-".$day_baja;
$fecha_inicio = $year_start."-".$month_start."-".$day_start;
$fecha_fin = $year_end."-".$month_end."-".$day_end;
if (isset($new_specialty) && $new_specialty!="SI") {
$sql = "UPDATE plugin_sepe_participants_specialty SET ORIGEN_ESPECIALIDAD='".$ORIGEN_ESPECIALIDAD."', AREA_PROFESIONAL='".$AREA_PROFESIONAL."', CODIGO_ESPECIALIDAD='".$CODIGO_ESPECIALIDAD."', FECHA_ALTA='".$fecha_alta."', FECHA_BAJA='".$fecha_baja."', ORIGEN_CENTRO='".$ORIGEN_CENTRO."', CODIGO_CENTRO='".$CODIGO_CENTRO."', FECHA_INICIO='".$fecha_inicio."', FECHA_FIN='".$fecha_fin."', RESULTADO_FINAL='".$RESULTADO_FINAL."', CALIFICACION_FINAL='".$CALIFICACION_FINAL."', PUNTUACION_FINAL='".$PUNTUACION_FINAL."' WHERE cod='".$cod_specialty."';";
} else {
$sql = "INSERT INTO plugin_sepe_participants_specialty (cod_participant,ORIGEN_ESPECIALIDAD,AREA_PROFESIONAL,CODIGO_ESPECIALIDAD,FECHA_ALTA,FECHA_BAJA,ORIGEN_CENTRO,CODIGO_CENTRO,FECHA_INICIO,FECHA_FIN,RESULTADO_FINAL,CALIFICACION_FINAL,PUNTUACION_FINAL) VALUES ('".$cod_participant."','".$ORIGEN_ESPECIALIDAD."','".$AREA_PROFESIONAL."','".$CODIGO_ESPECIALIDAD."','".$fecha_alta."','".$fecha_baja."','".$ORIGEN_CENTRO."','".$CODIGO_CENTRO."','".$fecha_inicio."','".$fecha_fin."','".$RESULTADO_FINAL."','".$CALIFICACION_FINAL."','".$PUNTUACION_FINAL."');";
}
//echo $sql;
//exit;
$res = Database::query($sql);
if (!$res) {
echo Database::error();
$_SESSION['sepe_message_error'] = "No se ha guardado los cambios";
} else {
$_SESSION['sepe_message_info'] = "Se ha guardado los cambios";
if ($new_specialty=="SI") {
$cod_specialty = Database::insert_id();
}
/*
if ($RESULTADO_FINAL=="1" || $RESULTADO_FINAL=="2") {
$sql = "INSERT INTO plugin_sepe_log_participant (cod_participant, cod_action, fecha_baja) VALUES ('".$cod_participant."','".$cod_action."','".date("Y-m-d")."');";
$res = Database::query($sql);
} else {
$sql = "INSERT INTO plugin_sepe_log_mod_participant (cod_participant, cod_action) VALUES ('".$cod_participant."','".$cod_action."');";
$res = Database::query($sql);
}
*/
}
session_write_close();
$id_course = obtener_course($cod_action);
header("Location: editar-especialidad-participante.php?new_specialty=NO&cod_specialty=".$cod_specialty."&cod_participant=".$cod_participant."&cod_action=".$cod_action);
}
if (api_is_platform_admin()) {
$id_course = obtener_course($_GET['cod_action']);
$interbreadcrumb[] = array("url" => "/plugin/sepe/src/menu_sepe_administracion.php", "name" => $plugin->get_lang('menu_sepe'));
$interbreadcrumb[] = array("url" => "listado-acciones-formativas.php", "name" => $plugin->get_lang('listado_acciones_formativas'));
$interbreadcrumb[] = array("url" => "accion-formativa.php?cid=".$id_course, "name" => $plugin->get_lang('accion_formativa'));
$interbreadcrumb[] = array("url" => "editar-participante-accion.php?new_participant=NO&cod_participant=".$_GET['cod_participant']."&cod_action=".$_GET['cod_action'], "name" => $plugin->get_lang('participante_accion_formativa'));
if (isset($_GET['new_specialty']) && $_GET['new_specialty']=="SI") {
$templateName = $plugin->get_lang('new_specialty_participant');
$tpl = new Template($templateName);
$tpl->assign('cod_action', $_GET['cod_action']);
$tpl->assign('cod_participant', $_GET['cod_participant']);
$info = array();
$tpl->assign('info', $info);
$tpl->assign('new_specialty', 'SI');
$inicio_anio = $fin_anio = date("Y");
$alta_anio = $baja_anio = date("Y");
} else {
$templateName = $plugin->get_lang('edit_specialty_participant');
$tpl = new Template($templateName);
$tpl->assign('cod_action', $_GET['cod_action']);
$tpl->assign('cod_specialty', $_GET['cod_specialty']);
$tpl->assign('cod_participant', $_GET['cod_participant']);
$info = especialidad_participante($_GET['cod_specialty']);
//error_log(print_r($info,true));
$tpl->assign('info', $info);
$tpl->assign('new_specialty', 'NO');
if ($info['FECHA_ALTA']!='0000-00-00' && $info['FECHA_ALTA']!=NULL) {
$tpl->assign('day_alta', date("j",strtotime($info['FECHA_ALTA'])));
$tpl->assign('month_alta', date("n",strtotime($info['FECHA_ALTA'])));
$tpl->assign('year_alta', date("Y",strtotime($info['FECHA_ALTA'])));
$alta_anio = date("Y",strtotime($info['FECHA_ALTA']));
} else {
$alta_anio = date("Y");
}
if ($info['FECHA_BAJA']!='0000-00-00' && $info['FECHA_BAJA']!=NULL) {
$tpl->assign('day_baja', date("j",strtotime($info['FECHA_BAJA'])));
$tpl->assign('month_baja', date("n",strtotime($info['FECHA_BAJA'])));
$tpl->assign('year_baja', date("Y",strtotime($info['FECHA_BAJA'])));
$baja_anio = date("Y",strtotime($info['FECHA_BAJA']));
} else {
$baja_anio = date("Y");
}
if ($info['FECHA_INICIO']!='0000-00-00' && $info['FECHA_INICIO']!=NULL) {
$tpl->assign('day_start', date("j",strtotime($info['FECHA_INICIO'])));
$tpl->assign('month_start', date("n",strtotime($info['FECHA_INICIO'])));
$tpl->assign('year_start', date("Y",strtotime($info['FECHA_INICIO'])));
$inicio_anio = date("Y",strtotime($info['FECHA_INICIO']));
} else {
$inicio_anio = date("Y");
}
if ($info['FECHA_FIN']!='0000-00-00' && $info['FECHA_FIN']!=NULL) {
$tpl->assign('day_end', date("j",strtotime($info['FECHA_FIN'])));
$tpl->assign('month_end', date("n",strtotime($info['FECHA_FIN'])));
$tpl->assign('year_end', date("Y",strtotime($info['FECHA_FIN'])));
$fin_anio = date("Y",strtotime($info['FECHA_FIN']));
} else {
$fin_anio = date("Y");
}
$listSpecialtyTutorials = listSpecialtyTutorial($_GET['cod_specialty']);
$tpl->assign('listSpecialtyTutorials', $listSpecialtyTutorials);
}
$lista_anio = array();
if ($alta_anio > $baja_anio) {
$tmp = $alta_anio;
$alta_anio = $baja_anio;
$baja_anio = $tmp;
}
$alta_anio -= 5;
$baja_anio += 5;
$fin_rango_anio = (($alta_anio + 15) < $baja_anio) ? ($baja_anio+1):($alta_anio + 15);
while ($alta_anio <= $fin_rango_anio) {
$lista_anio[] = $alta_anio;
$alta_anio++;
}
$tpl->assign('list_year', $lista_anio);
$lista_anio = array();
if ($inicio_anio > $fin_anio) {
$tmp = $inicio_anio;
$inicio_anio = $fin_anio;
$fin_anio = $tmp;
}
$inicio_anio -= 5;
$fin_anio += 5;
$fin_rango_anio = (($inicio_anio + 15) < $fin_anio) ? ($fin_anio+1):($inicio_anio +15);
while ($inicio_anio <= $fin_rango_anio) {
$lista_anio[] = $inicio_anio;
$inicio_anio++;
}
$tpl->assign('list_year_2', $lista_anio);
if (isset($_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']);
unset($_SESSION['sepe_message_error']);
}
$listing_tpl = 'sepe/view/editar_especialidad_participante.tpl';
$content = $tpl->fetch($listing_tpl);
$tpl->assign('content', $content);
$tpl->display_one_col_template();
} else {
header("location: http://".$_SERVER['SERVER_NAME']);
}

@ -0,0 +1,146 @@
<?php
/* For licensing terms, see /license.txt */
use \ChamiloSession as Session;
require_once '../config.php';
$course_plugin = 'sepe';
$plugin = SepePlugin::create();
$_cid = 0;
if ( ! empty($_POST))
{
reset ($_POST);
while (list ($param, $val) = each ($_POST)) {
$valor = Database::escape_string($_POST[$param]);
$asignacion = "\$" . $param . "='" . $valor . "';";
//echo $asignacion;
eval($asignacion);
}
if ($slt_user_existente == "SI") {
$sql = "SELECT * FROM plugin_sepe_tutors WHERE cod='".$tutor_existente."';";
$rs = Database::query($sql);
$tmp = Database::fetch_assoc($rs);
$sql = "INSERT INTO plugin_sepe_specialty_tutors (cod_specialty, cod_tutor,ACREDITACION_TUTOR,EXPERIENCIA_PROFESIONAL,COMPETENCIA_DOCENTE,EXPERIENCIA_MODALIDAD_TELEFORMACION,FORMACION_MODALIDAD_TELEFORMACION)
VALUES ('".$cod_specialty."','".$tutor_existente."','".$tmp['ACREDITACION_TUTOR']."','".$tmp['EXPERIENCIA_PROFESIONAL']."','".$tmp['COMPETENCIA_DOCENTE']."','".$tmp['EXPERIENCIA_MODALIDAD_TELEFORMACION']."','".$tmp['FORMACION_MODALIDAD_TELEFORMACION']."');";
$res = Database::query($sql);
} else {
$sql = "SELECT cod FROM plugin_sepe_tutors
WHERE TIPO_DOCUMENTO='".$TIPO_DOCUMENTO."' AND NUM_DOCUMENTO='".$NUM_DOCUMENTO."' AND LETRA_NIF='".$LETRA_NIF."';";
$rs = Database::query($sql);
if (Database::num_rows($rs)>0) {
//datos identificativos existen se actualizan
$aux = Database::fetch_assoc($rs);
$sql = "UPDATE plugin_sepe_tutors SET
cod_user_chamilo='".$cod_user_chamilo."',
ACREDITACION_TUTOR='".$ACREDITACION_TUTOR."',
EXPERIENCIA_PROFESIONAL='".$EXPERIENCIA_PROFESIONAL."',
COMPETENCIA_DOCENTE='".$COMPETENCIA_DOCENTE."',
EXPERIENCIA_MODALIDAD_TELEFORMACION='".$EXPERIENCIA_MODALIDAD_TELEFORMACION."',
FORMACION_MODALIDAD_TELEFORMACION='".$FORMACION_MODALIDAD_TELEFORMACION."'
WHERE cod='".$aux['cod']."';";
$res = Database::query($sql);
if (!$res) {
echo Database::error();
exit;
$_SESSION['sepe_message_error'] = "No se ha guardado los cambios";
}
$cod_tutor = $aux['cod'];
} else {
//datos identificativos no existen se crea un nuevo registro
Database::query('UPDATE plugin_sepe_tutors SET cod_user_chamilo="" WHERE cod_user_chamilo="'.$cod_user_chamilo.'"');
$sql = "INSERT INTO plugin_sepe_tutors (cod_user_chamilo,TIPO_DOCUMENTO,NUM_DOCUMENTO,LETRA_NIF,ACREDITACION_TUTOR,EXPERIENCIA_PROFESIONAL,COMPETENCIA_DOCENTE,EXPERIENCIA_MODALIDAD_TELEFORMACION,FORMACION_MODALIDAD_TELEFORMACION)
VALUES
('".$cod_user_chamilo."','".$TIPO_DOCUMENTO."','".$NUM_DOCUMENTO."','".$LETRA_NIF."','".$ACREDITACION_TUTOR."','".$EXPERIENCIA_PROFESIONAL."','".$COMPETENCIA_DOCENTE."','".$EXPERIENCIA_MODALIDAD_TELEFORMACION."','".$FORMACION_MODALIDAD_TELEFORMACION."');";
$res = Database::query($sql);
if (!$res) {
echo Database::error();
$_SESSION['sepe_message_error'] = "No se ha guardado los cambios";
}
$cod_tutor = Database::insert_id();
}
if (isset($new_tutor) && $new_tutor!="SI") {
$sql = "UPDATE plugin_sepe_specialty_tutors SET
cod_tutor='".$cod_tutor."',
ACREDITACION_TUTOR='".$ACREDITACION_TUTOR."',
EXPERIENCIA_PROFESIONAL='".$EXPERIENCIA_PROFESIONAL."',
COMPETENCIA_DOCENTE='".$COMPETENCIA_DOCENTE."',
EXPERIENCIA_MODALIDAD_TELEFORMACION='".$EXPERIENCIA_MODALIDAD_TELEFORMACION."',
FORMACION_MODALIDAD_TELEFORMACION='".$FORMACION_MODALIDAD_TELEFORMACION."'
WHERE cod='".$cod_s_tutor."';";
} else {
$sql = "INSERT INTO plugin_sepe_specialty_tutors (cod_specialty,cod_tutor,ACREDITACION_TUTOR,EXPERIENCIA_PROFESIONAL,COMPETENCIA_DOCENTE,EXPERIENCIA_MODALIDAD_TELEFORMACION,FORMACION_MODALIDAD_TELEFORMACION)
VALUES
('".$cod_specialty."','".$cod_tutor."','".$ACREDITACION_TUTOR."','".$EXPERIENCIA_PROFESIONAL."','".$COMPETENCIA_DOCENTE."','".$EXPERIENCIA_MODALIDAD_TELEFORMACION."','".$FORMACION_MODALIDAD_TELEFORMACION."');";
$res = Database::query($sql);
if (!$res) {
echo Database::error();
$_SESSION['sepe_message_error'] = "No se ha guardado los cambios";
} else {
$_SESSION['sepe_message_info'] = "Se ha guardado los cambios";
if ($new_tutor=="SI") {
$cod_tutor = Database::insert_id();
//$sql = "INSERT INTO plugin_sepe_specialty_tutors (cod_specialty, cod_tutor) VALUES ('".$cod_specialty."','".$cod_tutor."');";
//$res = Database::query($sql);
}
}
}
session_write_close();
$id_course = obtener_course($cod_action);
header("Location: editar-especialidad-accion.php?new_specialty=NO&cod_specialty=".$cod_specialty."&cod_action=".$cod_action);
}
if (api_is_platform_admin()) {
$id_course = obtener_course($_GET['cod_action']);
$interbreadcrumb[] = array("url" => "/plugin/sepe/src/menu_sepe_administracion.php", "name" => $plugin->get_lang('menu_sepe'));
$interbreadcrumb[] = array("url" => "listado-acciones-formativas.php", "name" => $plugin->get_lang('listado_acciones_formativas'));
$interbreadcrumb[] = array("url" => "accion-formativa.php?cid=".$id_course, "name" => $plugin->get_lang('accion_formativa'));
$interbreadcrumb[] = array("url" => "editar-especialidad-accion.php?new_specialty=NO&cod_specialty=".$_GET['cod_specialty']."&cod_action=".$_GET['cod_action'], "name" => $plugin->get_lang('especialidad_accion_formativa'));
if (isset($_GET['new_tutor']) && $_GET['new_tutor']=="SI") {
$templateName = $plugin->get_lang('new_specialty_tutor');
$tpl = new Template($templateName);
$tpl->assign('cod_action', $_GET['cod_action']);
$tpl->assign('cod_specialty', $_GET['cod_specialty']);
$info = array();
$tpl->assign('info', $info);
$tpl->assign('new_tutor', 'SI');
$inicio_anio = date("Y");
$cod_profesor_chamilo = '';
} else {
$templateName = $plugin->get_lang('edit_specialty_tutor');
$tpl = new Template($templateName);
$tpl->assign('cod_action', $_GET['cod_action']);
$tpl->assign('cod_specialty', $_GET['cod_specialty']);
$tpl->assign('cod_tutor', $_GET['cod_tutor']);
$info = especialidad_tutor($_GET['cod_tutor']);
$tpl->assign('info', $info);
$tpl->assign('new_tutor', 'NO');
$cod_profesor_chamilo = $info['cod_user_chamilo'];
}
$listTutores = listado_tutores_specialty($_GET['cod_specialty']);
$tpl->assign('listTutorsExistentes', $listTutores);
$course_code = obtener_course_code($_GET['cod_action']);
$listProfesor = CourseManager::get_teacher_list_from_course_code($course_code);
$listProfesor = limpiarAsignadosProfesores($listProfesor,$_GET['cod_specialty'],$cod_profesor_chamilo);
$tpl->assign('listProfesor', $listProfesor);
if (isset($_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']);
unset($_SESSION['sepe_message_error']);
}
$listing_tpl = 'sepe/view/editar_especialidad_tutor.tpl';
$content = $tpl->fetch($listing_tpl);
$tpl->assign('content', $content);
$tpl->display_one_col_template();
} else {
header("location: http://".$_SERVER['SERVER_NAME']);
}

@ -0,0 +1,112 @@
<?php
/* For licensing terms, see /license.txt */
use \ChamiloSession as Session;
require_once '../config.php';
$course_plugin = 'sepe';
$plugin = SepePlugin::create();
$_cid = 0;
if ( ! empty($_POST))
{
reset ($_POST);
while (list ($param, $val) = each ($_POST)) {
$valor = Database::escape_string($_POST[$param]);
$asignacion = "\$" . $param . "='" . $valor . "';";
//echo $asignacion;
eval($asignacion);
}
$fecha_inicio = $year_start."-".$month_start."-".$day_start;
$fecha_fin = $year_end."-".$month_end."-".$day_end;
if (isset($new_tutorial) && $new_tutorial!="SI") {
$sql = "UPDATE plugin_sepe_participants_specialty_tutorials SET ORIGEN_CENTRO='".$ORIGEN_CENTRO."', CODIGO_CENTRO='".$CODIGO_CENTRO."', FECHA_INICIO='".$fecha_inicio."', FECHA_FIN='".$fecha_fin."' WHERE cod='".$cod_tutorial."';";
} else {
$sql = "INSERT INTO plugin_sepe_participants_specialty_tutorials (cod_participant_specialty, ORIGEN_CENTRO,CODIGO_CENTRO,FECHA_INICIO,FECHA_FIN) VALUES ('".$cod_specialty."','".$ORIGEN_CENTRO."','".$CODIGO_CENTRO."','".$fecha_inicio."','".$fecha_fin."');";
}
$res = Database::query($sql);
if (!$res) {
echo Database::error();
$_SESSION['sepe_message_error'] = "No se ha guardado los cambios";
} else {
$_SESSION['sepe_message_info'] = "Se ha guardado los cambios";
if ($new_tutorial=="SI") {
$cod_tutorial = Database::insert_id();
}
}
session_write_close();
$id_course = obtener_course($cod_action);
$cod_participant = obtener_participant($cod_specialty);
header("Location: editar-especialidad-participante.php?new_specialty=NO&cod_participant=".$cod_participant."&cod_specialty=".$cod_specialty."&cod_action=".$cod_action);
}
if (api_is_platform_admin()) {
$id_course = obtener_course($_GET['cod_action']);
$cod_participant = obtener_participant($_GET['cod_specialty']);
$interbreadcrumb[] = array("url" => "/plugin/sepe/src/menu_sepe_administracion.php", "name" => $plugin->get_lang('menu_sepe'));
$interbreadcrumb[] = array("url" => "listado-acciones-formativas.php", "name" => $plugin->get_lang('listado_acciones_formativas'));
$interbreadcrumb[] = array("url" => "accion-formativa.php?cid=".$id_course, "name" => $plugin->get_lang('accion_formativa'));
$interbreadcrumb[] = array("url" => "editar-especialidad-participante.php?new_specialty=NO&cod_participant=".$cod_participant."&cod_specialty=".$_GET['cod_specialty']."&cod_action=".$_GET['cod_action'], "name" => $plugin->get_lang('participante_especialidad_formativa'));
if (isset($_GET['new_tutorial']) && $_GET['new_tutorial']=="SI") {
$templateName = $plugin->get_lang('new_tutorial');
$tpl = new Template($templateName);
$tpl->assign('cod_action', $_GET['cod_action']);
$tpl->assign('cod_specialty', $_GET['cod_specialty']);
$info = array();
$tpl->assign('info', $info);
$tpl->assign('new_tutorial', 'SI');
$inicio_anio = date("Y");
} else {
$templateName = $plugin->get_lang('edit_tutorial');
$tpl = new Template($templateName);
$tpl->assign('cod_action', $_GET['cod_action']);
$tpl->assign('cod_specialty', $_GET['cod_specialty']);
$tpl->assign('cod_tutorial', $_GET['cod_tutorial']);
$info = especialidad_tutorial($_GET['cod_tutorial']);
$tpl->assign('info', $info);
$tpl->assign('new_tutorial', 'NO');
if ($info['FECHA_INICIO']!='0000-00-00' && $info['FECHA_INICIO']!=NULL) {
$tpl->assign('day_start', date("j",strtotime($info['FECHA_INICIO'])));
$tpl->assign('month_start', date("n",strtotime($info['FECHA_INICIO'])));
$tpl->assign('year_start', date("Y",strtotime($info['FECHA_INICIO'])));
$inicio_anio = date("Y",strtotime($info['FECHA_INICIO']));
} else {
$inicio_anio = date("Y");
}
if ($info['FECHA_FIN']!='0000-00-00' && $info['FECHA_FIN']!=NULL) {
$tpl->assign('day_end', date("j",strtotime($info['FECHA_FIN'])));
$tpl->assign('month_end', date("n",strtotime($info['FECHA_FIN'])));
$tpl->assign('year_end', date("Y",strtotime($info['FECHA_FIN'])));
}
}
$lista_anio = array();
$fin_anio = $inicio_anio + 10;
while ($inicio_anio < $fin_anio) {
$lista_anio[] = $inicio_anio;
$inicio_anio++;
}
$tpl->assign('list_year', $lista_anio);
if (isset($_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']);
unset($_SESSION['sepe_message_error']);
}
$listing_tpl = 'sepe/view/editar_especialidad_tutorials.tpl';
$content = $tpl->fetch($listing_tpl);
$tpl->assign('content', $content);
$tpl->display_one_col_template();
} else {
header("location: http://".$_SERVER['SERVER_NAME']);
}

@ -0,0 +1,171 @@
<?php
/* For licensing terms, see /license.txt */
use \ChamiloSession as Session;
require_once '../config.php';
$course_plugin = 'sepe';
$plugin = SepePlugin::create();
$_cid = 0;
if ( ! empty($_POST))
{
/*
echo "<pre>";
echo var_dump($_POST);
echo "</pre>";
*/
reset ($_POST);
while (list ($param, $val) = each ($_POST)) {
$valor = Database::escape_string($_POST[$param]);
$asignacion = "\$" . $param . "='" . $valor . "';";
//echo $asignacion;
eval($asignacion);
}
if (isset($cod_tutor_empresa) && $cod_tutor_empresa=="nuevo_tutor_empresa") {
$sql = "SELECT * FROM plugin_sepe_tutors_empresa
WHERE TIPO_DOCUMENTO='".$TE_TIPO_DOCUMENTO."' AND NUM_DOCUMENTO='".$TE_NUM_DOCUMENTO."' AND LETRA_NIF='".$TE_LETRA_NIF."';";
$rs = Database::query($sql);
if (Database::num_rows($rs)>0) {
$row = Database::fetch_assoc($rs);
$cod_tutor_empresa = $row['cod'];
$sql = "UPDATE plugin_sepe_tutors_empresa SET empresa='SI' WHERE cod='".$cod_tutor_empresa."'";
Database::query($sql);
} else {
$sql = "INSERT INTO plugin_sepe_tutors_empresa (alias,TIPO_DOCUMENTO,NUM_DOCUMENTO,LETRA_NIF,empresa)
VALUES ('".$TE_alias."','".$TE_TIPO_DOCUMENTO."','".$TE_NUM_DOCUMENTO."','".$TE_LETRA_NIF."','SI');";
$rs = Database::query($sql);
if (!$rs) {
echo Database::error();
} else {
$cod_tutor_empresa = Database::insert_id();
}
}
}
if (isset($cod_tutor_formacion) && $cod_tutor_formacion=="nuevo_tutor_formacion") {
$sql = "SELECT * FROM plugin_sepe_tutors_empresa
WHERE TIPO_DOCUMENTO='".$TF_TIPO_DOCUMENTO."' AND NUM_DOCUMENTO='".$TF_NUM_DOCUMENTO."' AND LETRA_NIF='".$TF_LETRA_NIF."';";
$rs = Database::query($sql);
if (Database::num_rows($rs)>0) {
$row = Database::fetch_assoc($rs);
$cod_tutor_formacion = $row['cod'];
$sql = "UPDATE plugin_sepe_tutors_empresa SET formacion='SI' WHERE cod='".$cod_tutor_formacion."'";
Database::query($sql);
} else {
$sql = "INSERT INTO plugin_sepe_tutors_empresa (alias,TIPO_DOCUMENTO,NUM_DOCUMENTO,LETRA_NIF,formacion)
VALUES ('".$TF_alias."','".$TF_TIPO_DOCUMENTO."','".$TF_NUM_DOCUMENTO."','".$TF_LETRA_NIF."','SI');";
$rs = Database::query($sql);
if (!$rs) {
echo Database::error();
} else {
$cod_tutor_formacion = Database::insert_id();
}
}
}
if (isset($new_participant) && $new_participant!="SI") {
$sql = "UPDATE plugin_sepe_participants SET cod_user_chamilo='".$cod_user_chamilo."', TIPO_DOCUMENTO='".$TIPO_DOCUMENTO."', NUM_DOCUMENTO='".$NUM_DOCUMENTO."', LETRA_NIF='".$LETRA_NIF."', INDICADOR_COMPETENCIAS_CLAVE='".$INDICADOR_COMPETENCIAS_CLAVE."', ID_CONTRATO_CFA='".$ID_CONTRATO_CFA."', CIF_EMPRESA='".$CIF_EMPRESA."', cod_tutor_empresa='".$cod_tutor_empresa."', cod_tutor_formacion='".$cod_tutor_formacion."' WHERE cod='".$cod_participant."';";
} else {
$sql = "INSERT INTO plugin_sepe_participants(cod_action,cod_user_chamilo,TIPO_DOCUMENTO,NUM_DOCUMENTO,LETRA_NIF,INDICADOR_COMPETENCIAS_CLAVE,ID_CONTRATO_CFA,CIF_EMPRESA,cod_tutor_empresa,cod_tutor_formacion)
VALUES ('".$cod_action."','".$cod_user_chamilo."','".$TIPO_DOCUMENTO."','".$NUM_DOCUMENTO."','".$LETRA_NIF."','".$INDICADOR_COMPETENCIAS_CLAVE."','".$ID_CONTRATO_CFA."','".$CIF_EMPRESA."','".$cod_tutor_empresa."','".$cod_tutor_formacion."');";
}
$res = Database::query($sql);
if (!$res) {
echo Database::error();
$_SESSION['sepe_message_error'] = "No se ha guardado los cambios";
} else {
$_SESSION['sepe_message_info'] = "Se ha guardado los cambios";
if ($new_participant=="SI") {
$cod_participant = Database::insert_id();
$sql = "INSERT INTO plugin_sepe_log_participant (cod_user_chamilo, cod_action, fecha_alta) VALUES ('".$cod_user_chamilo."','".$cod_action."','".date("Y-m-d H:i:s")."');";
$res = Database::query($sql);
} else {
$sql = "INSERT INTO plugin_sepe_log_mod_participant (cod_user_chamilo, cod_action, fecha_mod) VALUES ('".$cod_user_chamilo."','".$cod_action."','".date("Y-m-d H:i:s")."');";
$res = Database::query($sql);
}
}
session_write_close();
$id_course = obtener_course($cod_action);
header("Location: editar-participante-accion.php?new_participant=NO&cod_participant=".$cod_participant."&cod_action=".$cod_action);
}
if (api_is_platform_admin()) {
$id_course = obtener_course($_GET['cod_action']);
$interbreadcrumb[] = array("url" => "/plugin/sepe/src/menu_sepe_administracion.php", "name" => $plugin->get_lang('menu_sepe'));
$interbreadcrumb[] = array("url" => "listado-acciones-formativas.php", "name" => $plugin->get_lang('listado_acciones_formativas'));
$interbreadcrumb[] = array("url" => "accion-formativa.php?cid=".$id_course, "name" => $plugin->get_lang('accion_formativa'));
if (isset($_GET['new_participant']) && $_GET['new_participant']=="SI") {
$templateName = $plugin->get_lang('new_participant_accion');
$tpl = new Template($templateName);
$tpl->assign('cod_action', $_GET['cod_action']);
$info = array();
$tpl->assign('info', $info);
$tpl->assign('new_participant', 'SI');
} else {
$templateName = $plugin->get_lang('edit_participant_accion');
$tpl = new Template($templateName);
$tpl->assign('cod_action', $_GET['cod_action']);
$info = participante_accion($_GET['cod_participant']);
$tpl->assign('info', $info);
$tpl->assign('new_participant', 'NO');
$tpl->assign('cod_participant', $_GET['cod_participant']);
if ($info['cod_user_chamilo'] != 0) {
$info_usuario_chamilo = api_get_user_info($info['cod_user_chamilo']);//UserManager::get_user_info_by_id($info['cod_user_chamilo']);
$tpl->assign('info_user_chamilo', $info_usuario_chamilo);
}
$listParticipantSpecialty = listParticipantSpecialty($_GET['cod_participant']);
$tpl->assign('listParticipantSpecialty', $listParticipantSpecialty);
}
$course_code = obtener_course_code($_GET['cod_action']);
//$cod_curso = obtener_course($_GET['cod_action']);
$listAlumnoInfo = array();
$listAlumno = CourseManager::get_student_list_from_course_code($course_code);
foreach ($listAlumno as $value) {
$sql = "SELECT 1 FROM plugin_sepe_participants WHERE cod_user_chamilo='".$value['user_id']."';";
$res = Database::query($sql);
if (Database::num_rows($res)==0) {
$listAlumnoInfo[] = api_get_user_info($value['user_id']); //UserManager::get_user_info_by_id($value['user_id']);
}
}
/*
echo "<pre>";
echo var_dump($listAlumnoInfo);
echo "</pre>";
exit;
*/
$tpl->assign('listAlumno', $listAlumnoInfo);
$listTutorE = array();
$listTutorE = listadoTutorE();
$tpl->assign('listTutorE', $listTutorE);
$listTutorF = array();
$listTutorF= listadoTutorE("formacion='SI'");
$tpl->assign('listTutorF', $listTutorF);
if (isset($_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']);
unset($_SESSION['sepe_message_error']);
}
$listing_tpl = 'sepe/view/editar_participante_accion.tpl';
$content = $tpl->fetch($listing_tpl);
$tpl->assign('content', $content);
$tpl->display_one_col_template();
} else {
header("location: http://".$_SERVER['SERVER_NAME']);
}

@ -0,0 +1,225 @@
<?php
/* For license terms, see /license.txt */
/**
* Functions for the Sepe plugin
* @package chamilo.plugin.sepe
*/
/**
* Init
*/
require_once '../config.php';
/*
require_once 'sepe.lib.php';
//require_once api_get_path(LIBRARY_PATH) . 'mail.lib.inc.php';
require_once api_get_path(LIBRARY_PATH) . 'course.lib.php';
$tableSepeCenter = Database::get_main_table(TABLE_SEPE_CENTER);
$tableSepeActions = Database::get_main_table(TABLE_SEPE_ACTIONS);
$tableSepeSpecialty = Database::get_main_table(TABLE_SEPE_SPECIALTY);
$tableSepeSpecialtyClassroom = Database::get_main_table(TABLE_SEPE_SPECIALTY_CLASSROOM);
$tableSepeSpecialtyTutors = Database::get_main_table(TABLE_SEPE_SPECIALTY_TUTORS);
$tableSepeTutors = Database::get_main_table(TABLE_SEPE_TUTORS);
$tableSepeParticipants = Database::get_main_table(TABLE_SEPE_PARTICIPANTS);
$tableSepeParticipantsSpecialty = Database::get_main_table(TABLE_SEPE_PARTICIPANTS_SPECIALTY);
$tableSepeParticipantsSpecialtyTutorials = Database::get_main_table(TABLE_SEPE_PARTICIPANTS_SPECIALTY_TUTORIALS);
$tableSepeCourseActions = Database::get_main_table(TABLE_SEPE_COURSE_ACTIONS);
$tableCourse = Database::get_main_table(TABLE_MAIN_COURSE);
$tableCourseRelUser = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$tableUser = Database::get_main_table(TABLE_MAIN_USER);
*/
$plugin = SepePlugin::create();
if ($_REQUEST['tab'] == 'borra_datos_centro') {
$sql = "DELETE FROM $tableSepeCenter;";
$res = Database::query($sql);
if (!$res) {
$sql = "DELETE FROM $tableSepeActions;";
$res = Database::query($sql);
$content = $plugin->get_lang('ProblemToDeleteInfoCenter') . Database::error();
echo json_encode(array("status" => "false", "content" => $content));
} else {
$content = $plugin->get_lang('DeleteOk');
echo json_encode(array("status" => "true", "content" => $content));
}
}
if ($_REQUEST['tab'] == 'borra_accion_formativa') {
$cod = $_REQUEST['cod'];
$sql = "DELETE FROM $tableSepeActions WHERE cod='".$cod."';";
$res = Database::query($sql);
if (!$res) {
$content = $plugin->get_lang('ProblemToDeleteInfoAction') . Database::error();
echo json_encode(array("status" => "false", "content" => $content));
} else {
$content = $plugin->get_lang('DeleteOk');
$_SESSION['sepe_message_info'] = $content;
echo json_encode(array("status" => "true"));
}
}
if ($_REQUEST['tab'] == 'borra_especialidad_accion') {
$cod = substr($_REQUEST['cod'],9);
$sql = "DELETE FROM $tableSepeSpecialty WHERE cod='".$cod."';";
$res = Database::query($sql);
if (!$res) {
$content = $plugin->get_lang('ProblemToDeleteInfoSpecialty') . Database::error();
echo json_encode(array("status" => "false", "content" => $content));
} else {
$content = $plugin->get_lang('DeleteOk');
echo json_encode(array("status" => "true", "content" => $content));
}
}
if ($_REQUEST['tab'] == 'borra_especialidad_participante') {
$cod = substr($_REQUEST['cod'],9);
$sql = "DELETE FROM $tableSepeParticipantsSpecialty WHERE cod='".$cod."';";
$res = Database::query($sql);
if (!$res) {
$content = $plugin->get_lang('ProblemToDeleteInfoSpecialty') . Database::error();
echo json_encode(array("status" => "false", "content" => $content));
} else {
$content = $plugin->get_lang('DeleteOk');
echo json_encode(array("status" => "true", "content" => $content));
}
}
if ($_REQUEST['tab'] == 'borra_especialidad_classroom') {
$cod = substr($_REQUEST['cod'],9);
$sql = "DELETE FROM $tableSepeSpecialtyClassroom WHERE cod='".$cod."';";
$res = Database::query($sql);
if (!$res) {
$content = $plugin->get_lang('ProblemToDeleteInfoSpecialtyClassroom') . Database::error();
echo json_encode(array("status" => "false", "content" => $content));
} else {
$content = $plugin->get_lang('DeleteOk');
echo json_encode(array("status" => "true", "content" => $content));
}
}
if ($_REQUEST['tab'] == 'comprobar_editar_tutor') {
//$cod = substr($_REQUEST['cod'],9);
$tipo = $_REQUEST['tipo'];
$num = $_REQUEST['num'];
$letra=$_REQUEST['letra'];
$codchamilo = $_REQUEST['codchamilo'];
$sql = "SELECT cod_user_chamilo FROM $tableSepeTutors WHERE TIPO_DOCUMENTO='".$tipo."' AND NUM_DOCUMENTO='".$num."' AND LETRA_NIF='".$letra."';";
$res = Database::query($sql);
if (!$res) {
$content = $plugin->get_lang('ProblemDataBase') . Database::error();
error_log(print_r($content,1));
exit;
} else {
$aux = Database::fetch_assoc($res);
if ($aux['cod_user_chamilo']==$codchamilo || $aux['cod_user_chamilo']=='0') {
echo json_encode(array("status" => "true"));
} else {
$content = $plugin->get_lang('ModDataTeacher');
echo json_encode(array("status" => "false", "content" => $content));
}
}
}
if ($_REQUEST['tab'] == 'borra_especialidad_tutor') {
$cod = substr($_REQUEST['cod'],5);
$sql = "DELETE FROM $tableSepeSpecialtyTutors WHERE cod='".$cod."';";
$res = Database::query($sql);
if (!$res) {
$content = $plugin->get_lang('ProblemToDeleteInfoSpecialtyTutor') . Database::error();
echo json_encode(array("status" => "false", "content" => $content));
} else {
$content = $plugin->get_lang('DeleteOk');
echo json_encode(array("status" => "true", "content" => $content));
}
}
if ($_REQUEST['tab'] == 'borra_participante_accion') {
$cod = substr($_REQUEST['cod'],11);
$sql = "SELECT cod_user_chamilo, cod_action FROM $tableSepeParticipants WHERE cod='".$cod."';";
$res = Database::query($sql);
$row = Database::fetch_assoc($res);
$sql = "UPDATE plugin_sepe_log_participant SET fecha_baja='".date("Y-m-d H:i:s")."' WHERE cod_user_chamilo='".$row['cod_user_chamilo']."' AND cod_action='".$row['cod_action']."';";
$res = Database::query($sql);
$sql = "DELETE FROM $tableSepeParticipants WHERE cod='".$cod."';";
$res = Database::query($sql);
if (!$res) {
$content = $plugin->get_lang('ProblemToDeleteInfoParticipant') . Database::error();
echo json_encode(array("status" => "false", "content" => $content));
} else {
$content = $plugin->get_lang('DeleteOk');
echo json_encode(array("status" => "true", "content" => $content));
}
}
if ($_REQUEST['tab'] == 'desvincular_action') {
$cod = substr($_REQUEST['cod'],3);
$sql = "DELETE FROM $tableSepeCourseActions WHERE cod='".$cod."';";
$res = Database::query($sql);
if (!$res) {
$content = $plugin->get_lang('ProblemToDesvincularInfoAction') . Database::error();
echo json_encode(array("status" => "false", "content" => $content));
} else {
$content = $plugin->get_lang('DeleteOk');
echo json_encode(array("status" => "true", "content" => $content));
}
}
if ($_REQUEST['tab'] == 'asignar_accion') {
$id_course = substr($_REQUEST['cod_course'],11);
$cod_action = $_REQUEST['cod_action'];
if (trim($cod_action)!='' && trim($id_course)!='') {
$cod_action = Database::escape_string($cod_action);
$id_course = Database::escape_string($id_course);
$sql = "SELECT * FROM $tableSepeCourseActions WHERE cod_action='".$cod_action."';";
$rs = Database::query($sql);
if (Database::num_rows($rs) > 0) {
$content = "La acci&oacute;n formativa elegida est&aacute; siendo usada por otro curso";
echo json_encode(array("status" => "false", "content" => $content));
} else {
$sql = "SELECT 1 FROM course WHERE id='".$id_course."';";
$rs = Database::query($sql);
if (Database::num_rows($rs) == 0) {
$content = "El curso al que se le asocia la acci&oacute;n formativa no existe";
echo json_encode(array("status" => "false", "content" => $content));
} else {
$sql = "INSERT INTO $tableSepeCourseActions (id_course, cod_action) VALUES ('".$id_course."','".$cod_action."');";
$rs = Database::query($sql);
if (!$rs) {
$content = "No se ha podido guardar la selección";
echo json_encode(array("status" => "false", "content" => utf8_encode($content)));
} else {
echo json_encode(array("status" => "true"));
}
}
}
} else {
$content = "Error al recibir los datos";
echo json_encode(array("status" => "false", "content" => $content));
}
}
if ($_REQUEST['tab'] == 'generar_api_key_sepe') {
$tApi = Database::get_main_table(TABLE_MAIN_USER_API_KEY);
//$info_user = UserManager::get_user_info('SEPE');
$info_user = api_get_user_info_from_username('SEPE');
$array_list_key = array();
$user_id = $info_user['user_id'];
$api_service = 'dokeos';
$num = UserManager::update_api_key($user_id, $api_service);
$array_list_key = UserManager::get_api_keys($user_id, $api_service);
if (trim($array_list_key[$num])!='') {
$content = $array_list_key[$num];
echo json_encode(array("status" => "true", "content" => $content));
} else {
$content = "Problema al generar una nueva api key";
echo json_encode(array("status" => "false", "content" => $content));
}
}

@ -0,0 +1,46 @@
<?php
/* For license terms, see /license.txt */
/**
* Index of the Sepe plugin
* @package chamilo.plugin.sepe
*/
/**
*
*/
$plugin = SepePlugin::create();
$is_enable = $plugin->get('sepe_enable');
$title="Administraci&oacute;n SEPE";
$pluginPath = api_get_path(WEB_PLUGIN_PATH).'sepe/src/';
if (api_is_platform_admin() && $is_enable=="true") {
echo '<div class="panel panel-default">';
echo '<div class="panel-heading" role="tab">';
echo '<h4 class="panel-title">'.$title.'</h4>';
echo '</div>';
echo '<div class="panel-collapse collapse in" role="tabpanel">';
echo '<div class="panel-body">';
echo '<ul class="nav nav-pills nav-stacked">';
echo '<li>';
echo '<a href="'.$pluginPath.'datos-identificativos.php">';
echo '<img src="'.api_get_path(WEB_PLUGIN_PATH).'sepe/resources/list.png">';
echo $plugin->get_lang('datos_centro');
echo '</a>';
echo '</li>';
echo '<li>';
echo '<a href="'.$pluginPath.'listado-acciones-formativas.php">';
echo '<img src="'.api_get_path(WEB_PLUGIN_PATH).'sepe/resources/forms.png">';
echo $plugin->get_lang('formulario_acciones_formativas');
echo '</a>';
echo '</li>';
echo '<li>';
echo '<a href="'.$pluginPath.'configuracion.php">';
echo '<img src="'.api_get_path(WEB_PLUGIN_PATH).'sepe/resources/settings.png">';
echo $plugin->get_lang('configuracion_sepe');
echo '</a>';
echo '</li>';
echo '</ul>';
echo '</div>';
echo '</div>';
echo '</div>';
}

@ -0,0 +1,53 @@
<?php
/* For licensing terms, see /license.txt */
use \ChamiloSession as Session;
require_once '../config.php';
/*
require_once dirname(__FILE__).'/sepe.lib.php';
require_once '../../../main/inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH) . 'plugin.class.php';
require_once '../lib/sepe_plugin.class.php';
require_once api_get_path(CONFIGURATION_PATH).'profile.conf.php';
*/
$course_plugin = 'sepe';
$plugin = SepePlugin::create();
$_cid = 0;
if (api_is_platform_admin()) {
$templateName = $plugin->get_lang('listado_acciones_formativas');
$interbreadcrumb[] = array("url" => "/plugin/sepe/src/menu_sepe_administracion.php", "name" => $plugin->get_lang('menu_sepe'));
$tpl = new Template($templateName);
if (isset($_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']);
unset($_SESSION['sepe_message_error']);
}
$lista_curso_acciones = listCourseAction();
/*
echo "<pre>";
echo var_dump($lista_curso_acciones);
echo "</pre>";
exit;
*/
$lista_curso_libre_acciones = listCourseFree();
$lista_acciones_libres = listActionFree();
$tpl->assign('lista_curso_acciones', $lista_curso_acciones);
$tpl->assign('lista_curso_libre_acciones', $lista_curso_libre_acciones);
$tpl->assign('lista_acciones_libres', $lista_acciones_libres);
$listing_tpl = 'sepe/view/listado_acciones_formativas.tpl';
$content = $tpl->fetch($listing_tpl);
$tpl->assign('content', $content);
$tpl->display_one_col_template();
} else {
header("location: http://".$_SERVER['SERVER_NAME']);
}

@ -0,0 +1,59 @@
<?php
/* For licensing terms, see /license.txt */
use \ChamiloSession as Session;
require_once '../config.php';
$course_plugin = 'sepe';
$plugin = SepePlugin::create();
$_cid = 0;
$is_enable = $plugin->get('sepe_enable');
$title="Administraci&oacute;n SEPE";
$pluginPath = api_get_path(WEB_PLUGIN_PATH).'sepe/src/';
if (api_is_platform_admin()) {
$html_text = '';
$html_text .= '<div class="panel panel-default">';
$html_text .= '<div class="panel-heading" role="tab">';
$html_text .= '<h4 class="panel-title">'.$title.'</h4>';
$html_text .= '</div>';
$html_text .= '<div class="panel-collapse collapse in" role="tabpanel">';
$html_text .= '<div class="panel-body">';
$html_text .= '<ul class="nav nav-pills nav-stacked">';
$html_text .= '<li>';
$html_text .= '<a href="'.$pluginPath.'datos-identificativos.php">';
$html_text .= '<img src="'.api_get_path(WEB_PLUGIN_PATH).'sepe/resources/list.png">';
$html_text .=$plugin->get_lang('datos_centro');
$html_text .= '</a>';
$html_text .= '</li>';
$html_text .= '<li>';
$html_text .= '<a href="'.$pluginPath.'listado-acciones-formativas.php">';
$html_text .= '<img src="'.api_get_path(WEB_PLUGIN_PATH).'sepe/resources/forms.png">';
$html_text .=$plugin->get_lang('formulario_acciones_formativas');
$html_text .= '</a>';
$html_text .= '</li>';
$html_text .= '<li>';
$html_text .= '<a href="'.$pluginPath.'configuracion.php">';
$html_text .= '<img src="'.api_get_path(WEB_PLUGIN_PATH).'sepe/resources/settings.png">';
$html_text .=$plugin->get_lang('configuracion_sepe');
$html_text .= '</a>';
$html_text .= '</li>';
$html_text .= '</ul>';
$html_text .= '</div>';
$html_text .= '</div>';
$html_text .= '</div>';
$templateName = $plugin->get_lang('menu_sepe_administracion');
$interbreadcrumb[] = array("url" => "/main/admin/index.php", "name" => get_lang('Administration'));
$tpl = new Template($templateName);
$tpl->assign('html_text', $html_text);
$listing_tpl = 'sepe/view/menu_sepe_administracion.tpl';
$content = $tpl->fetch($listing_tpl);
$tpl->assign('content', $content);
$tpl->display_one_col_template();
} else {
header("location: http://".$_SERVER['SERVER_NAME']);
}

@ -0,0 +1,587 @@
<?php
/**
* Functions
* @package chamilo.plugin.sepe
*/
//require_once __DIR__ . '../../../main/inc/global.inc.php';
//require_once '../config.php';
//require_once api_get_path(LIBRARY_PATH).'plugin.class.php';
require_once 'sepe_plugin.class.php';
$tableSepeCenter = Database::get_main_table(SepePlugin::TABLE_SEPE_CENTER);
$tableSepeActions = Database::get_main_table(SepePlugin::TABLE_SEPE_ACTIONS);
$tableSepeSpecialty = Database::get_main_table(SepePlugin::TABLE_SEPE_SPECIALTY);
$tableSepeSpecialtyClassroom = Database::get_main_table(SepePlugin::TABLE_SEPE_SPECIALTY_CLASSROOM);
$tableSepeSpecialtyTutors = Database::get_main_table(SepePlugin::TABLE_SEPE_SPECIALTY_TUTORS);
$tableSepeTutors = Database::get_main_table(SepePlugin::TABLE_SEPE_TUTORS);
$tableSepeParticipants = Database::get_main_table(SepePlugin::TABLE_SEPE_PARTICIPANTS);
$tableSepeParticipantsSpecialty = Database::get_main_table(SepePlugin::TABLE_SEPE_PARTICIPANTS_SPECIALTY);
$tableSepeParticipantsSpecialtyTutorials = Database::get_main_table(SepePlugin::TABLE_SEPE_PARTICIPANTS_SPECIALTY_TUTORIALS);
$tableSepeCourseActions = Database::get_main_table(SepePlugin::TABLE_SEPE_COURSE_ACTIONS);
$tableCourse = Database::get_main_table(TABLE_MAIN_COURSE);
$tableCourseRelUser = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$tableUser = Database::get_main_table(TABLE_MAIN_USER);
$tableCentros = Database::get_main_table(SepePlugin::TABLE_SEPE_CENTROS);
$tableTutorE = Database::get_main_table(SepePlugin::TABLE_SEPE_TUTORS_EMPRESA);
$tableSepeCourseActions = Database::get_main_table(SepePlugin::TABLE_SEPE_COURSE_ACTIONS);
function datos_identificativos()
{
global $tableSepeCenter;
$sql = "SELECT * FROM $tableSepeCenter;";
$res = Database::query($sql);
if (Database::num_rows($res) > 0) {
$row = Database::fetch_assoc($res);
} else {
$row = false;
}
return $row;
}
function obtener_cod_action($cod)
{
global $tableSepeCourseActions;
$sql = "SELECT cod_action FROM $tableSepeCourseActions WHERE id_course='".$cod."';";
$rs = Database::query($sql);
$aux = Database::fetch_assoc($rs);
return $aux['cod_action'];
}
function obtener_course($cod)
{
global $tableSepeCourseActions;
$sql = "SELECT id_course FROM $tableSepeCourseActions WHERE cod_action='".$cod."';";
$rs = Database::query($sql);
$aux = Database::fetch_assoc($rs);
return $aux['id_course'];
}
function obtener_course_code($cod)
{
global $tableCourse;
$course_id = obtener_course($cod);
$sql = "SELECT code FROM $tableCourse WHERE id='".$course_id."'";
$rs = Database::query($sql);
$aux = Database::fetch_assoc($rs);
return $aux['code'];
}
function obtener_participant($cod)
{
global $tableSepeParticipantsSpecialty;
$sql = "SELECT cod_participant FROM $tableSepeParticipantsSpecialty WHERE cod='".$cod."';";
$rs = Database::query($sql);
$aux = Database::fetch_assoc($rs);
return $aux['cod_participant'];
}
function accion_formativa($cod)
{
global $tableSepeActions;
$sql = "SELECT * FROM $tableSepeActions WHERE cod='".$cod."';";
$res = Database::query($sql);
$aux = array();
if (Database::num_rows($res) > 0) {
$row = Database::fetch_assoc($res);
} else {
$row = false;
}
return $row;
}
function especialidad_accion($cod)
{
global $tableSepeSpecialty;
$sql = "SELECT * FROM $tableSepeSpecialty WHERE cod='".$cod."';";
$res = Database::query($sql);
$aux = array();
if (Database::num_rows($res) > 0) {
$row = Database::fetch_assoc($res);
} else {
$row = false;
}
return $row;
}
function especialidad_classroom($cod)
{
global $tableSepeSpecialtyClassroom;
global $tableCentros;
$sql = "SELECT a.*,ORIGEN_CENTRO,CODIGO_CENTRO FROM $tableSepeSpecialtyClassroom a LEFT JOIN $tableCentros b
ON a.cod_centro=b.cod WHERE a.cod='".$cod."';";
//echo $sql; exit;
$res = Database::query($sql);
$aux = array();
if (Database::num_rows($res) > 0) {
$row = Database::fetch_assoc($res);
} else {
$row = false;
}
return $row;
}
function especialidad_tutorial($cod)
{
global $tableSepeParticipantsSpecialtyTutorials;
$sql = "SELECT * FROM $tableSepeParticipantsSpecialtyTutorials WHERE cod='".$cod."';";
$res = Database::query($sql);
$aux = array();
if (Database::num_rows($res) > 0) {
$row = Database::fetch_assoc($res);
} else {
$row = false;
}
return $row;
}
function list_tutor($cod_specialty)
{
global $tableSepeSpecialtyTutors;
$sql = "SELECT * FROM $tableSepeSpecialtyTutors WHERE cod_specialty='".$cod_specialty."';";
$res = Database::query($sql);
if (Database::num_rows($res) > 0) {
$row = Database::fetch_assoc($res);
} else {
$row = false;
}
return $row;
}
function listado_centros()
{
global $tableCentros;
$sql = "SELECT * FROM $tableCentros;";
$res = Database::query($sql);
$aux = array();
while ($row = Database::fetch_assoc($res)) {
$aux[] = $row;
}
return $aux;
}
function listadoTutorE($cond="empresa='SI'")
{
global $tableTutorE;
$sql = "SELECT * FROM $tableTutorE WHERE ".$cond." ORDER BY alias ASC, NUM_DOCUMENTO ASC;";
$res = Database::query($sql);
$aux = array();
while ($row = Database::fetch_assoc($res)) {
$tmp = array();
$tmp['cod'] = $row['cod'];
if (trim($row['alias'])!='') {
$tmp['alias'] = $row['alias'].' - '.$row['TIPO_DOCUMENTO'].' '.$row['NUM_DOCUMENTO'].' '.$row['LETRA_NIF'];
} else {
$tmp['alias'] = $row['TIPO_DOCUMENTO'].' '.$row['NUM_DOCUMENTO'].' '.$row['LETRA_NIF'];
}
$aux[] = $tmp;
}
return $aux;
}
function listadoTutorF()
{
global $tableTutorE;
$sql = "SELECT * FROM $tableTutorE WHERE formacion='SI' ORDER BY alias ASC, NUM_DOCUMENTO ASC;";
$res = Database::query($sql);
$aux = array();
while ($row = Database::fetch_assoc($res)) {
$tmp = array();
$tmp['cod'] = $row['cod'];
if (trim($row['alias'])!='') {
$tmp['alias'] = $row['alias'].' - '.$row['TIPO_DOCUMENTO'].' '.$row['NUM_DOCUMENTO'].' '.$row['LETRA_NIF'];
} else {
$tmp['alias'] = $row['TIPO_DOCUMENTO'].' '.$row['NUM_DOCUMENTO'].' '.$row['LETRA_NIF'];
}
$aux[] = $tmp;
}
return $aux;
}
function listado_tutores()
{
global $tableSepeTutors;
global $tableUser;
$sql = "SELECT a.*, b.firstname AS firstname, b.lastname AS lastname
FROM $tableSepeTutors AS a, $tableUser AS b
WHERE a.cod_user_chamilo=b.user_id;";
$res = Database::query($sql);
$aux = array();
while ($row = Database::fetch_assoc($res)) {
$aux[] = $row;
}
return $aux;
}
function listado_tutores_specialty($cod_specialty)
{
global $tableSepeSpecialtyTutors;
global $tableSepeTutors;
global $tableUser;
$sql = "SELECT cod_tutor FROM $tableSepeSpecialtyTutors;";
$rs = Database::query($sql);
$lista_tutores = array();
while ($tmp = Database::fetch_assoc($rs)) {
$lista_tutores[] = $tmp['cod_tutor'];
}
$sql = "SELECT a.*, b.firstname AS firstname, b.lastname AS lastname
FROM $tableSepeTutors AS a LEFT JOIN $tableUser AS b ON a.cod_user_chamilo=b.user_id;";
$res = Database::query($sql);
$aux = array();
while ($row = Database::fetch_assoc($res)) {
if (!in_array($row['cod'],$lista_tutores)) {
$tutor = array();
$tutor['cod'] = $row['cod'];
if (trim($row['firstname'])!='' || trim($row['lastname'])!='') {
$tutor['datos'] = $row['firstname'].' '.$row['lastname'].' ('.$row['TIPO_DOCUMENTO'].' '.$row['NUM_DOCUMENTO'].' '.$row['LETRA_NIF'].' )';
} else {
$tutor['datos'] = $row['TIPO_DOCUMENTO'].' '.$row['NUM_DOCUMENTO'].' '.$row['LETRA_NIF'];
}
$aux[] = $tutor;
}
}
return $aux;
}
function especialidad_tutor($cod)
{
global $tableSepeSpecialtyTutors;
global $tableSepeTutors;
$sql = "SELECT a.*,cod_user_chamilo,TIPO_DOCUMENTO,NUM_DOCUMENTO,LETRA_NIF FROM $tableSepeSpecialtyTutors a
INNER JOIN $tableSepeTutors b ON a.cod_tutor=b.cod
WHERE a.cod='".$cod."';";
$res = Database::query($sql);
$aux = array();
if (Database::num_rows($res) > 0) {
$row = Database::fetch_assoc($res);
} else {
$row = false;
}
return $row;
}
function limpiarAsignadosProfesores($listProfesor,$cod_specialty,$cod_profesor_chamilo)
{
global $tableSepeSpecialtyTutors;
global $tableSepeTutors;
$sql = "SELECT cod_tutor FROM $tableSepeSpecialtyTutors WHERE cod_specialty='".$cod_specialty."';";
$rs = Database::query($sql);
if (Database::num_rows($rs)>0) {
while ($aux = Database::fetch_assoc($rs)) {
$sql = "SELECT cod_user_chamilo FROM $tableSepeTutors WHERE cod='".$aux['cod_tutor']."';";
$res = Database::query($sql);
if (Database::num_rows($res)>0) {
$tmp = Database::fetch_assoc($res);
if ($tmp['cod_user_chamilo']!=$cod_profesor_chamilo) {
unset($listProfesor[$tmp['cod_user_chamilo']]);
}
}
}
}
return $listProfesor;
}
function participante_accion($cod)
{
global $tableSepeParticipants;
$sql = "SELECT * FROM $tableSepeParticipants WHERE cod='".$cod."';";
$res = Database::query($sql);
$aux = array();
if (Database::num_rows($res) > 0) {
$row = Database::fetch_assoc($res);
} else {
$row = false;
}
return $row;
}
function especialidad_participante($cod)
{
global $tableSepeParticipantsSpecialty;
$sql = "SELECT * FROM $tableSepeParticipantsSpecialty WHERE cod='".$cod."';";
$res = Database::query($sql);
$aux = array();
if (Database::num_rows($res) > 0) {
$row = Database::fetch_assoc($res);
} else {
$row = false;
}
return $row;
}
function tutorias_especialidad_participante($cod)
{
global $tableSepeParticipantsSpecialtyTutorials;
$sql = "SELECT * FROM $tableSepeParticipantsSpecialtyTutorials WHERE cod='".$cod."';";
$res = Database::query($sql);
$aux = array();
if (Database::num_rows($res) > 0) {
$row = Database::fetch_assoc($res);
} else {
$row = false;
}
return $row;
}
function existeDatosIdentificativos()
{
global $tableSepeCenter;
$sql = "SELECT 1 FROM $tableSepeCenter;";
$result = Database::query($sql);
if ( Database::affected_rows($result) > 0 ) {
return true;
} else {
return false;
}
}
/**
* List specialties
* @return array Results (list of specialty details)
*/
function listSpecialty($cod)
{
global $tableSepeSpecialty;
$sql = "SELECT cod, ORIGEN_ESPECIALIDAD, AREA_PROFESIONAL, CODIGO_ESPECIALIDAD
FROM $tableSepeSpecialty
WHERE cod_action='".$cod."';";
$res = Database::query($sql);
$aux = array();
while ($row = Database::fetch_assoc($res)) {
$aux[] = $row;
}
return $aux;
}
/**
* List participants
* @return array Results (list of participants details)
*/
function listParticipant($cod)
{
global $tableSepeParticipants;
global $tableUser;
$sql = "SELECT cod, TIPO_DOCUMENTO, NUM_DOCUMENTO, LETRA_NIF, firstname, lastname
FROM $tableSepeParticipants LEFT JOIN $tableUser ON $tableSepeParticipants.cod_user_chamilo=$tableUser.user_id
WHERE cod_action='".$cod."';";
$res = Database::query($sql);
$aux = array();
while ($row = Database::fetch_assoc($res)) {
$aux[] = $row;
}
return $aux;
}
/**
* List classroom
* @return array Results (list of classroom details)
*/
function listClassroom($cod)
{
global $tableSepeSpecialtyClassroom;
global $tableCentros;
$sql = "SELECT a.*,ORIGEN_CENTRO,CODIGO_CENTRO FROM $tableSepeSpecialtyClassroom a LEFT JOIN $tableCentros b
ON a.cod_centro=b.cod WHERE cod_specialty='".$cod."';";
$res = Database::query($sql);
$aux = array();
while ($row = Database::fetch_assoc($res)) {
$aux[] = $row;
}
return $aux;
}
/**
* List tutors
* @return array Results (list of tutors details)
*/
function listTutors($cod)
{
global $tableSepeSpecialtyTutors;
global $tableSepeTutors;
global $tableUser;
$aux = array();
$sql = "SELECT a.*,TIPO_DOCUMENTO,NUM_DOCUMENTO,LETRA_NIF, firstname, lastname FROM $tableSepeSpecialtyTutors a
INNER JOIN $tableSepeTutors b ON a.cod_tutor=b.cod
LEFT JOIN $tableUser c ON b.cod_user_chamilo=c.user_id
WHERE a.cod_specialty='".$cod."';";
$res = Database::query($sql);
while ($row = Database::fetch_assoc($res)) {
$aux[] = $row;
}
return $aux;
}
/**
* List participants specialty
* @return array Results (list of participants specialty details)
*/
function listParticipantSpecialty($cod)
{
global $tableSepeParticipantsSpecialty;
$sql = "SELECT * FROM $tableSepeParticipantsSpecialty WHERE cod_participant='".$cod."';";
$res = Database::query($sql);
$aux = array();
while ($row = Database::fetch_assoc($res)) {
$aux[] = $row;
}
return $aux;
}
/**
* List participants specialty
* @return array Results (list of participants specialty details)
*/
function listSpecialtyTutorial($cod)
{
global $tableSepeParticipantsSpecialtyTutorials;
$sql = "SELECT * FROM $tableSepeParticipantsSpecialtyTutorials WHERE cod_participant_specialty='".$cod."';";
$res = Database::query($sql);
$aux = array();
while ($row = Database::fetch_assoc($res)) {
$aux[] = $row;
}
return $aux;
}
/**
* List of courses associated with formative actions
* @return array Results (list of courses id)
*/
function listCourseAction()
{
global $tableSepeActions;
global $tableSepeCourseActions;
//global ;
//$table = Database::get_main_table(TABLE_SEPE_COURSE_ACTIONS);
$sql = "SELECT $tableSepeCourseActions.*, course.title AS title, $tableSepeActions.ORIGEN_ACCION AS ORIGEN_ACCION, $tableSepeActions.CODIGO_ACCION AS CODIGO_ACCION
FROM $tableSepeCourseActions, course, $tableSepeActions
WHERE $tableSepeCourseActions.id_course=course.id AND $tableSepeActions.cod=$tableSepeCourseActions.cod_action";
$res = Database::query($sql);
$aux = array();
while ($row = Database::fetch_assoc($res)) {
$aux[] = $row;
}
return $aux;
}
function listCourseFree()
{
global $tableCourse;
global $tableSepeCourseActions;
$sql = "SELECT id, title FROM $tableCourse
WHERE NOT EXISTS (
SELECT * FROM $tableSepeCourseActions WHERE $tableCourse.id = $tableSepeCourseActions.id_course)
;";
$res = Database::query($sql);
while ($row = Database::fetch_assoc($res)) {
$aux[] = $row;
}
return $aux;
}
function listActionFree()
{
global $tableSepeActions;
global $tableSepeCourseActions;
$sql = "SELECT cod, ORIGEN_ACCION,CODIGO_ACCION FROM $tableSepeActions
WHERE NOT EXISTS (
SELECT * FROM $tableSepeCourseActions WHERE $tableSepeActions.cod = $tableSepeCourseActions.cod_action)
;";
$res = Database::query($sql);
$aux = array();
while ($row = Database::fetch_assoc($res)) {
$aux[] = $row;
}
return $aux;
}
/**
* function texto_aleatorio (integer $long = 5, boolean $lestras_min = true, boolean $letras_max = true, boolean $num = true))
*
* Permite generar contrasenhas de manera aleatoria.
*
* @$long: Especifica la longitud de la contrasenha
* @$letras_min: Podra usar letas en minusculas
* @$letras_max: Podra usar letas en mayusculas
* @$num: Podra usar numeros
*
* return string
*/
function texto_aleatorio ($long = 6, $letras_min = true, $letras_max = true, $num = true)
{
$salt = $letras_min?'abchefghknpqrstuvwxyz':'';
$salt .= $letras_max?'ACDEFHKNPRSTUVWXYZ':'';
$salt .= $num?(strlen($salt)?'2345679':'0123456789'):'';
if (strlen($salt) == 0) {
return '';
}
$i = 0;
$str = '';
srand((double)microtime()*1000000);
while ($i < $long) {
$num = rand(0, strlen($salt)-1);
$str .= substr($salt, $num, 1);
$i++;
}
return $str;
}
function info_tutor_rel_profesor($cod)
{
global $tableSepeTutors;
$sql = "SELECT * FROM $tableSepeTutors WHERE cod_user_chamilo='".$cod."';";
$res = Database::query($sql);
$aux = array();
if (Database::num_rows($res) > 0) {
$row = Database::fetch_assoc($res);
} else {
$row = false;
}
return $row;
}
function info_compentencia_docente($code)
{
$sql = "SELECT * FROM plugin_sepe_competencia_docente WHERE code='".$code."';";
$res = Database::query($sql);
$row = Database::fetch_assoc($res);
return $row['valor'];
}
function obtener_usuario_chamilo($cod_participant)
{
global $tableSepeParticipants;
$sql = "SELECT * FROM $tableSepeParticipants WHERE cod='".$cod_participant."';";
$res = Database::query($sql);
$row = Database::fetch_assoc($res);
if ($row['cod_user_chamilo']=='0' || $row['cod_user_chamilo']=='') {
return false;
} else {
return $row['cod_user_chamilo'];
}
}
/*
function obtener_modulos_alumno_accion($user_id, $cod_action)
{
global $tableSepeParticipants;
global $tableSepeParticipantsSpecialty;
$sql = "SELECT cod FROM $tableSepeParticipants WHERE cod_action='".$cod_action."' AND cod_user_chamilo='".$user_id."';";
$res = Database::query($sql);
$row = Database::fetch_assoc($res);
if ($row['cod']=='' || $row['cod']==0) {
return 'No sincronizado con acción formativa';
} else {
$sql = "SELECT COUNT(*) AS num FROM $tableSepeParticipantsSpecialty WHERE cod_participant='".$row['cod']."';";
$res = Database::query($sql);
$tmp = Database::fetch_assoc($res);
$resultado = $tmp['num'];
return $resultado;
}
}
*/

@ -0,0 +1,118 @@
<?php
/* For license terms, see /license.txt */
/**
* Plugin class for the SEPE plugin
* @package chamilo.plugin.sepe
* @author Jose Angel Ruiz <jaruiz@nosolored.com>
* @author Julio Montoya <gugli100@gmail.com>
*/
class SepePlugin extends Plugin
{
const TABLE_SEPE_CENTER = 'plugin_sepe_center';
const TABLE_SEPE_ACTIONS = 'plugin_sepe_actions';
const TABLE_SEPE_SPECIALTY = 'plugin_sepe_specialty';
const TABLE_SEPE_SPECIALTY_CLASSROOM = 'plugin_sepe_specialty_classroom';
const TABLE_SEPE_CENTROS = 'plugin_sepe_centros';
const TABLE_SEPE_TUTORS = 'plugin_sepe_tutors';
const TABLE_SEPE_SPECIALTY_TUTORS = 'plugin_sepe_specialty_tutors';
const TABLE_SEPE_PARTICIPANTS = 'plugin_sepe_participants';
const TABLE_SEPE_PARTICIPANTS_SPECIALTY = 'plugin_sepe_participants_specialty';
const TABLE_SEPE_PARTICIPANTS_SPECIALTY_TUTORIALS = 'plugin_sepe_participants_specialty_tutorials';
const TABLE_SEPE_COURSE_ACTIONS = 'plugin_sepe_course_actions';
const TABLE_SEPE_TUTORS_EMPRESA = 'plugin_sepe_tutors_empresa';
const TABLE_SEPE_COMPETENCIA_DOCENTE = 'plugin_sepe_competencia_docente';
const TABLE_SEPE_LOG_PARTICIPANT = 'plugin_sepe_log_participant';
const TABLE_SEPE_LOG_MOD_PARTICIPANT = 'plugin_sepe_log_mod_participant';
const TABLE_SEPE_LOG = 'plugin_sepe_log';
public $isAdminPlugin = true;
/**
*
* @return StaticPlugin
*/
public static function create()
{
static $result = null;
return $result ? $result : $result = new self();
}
protected function __construct()
{
parent::__construct(
'1.0',
'
Jose Angel Ruiz - NoSoloRed (original author) <br>
Julio Montoya (SOAP integration)
',
array('sepe_enable' => 'boolean')
);
}
/**
* This method creates the tables required to this plugin
*/
function install()
{
$tablesToBeCompared = array(
self::TABLE_SEPE_CENTER,
self::TABLE_SEPE_ACTIONS,
self::TABLE_SEPE_SPECIALTY,
self::TABLE_SEPE_SPECIALTY_CLASSROOM,
self::TABLE_SEPE_CENTROS,
self::TABLE_SEPE_TUTORS,
self::TABLE_SEPE_SPECIALTY_TUTORS,
self::TABLE_SEPE_PARTICIPANTS,
self::TABLE_SEPE_PARTICIPANTS_SPECIALTY,
self::TABLE_SEPE_PARTICIPANTS_SPECIALTY_TUTORIALS,
self::TABLE_SEPE_COURSE_ACTIONS,
self::TABLE_SEPE_TUTORS_EMPRESA,
self::TABLE_SEPE_COMPETENCIA_DOCENTE,
self::TABLE_SEPE_LOG_PARTICIPANT,
self::TABLE_SEPE_LOG_MOD_PARTICIPANT,
self::TABLE_SEPE_LOG
);
$em = Database::getManager();
$cn = $em->getConnection();
$sm = $cn->getSchemaManager();
$tables = $sm->tablesExist($tablesToBeCompared);
if ($tables) {
return false;
}
require_once api_get_path(SYS_PLUGIN_PATH) . 'sepe/database.php';
}
/**
* This method drops the plugin tables
*/
function uninstall()
{
$tablesToBeDeleted = array(
self::TABLE_SEPE_CENTER,
self::TABLE_SEPE_SPECIALTY_CLASSROOM,
self::TABLE_SEPE_CENTROS,
self::TABLE_SEPE_TUTORS,
self::TABLE_SEPE_SPECIALTY_TUTORS,
self::TABLE_SEPE_PARTICIPANTS_SPECIALTY_TUTORIALS,
self::TABLE_SEPE_PARTICIPANTS_SPECIALTY,
self::TABLE_SEPE_COURSE_ACTIONS,
self::TABLE_SEPE_PARTICIPANTS,
self::TABLE_SEPE_TUTORS_EMPRESA,
self::TABLE_SEPE_SPECIALTY,
self::TABLE_SEPE_ACTIONS,
self::TABLE_SEPE_COMPETENCIA_DOCENTE,
self::TABLE_SEPE_LOG_PARTICIPANT,
self::TABLE_SEPE_LOG_MOD_PARTICIPANT,
self::TABLE_SEPE_LOG
);
foreach ($tablesToBeDeleted as $tableToBeDeleted) {
$table = Database::get_main_table($tableToBeDeleted);
$sql = "DROP TABLE IF EXISTS $table";
Database::query($sql);
}
$this->manageTab(false);
}
}

@ -0,0 +1,200 @@
<?php
/**
* soap-server-wsse.php
*
* Copyright (c) 2007, Robert Richards <rrichards@ctindustries.net>.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* * Neither the name of Robert Richards nor the names of his
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* @author Robert Richards <rrichards@ctindustries.net>
* @copyright 2007 Robert Richards <rrichards@ctindustries.net>
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
* @version 1.0.0
*/
require('xmlseclibs.php');
class WSSESoapServer {
const WSSENS = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd';
const WSSENS_2003 = 'http://schemas.xmlsoap.org/ws/2003/06/secext';
const WSUNS = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd';
const WSSEPFX = 'wsse';
const WSUPFX = 'wsu';
private $soapNS, $soapPFX;
private $soapDoc = NULL;
private $envelope = NULL;
private $SOAPXPath = NULL;
private $secNode = NULL;
public $signAllHeaders = FALSE;
private function locateSecurityHeader($setActor=NULL) {
$wsNamespace = NULL;
if ($this->secNode == NULL) {
$secnode = NULL;
$headers = $this->SOAPXPath->query('//wssoap:Envelope/wssoap:Header');
if ($header = $headers->item(0)) {
$secnodes = $this->SOAPXPath->query('./*[local-name()="Security"]', $header);
foreach ($secnodes AS $node) {
$nsURI = $node->namespaceURI;
if (($nsURI == self::WSSENS) || ($nsURI == self::WSSENS_2003)) {
$actor = $node->getAttributeNS($this->soapNS, 'actor');
if (empty($actor) || ($actor == $setActor)) {
$secnode = $node;
$wsNamespace = $nsURI;
break;
}
}
}
}
$this->secNode = $secnode;
}
return $wsNamespace;
}
public function __construct($doc)
{
$this->soapDoc = $doc;
$this->envelope = $doc->documentElement;
$this->soapNS = $this->envelope->namespaceURI;
$this->soapPFX = $this->envelope->prefix;
$this->SOAPXPath = new DOMXPath($doc);
$this->SOAPXPath->registerNamespace('wssoap', $this->soapNS);
$this->SOAPXPath->registerNamespace('wswsu', WSSESoapServer::WSUNS);
$wsNamespace = $this->locateSecurityHeader();
if (!empty($wsNamespace)) {
$this->SOAPXPath->registerNamespace('wswsse', $wsNamespace);
}
}
public function processSignature($refNode)
{
$objXMLSecDSig = new XMLSecurityDSig();
$objXMLSecDSig->idKeys[] = 'wswsu:Id';
$objXMLSecDSig->idNS['wswsu'] = WSSESoapServer::WSUNS;
$objXMLSecDSig->sigNode = $refNode;
/* Canonicalize the signed info */
$objXMLSecDSig->canonicalizeSignedInfo();
$retVal = $objXMLSecDSig->validateReference();
if (! $retVal) {
throw new Exception("Validation Failed");
}
$key = NULL;
$objKey = $objXMLSecDSig->locateKey();
if ($objKey) {
if ($objKeyInfo = XMLSecEnc::staticLocateKeyInfo($objKey, $refNode)) {
/* Handle any additional key processing such as encrypted keys here */
}
}
if (empty($objKey)) {
throw new Exception("Error loading key to handle Signature");
}
do {
if (empty($objKey->key)) {
$this->SOAPXPath->registerNamespace('xmlsecdsig', XMLSecurityDSig::XMLDSIGNS);
$query = "./xmlsecdsig:KeyInfo/wswsse:SecurityTokenReference/wswsse:Reference";
$nodeset = $this->SOAPXPath->query($query, $refNode);
if ($encmeth = $nodeset->item(0)) {
if ($uri = $encmeth->getAttribute("URI")) {
$arUrl = parse_url($uri);
if (empty($arUrl['path']) && ($identifier = $arUrl['fragment'])) {
$query = '//wswsse:BinarySecurityToken[@wswsu:Id="'.$identifier.'"]';
$nodeset = $this->SOAPXPath->query($query);
if ($encmeth = $nodeset->item(0)) {
$x509cert = $encmeth->textContent;
$x509cert = str_replace(array("\r", "\n"), "", $x509cert);
$x509cert = "-----BEGIN CERTIFICATE-----\n".chunk_split($x509cert, 64, "\n")."-----END CERTIFICATE-----\n";
$objKey->loadKey($x509cert);
break;
}
}
}
}
throw new Exception("Error loading key to handle Signature");
}
} while(0);
if (! $objXMLSecDSig->verify($objKey)) {
throw new Exception("Unable to validate Signature");
}
return true;
}
public function process()
{
if (empty($this->secNode)) {
return;
}
$node = $this->secNode->firstChild;
while ($node) {
$nextNode = $node->nextSibling;
switch ($node->localName) {
case "Signature":
if ($this->processSignature($node)) {
if ($node->parentNode) {
$node->parentNode->removeChild($node);
}
} else {
/* throw fault */
return false;
}
}
$node = $nextNode;
}
$this->secNode->parentNode->removeChild($this->secNode);
$this->secNode = NULL;
return true;
}
public function saveXML()
{
return $this->soapDoc->saveXML();
}
public function save($file)
{
return $this->soapDoc->save($file);
}
}

@ -0,0 +1,152 @@
<?php
/**
* soap-wsa.php
*
* Copyright (c) 2007, Robert Richards <rrichards@ctindustries.net>.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* * Neither the name of Robert Richards nor the names of his
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* @author Robert Richards <rrichards@ctindustries.net>
* @copyright 2007 Robert Richards <rrichards@ctindustries.net>
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
* @version 1.0.0
*/
class WSASoap {
const WSANS = 'http://schemas.xmlsoap.org/ws/2004/08/addressing';
const WSAPFX = 'wsa';
private $soapNS, $soapPFX;
private $soapDoc = NULL;
private $envelope = NULL;
private $SOAPXPath = NULL;
private $header = NULL;
private $messageID = NULL;
private function locateHeader() {
if ($this->header == NULL) {
$headers = $this->SOAPXPath->query('//wssoap:Envelope/wssoap:Header');
$header = $headers->item(0);
if (! $header) {
$header = $this->soapDoc->createElementNS($this->soapNS, $this->soapPFX.':Header');
$this->envelope->insertBefore($header, $this->envelope->firstChild);
}
$this->header = $header;
}
return $this->header;
}
public function __construct($doc) {
$this->soapDoc = $doc;
$this->envelope = $doc->documentElement;
$this->soapNS = $this->envelope->namespaceURI;
$this->soapPFX = $this->envelope->prefix;
$this->SOAPXPath = new DOMXPath($doc);
$this->SOAPXPath->registerNamespace('wssoap', $this->soapNS);
$this->SOAPXPath->registerNamespace('wswsa', WSASoap::WSANS);
$this->envelope->setAttributeNS("http://www.w3.org/2000/xmlns/", 'xmlns:'.WSASoap::WSAPFX, WSASoap::WSANS);
$this->locateHeader();
}
public function addAction($action) {
/* Add the WSA Action */
$header = $this->locateHeader();
$nodeAction = $this->soapDoc->createElementNS(WSASoap::WSANS, WSASoap::WSAPFX.':Action', $action);
$header->appendChild($nodeAction);
}
public function addTo($location) {
/* Add the WSA To */
$header = $this->locateHeader();
$nodeTo = $this->soapDoc->createElementNS(WSASoap::WSANS, WSASoap::WSAPFX.':To', $location);
$header->appendChild($nodeTo);
}
private function createID() {
$uuid = md5(uniqid(rand(), true));
$guid = 'uudi:'.substr($uuid,0,8)."-".
substr($uuid,8,4)."-".
substr($uuid,12,4)."-".
substr($uuid,16,4)."-".
substr($uuid,20,12);
return $guid;
}
public function addMessageID($id=NULL) {
/* Add the WSA MessageID or return existing ID */
if (! is_null($this->messageID)) {
return $this->messageID;
}
if (empty($id)) {
$id = $this->createID();
}
$header = $this->locateHeader();
$nodeID = $this->soapDoc->createElementNS(WSASoap::WSANS, WSASoap::WSAPFX.':MessageID', $id);
$header->appendChild($nodeID);
$this->messageID = $id;
}
public function addReplyTo($address = NULL) {
/* Create Message ID is not already added - required for ReplyTo */
if (is_null($this->messageID)) {
$this->addMessageID();
}
/* Add the WSA ReplyTo */
$header = $this->locateHeader();
$nodeReply = $this->soapDoc->createElementNS(WSASoap::WSANS, WSASoap::WSAPFX.':ReplyTo');
$header->appendChild($nodeReply);
if (empty($address)) {
$address = 'http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous';
}
$nodeAddress = $this->soapDoc->createElementNS(WSASoap::WSANS, WSASoap::WSAPFX.':Address', $address);
$nodeReply->appendChild($nodeAddress);
}
public function getDoc() {
return $this->soapDoc;
}
public function saveXML() {
return $this->soapDoc->saveXML();
}
public function save($file) {
return $this->soapDoc->save($file);
}
}

@ -0,0 +1,497 @@
<?php
/**
* soap-wsse.php
*
* Copyright (c) 2010, Robert Richards <rrichards@ctindustries.net>.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* * Neither the name of Robert Richards nor the names of his
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* @author Robert Richards <rrichards@ctindustries.net>
* @copyright 2007-2010 Robert Richards <rrichards@ctindustries.net>
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
* @version 1.1.0-dev
*/
require('xmlseclibs.php');
class WSSESoap {
const WSSENS = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd';
const WSUNS = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd';
const WSUNAME = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0';
const WSSEPFX = 'wsse';
const WSUPFX = 'wsu';
private $soapNS, $soapPFX;
private $soapDoc = NULL;
private $envelope = NULL;
private $SOAPXPath = NULL;
private $secNode = NULL;
public $signAllHeaders = FALSE;
private function locateSecurityHeader($bMustUnderstand = TRUE, $setActor = NULL) {
if ($this->secNode == NULL) {
$headers = $this->SOAPXPath->query('//wssoap:Envelope/wssoap:Header');
$header = $headers->item(0);
if (! $header) {
$header = $this->soapDoc->createElementNS($this->soapNS, $this->soapPFX.':Header');
$this->envelope->insertBefore($header, $this->envelope->firstChild);
}
$secnodes = $this->SOAPXPath->query('./wswsse:Security', $header);
$secnode = NULL;
foreach ($secnodes AS $node) {
$actor = $node->getAttributeNS($this->soapNS, 'actor');
if ($actor == $setActor) {
$secnode = $node;
break;
}
}
if (! $secnode) {
$secnode = $this->soapDoc->createElementNS(WSSESoap::WSSENS, WSSESoap::WSSEPFX.':Security');
///if (isset($secnode) && !empty($secnode)) {
$header->appendChild($secnode);
//}
if ($bMustUnderstand) {
$secnode->setAttributeNS($this->soapNS, $this->soapPFX.':mustUnderstand', '1');
}
if (! empty($setActor)) {
$ename = 'actor';
if ($this->soapNS == 'http://www.w3.org/2003/05/soap-envelope') {
$ename = 'role';
}
$secnode->setAttributeNS($this->soapNS, $this->soapPFX.':'.$ename, $setActor);
}
}
$this->secNode = $secnode;
}
return $this->secNode;
}
public function __construct($doc, $bMustUnderstand = TRUE, $setActor=NULL) {
$this->soapDoc = $doc;
$this->envelope = $doc->documentElement;
$this->soapNS = $this->envelope->namespaceURI;
$this->soapPFX = $this->envelope->prefix;
$this->SOAPXPath = new DOMXPath($doc);
$this->SOAPXPath->registerNamespace('wssoap', $this->soapNS);
$this->SOAPXPath->registerNamespace('wswsse', WSSESoap::WSSENS);
$this->locateSecurityHeader($bMustUnderstand, $setActor);
}
public function addTimestamp($secondsToExpire=3600) {
/* Add the WSU timestamps */
$security = $this->locateSecurityHeader();
$timestamp = $this->soapDoc->createElementNS(WSSESoap::WSUNS, WSSESoap::WSUPFX.':Timestamp');
$security->insertBefore($timestamp, $security->firstChild);
$currentTime = time();
$created = $this->soapDoc->createElementNS(WSSESoap::WSUNS, WSSESoap::WSUPFX.':Created', gmdate("Y-m-d\TH:i:s", $currentTime).'Z');
$timestamp->appendChild($created);
if (! is_null($secondsToExpire)) {
$expire = $this->soapDoc->createElementNS(WSSESoap::WSUNS, WSSESoap::WSUPFX.':Expires', gmdate("Y-m-d\TH:i:s", $currentTime + $secondsToExpire).'Z');
$timestamp->appendChild($expire);
}
}
public function addUserToken($userName, $password=NULL, $passwordDigest=FALSE) {
if ($passwordDigest && empty($password)) {
throw new Exception("Cannot calculate the digest without a password");
}
$security = $this->locateSecurityHeader();
$token = $this->soapDoc->createElementNS(WSSESoap::WSSENS, WSSESoap::WSSEPFX.':UsernameToken');
$security->insertBefore($token, $security->firstChild);
$username = $this->soapDoc->createElementNS(WSSESoap::WSSENS, WSSESoap::WSSEPFX.':Username', $userName);
$token->appendChild($username);
/* Generate nonce - create a 256 bit session key to be used */
$objKey = new XMLSecurityKey(XMLSecurityKey::AES256_CBC);
$nonce = $objKey->generateSessionKey();
unset($objKey);
$createdate = gmdate("Y-m-d\TH:i:s").'Z';
if ($password) {
$passType = WSSESoap::WSUNAME.'#PasswordText';
if ($passwordDigest) {
$password = base64_encode(sha1($nonce.$createdate. $password, true));
$passType = WSSESoap::WSUNAME.'#PasswordDigest';
}
$passwordNode = $this->soapDoc->createElementNS(WSSESoap::WSSENS, WSSESoap::WSSEPFX.':Password', $password);
$token->appendChild($passwordNode);
$passwordNode->setAttribute('Type', $passType);
}
$nonceNode = $this->soapDoc->createElementNS(WSSESoap::WSSENS, WSSESoap::WSSEPFX.':Nonce', base64_encode($nonce));
$token->appendChild($nonceNode);
$created = $this->soapDoc->createElementNS(WSSESoap::WSUNS, WSSESoap::WSUPFX.':Created', $createdate);
$token->appendChild($created);
}
public function addBinaryToken($cert, $isPEMFormat=TRUE, $isDSig=TRUE) {
$security = $this->locateSecurityHeader();
$data = XMLSecurityDSig::get509XCert($cert, $isPEMFormat);
$token = $this->soapDoc->createElementNS(WSSESoap::WSSENS, WSSESoap::WSSEPFX.':BinarySecurityToken', $data);
$security->insertBefore($token, $security->firstChild);
$token->setAttribute('EncodingType', 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary');
$token->setAttributeNS(WSSESoap::WSUNS, WSSESoap::WSUPFX.':Id', XMLSecurityDSig::generate_GUID());
$token->setAttribute('ValueType', 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3');
return $token;
}
public function attachTokentoSig($token) {
if (! ($token instanceof DOMElement)) {
throw new Exception('Invalid parameter: BinarySecurityToken element expected');
}
$objXMLSecDSig = new XMLSecurityDSig();
if ($objDSig = $objXMLSecDSig->locateSignature($this->soapDoc)) {
$tokenURI = '#'.$token->getAttributeNS(WSSESoap::WSUNS, "Id");
$this->SOAPXPath->registerNamespace('secdsig', XMLSecurityDSig::XMLDSIGNS);
$query = "./secdsig:KeyInfo";
$nodeset = $this->SOAPXPath->query($query, $objDSig);
$keyInfo = $nodeset->item(0);
if (! $keyInfo) {
$keyInfo = $objXMLSecDSig->createNewSignNode('KeyInfo');
$objDSig->appendChild($keyInfo);
}
$tokenRef = $this->soapDoc->createElementNS(WSSESoap::WSSENS, WSSESoap::WSSEPFX.':SecurityTokenReference');
$keyInfo->appendChild($tokenRef);
$reference = $this->soapDoc->createElementNS(WSSESoap::WSSENS, WSSESoap::WSSEPFX.':Reference');
$reference->setAttribute("URI", $tokenURI);
$tokenRef->appendChild($reference);
} else {
throw new Exception('Unable to locate digital signature');
}
}
public function signSoapDoc($objKey, $options = NULL) {
$objDSig = new XMLSecurityDSig();
$objDSig->setCanonicalMethod(XMLSecurityDSig::EXC_C14N);
$arNodes = array();
foreach ($this->secNode->childNodes AS $node) {
if ($node->nodeType == XML_ELEMENT_NODE) {
$arNodes[] = $node;
}
}
if ($this->signAllHeaders) {
foreach ($this->secNode->parentNode->childNodes AS $node) {
if (($node->nodeType == XML_ELEMENT_NODE) &&
($node->namespaceURI != WSSESoap::WSSENS)) {
$arNodes[] = $node;
}
}
}
foreach ($this->envelope->childNodes AS $node) {
if ($node->namespaceURI == $this->soapNS && $node->localName == 'Body') {
$arNodes[] = $node;
break;
}
}
$algorithm = XMLSecurityDSig::SHA1;
if (is_array($options) && isset($options["algorithm"])) {
$algorithm = $options["algorithm"];
}
$arOptions = array('prefix'=>WSSESoap::WSUPFX, 'prefix_ns'=>WSSESoap::WSUNS);
$objDSig->addReferenceList($arNodes, $algorithm, NULL, $arOptions);
$objDSig->sign($objKey);
$insertTop = TRUE;
if (is_array($options) && isset($options["insertBefore"])) {
$insertTop = (bool)$options["insertBefore"];
}
$objDSig->appendSignature($this->secNode, $insertTop);
/* New suff */
if (is_array($options)) {
if (! empty($options["KeyInfo"]) ) {
if (! empty($options["KeyInfo"]["X509SubjectKeyIdentifier"])) {
$sigNode = $this->secNode->firstChild->nextSibling;
$objDoc = $sigNode->ownerDocument;
$keyInfo = $sigNode->ownerDocument->createElementNS(XMLSecurityDSig::XMLDSIGNS, 'ds:KeyInfo');
$sigNode->appendChild($keyInfo);
$tokenRef = $objDoc->createElementNS(WSSESoap::WSSENS, WSSESoap::WSSEPFX . ':SecurityTokenReference');
$keyInfo->appendChild($tokenRef);
$reference = $objDoc->createElementNS(WSSESoap::WSSENS, WSSESoap::WSSEPFX . ':KeyIdentifier');
$reference->setAttribute("ValueType", "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509SubjectKeyIdentifier");
$reference->setAttribute("EncodingType", "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary");
$tokenRef->appendChild($reference);
$x509 = openssl_x509_parse($objKey->getX509Certificate());
$keyid = $x509["extensions"]["subjectKeyIdentifier"];
$arkeyid = split(":", $keyid);
$data = "";
foreach ($arkeyid AS $hexchar) {
$data .= chr(hexdec($hexchar));
}
$dataNode = new DOMText(base64_encode($data));
$reference->appendChild($dataNode);
}
}
}
}
public function addEncryptedKey($node, $key, $token, $options = NULL) {
if (! $key->encKey) {
return FALSE;
}
$encKey = $key->encKey;
$security = $this->locateSecurityHeader();
$doc = $security->ownerDocument;
if (! $doc->isSameNode($encKey->ownerDocument)) {
$key->encKey = $security->ownerDocument->importNode($encKey, TRUE);
$encKey = $key->encKey;
}
if (! empty($key->guid)) {
return TRUE;
}
$lastToken = NULL;
$findTokens = $security->firstChild;
while ($findTokens) {
if ($findTokens->localName == 'BinarySecurityToken') {
$lastToken = $findTokens;
}
$findTokens = $findTokens->nextSibling;
}
if ($lastToken) {
$lastToken = $lastToken->nextSibling;
}
$security->insertBefore($encKey, $lastToken);
$key->guid = XMLSecurityDSig::generate_GUID();
$encKey->setAttribute('Id', $key->guid);
$encMethod = $encKey->firstChild;
while ($encMethod && $encMethod->localName != 'EncryptionMethod') {
$encMethod = $encMethod->nextChild;
}
if ($encMethod) {
$encMethod = $encMethod->nextSibling;
}
$objDoc = $encKey->ownerDocument;
$keyInfo = $objDoc->createElementNS('http://www.w3.org/2000/09/xmldsig#', 'dsig:KeyInfo');
$encKey->insertBefore($keyInfo, $encMethod);
$tokenRef = $objDoc->createElementNS(WSSESoap::WSSENS, WSSESoap::WSSEPFX.':SecurityTokenReference');
$keyInfo->appendChild($tokenRef);
/* New suff */
if (is_array($options)) {
if (! empty($options["KeyInfo"]) ) {
if (! empty($options["KeyInfo"]["X509SubjectKeyIdentifier"])) {
$reference = $objDoc->createElementNS(WSSESoap::WSSENS, WSSESoap::WSSEPFX . ':KeyIdentifier');
$reference->setAttribute("ValueType", "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509SubjectKeyIdentifier");
$reference->setAttribute("EncodingType", "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary");
$tokenRef->appendChild($reference);
$x509 = openssl_x509_parse($token->getX509Certificate());
$keyid = $x509["extensions"]["subjectKeyIdentifier"];
$arkeyid = split(":", $keyid);
$data = "";
foreach ($arkeyid AS $hexchar) {
$data .= chr(hexdec($hexchar));
}
$dataNode = new DOMText(base64_encode($data));
$reference->appendChild($dataNode);
return TRUE;
}
}
}
$tokenURI = '#'.$token->getAttributeNS(WSSESoap::WSUNS, "Id");
$reference = $objDoc->createElementNS(WSSESoap::WSSENS, WSSESoap::WSSEPFX.':Reference');
$reference->setAttribute("URI", $tokenURI);
$tokenRef->appendChild($reference);
return TRUE;
}
public function AddReference($baseNode, $guid) {
$refList = NULL;
$child = $baseNode->firstChild;
while($child) {
if (($child->namespaceURI == XMLSecEnc::XMLENCNS) && ($child->localName == 'ReferenceList')) {
$refList = $child;
break;
}
$child = $child->nextSibling;
}
$doc = $baseNode->ownerDocument;
if (is_null($refList)) {
$refList = $doc->createElementNS(XMLSecEnc::XMLENCNS, 'xenc:ReferenceList');
$baseNode->appendChild($refList);
}
$dataref = $doc->createElementNS(XMLSecEnc::XMLENCNS, 'xenc:DataReference');
$refList->appendChild($dataref);
$dataref->setAttribute('URI', '#'.$guid);
}
public function EncryptBody($siteKey, $objKey, $token) {
$enc = new XMLSecEnc();
foreach ($this->envelope->childNodes AS $node) {
if ($node->namespaceURI == $this->soapNS && $node->localName == 'Body') {
break;
}
}
$enc->setNode($node);
/* encrypt the symmetric key */
$enc->encryptKey($siteKey, $objKey, FALSE);
$enc->type = XMLSecEnc::Content;
/* Using the symmetric key to actually encrypt the data */
$encNode = $enc->encryptNode($objKey);
$guid = XMLSecurityDSig::generate_GUID();
$encNode->setAttribute('Id', $guid);
$refNode = $encNode->firstChild;
while($refNode && $refNode->nodeType != XML_ELEMENT_NODE) {
$refNode = $refNode->nextSibling;
}
if ($refNode) {
$refNode = $refNode->nextSibling;
}
if ($this->addEncryptedKey($encNode, $enc, $token)) {
$this->AddReference($enc->encKey, $guid);
}
}
public function encryptSoapDoc($siteKey, $objKey, $options=NULL, $encryptSignature=TRUE) {
$enc = new XMLSecEnc();
$xpath = new DOMXPath($this->envelope->ownerDocument);
if ($encryptSignature == FALSE) {
$nodes = $xpath->query('//*[local-name()="Body"]');
} else {
$nodes = $xpath->query('//*[local-name()="Signature"] | //*[local-name()="Body"]');
}
foreach ($nodes AS $node) {
$type = XMLSecEnc::Element;
$name = $node->localName;
if ($name == "Body") {
$type = XMLSecEnc::Content;
}
$enc->addReference($name, $node, $type);
}
$enc->encryptReferences($objKey);
$enc->encryptKey($siteKey, $objKey, false);
$nodes = $xpath->query('//*[local-name()="Security"]');
$signode = $nodes->item(0);
$this->addEncryptedKey($signode, $enc, $siteKey, $options);
}
public function decryptSoapDoc($doc, $options) {
$privKey = NULL;
$privKey_isFile = FALSE;
$privKey_isCert = FALSE;
if (is_array($options)) {
$privKey = (! empty($options["keys"]["private"]["key"]) ? $options["keys"]["private"]["key"] : NULL);
$privKey_isFile = (! empty($options["keys"]["private"]["isFile"]) ? TRUE : FALSE);
$privKey_isCert = (! empty($options["keys"]["private"]["isCert"]) ? TRUE : FALSE);
}
$objenc = new XMLSecEnc();
$xpath = new DOMXPath($doc);
$envns = $doc->documentElement->namespaceURI;
$xpath->registerNamespace("soapns", $envns);
$xpath->registerNamespace("soapenc", "http://www.w3.org/2001/04/xmlenc#");
$nodes = $xpath->query('/soapns:Envelope/soapns:Header/*[local-name()="Security"]/soapenc:EncryptedKey');
$references = array();
if ($node = $nodes->item(0)) {
$objenc = new XMLSecEnc();
$objenc->setNode($node);
if (! $objKey = $objenc->locateKey()) {
throw new Exception("Unable to locate algorithm for this Encrypted Key");
}
$objKey->isEncrypted = TRUE;
$objKey->encryptedCtx = $objenc;
XMLSecEnc::staticLocateKeyInfo($objKey, $node);
if ($objKey && $objKey->isEncrypted) {
$objencKey = $objKey->encryptedCtx;
$objKey->loadKey($privKey, $privKey_isFile, $privKey_isCert);
$key = $objencKey->decryptKey($objKey);
$objKey->loadKey($key);
}
$refnodes = $xpath->query('./soapenc:ReferenceList/soapenc:DataReference/@URI', $node);
foreach ($refnodes as $reference) {
$references[] = $reference->nodeValue;
}
}
foreach ($references AS $reference) {
$arUrl = parse_url($reference);
$reference = $arUrl['fragment'];
$query = '//*[@Id="'.$reference.'"]';
$nodes = $xpath->query($query);
$encData = $nodes->item(0);
if ($algo = $xpath->evaluate("string(./soapenc:EncryptionMethod/@Algorithm)", $encData)) {
$objKey = new XMLSecurityKey($algo);
$objKey->loadKey($key);
}
$objenc->setNode($encData);
$objenc->type = $encData->getAttribute("Type");
$decrypt = $objenc->decryptNode($objKey, TRUE);
}
return TRUE;
}
public function saveXML() {
return $this->soapDoc->saveXML();
}
public function save($file) {
return $this->soapDoc->save($file);
}
}

File diff suppressed because it is too large Load Diff

@ -0,0 +1,13 @@
<?php
/* For license terms, see /license.txt */
/**
* This script is included by main/admin/settings.lib.php when unselecting a plugin
* and is meant to remove things installed by the install.php script in both
* the global database and the courses tables
* @package chamilo.plugin.sepe
*/
/**
* Queries
*/
require_once dirname(__FILE__) . '/config.php';
SepePlugin::create()->uninstall();

@ -0,0 +1,267 @@
<script type='text/javascript' src="../js/sepe.js"></script>
<link rel="stylesheet" type="text/css" href="../resources/plugin.css"/>
<div class="row">
<div class="col-md-3">
<div id="course_category_well" class="well">
<ul class="nav nav-list">
<li class="nav-header"><h3>Opciones:</h3></li>
<li class="sepe_editar_link">
<a href="editar-accion-formativa.php?cod_action={{ cod_action }}">Editar acción</a>
</li>
<li class="sepe_borrar_link">
<input type="hidden" id="cod_action" value="{{ cod_action }}" />
<a href="borrar-accion-formativa.php" id="borrar_accion_formativa">Borrar acción</a>
</li>
<li class="sepe_listado_link">
<a href="listado-acciones-formativas.php">Listado acciones</a>
</li>
</ul>
</div>
</div>
<div class="col-md-9">
{% if message_info != "" %}
<div class="alert alert-success">
{{ message_info }}
</div>
{% endif %}
{% if message_error != "" %}
<div class="alert alert-danger">
{{ message_error }}
</div>
{% endif %}
<div class="well_border">
<form class="form-horizontal">
<fieldset>
<legend>Acción Formativa:</legend>
{% if info != false %}
<div class="well subcampo">
<legend class="subcampo">IDENTIFICADOR DE ACCIÓN (ID_ACCION): </legend>
<div class="form-group">
<label class="control-label col-sm-3">Origen de la acción:</label>
<div class="col-sm-9">
<label class="campo_texto">{{ info.ORIGEN_ACCION }}</label>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">Código de la acción: </label>
<div class="col-sm-9">
<label class="campo_texto">{{ info.CODIGO_ACCION }}</label>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">Situación: </label>
<div class="col-sm-9">
<label class="campo_texto">
{% if info.SITUACION == "10" %}
10-Solicitada Autorización
{% endif %}
{% if info.SITUACION == "20" %}
20-Programada/Autorizada
{% endif %}
{% if info.SITUACION == "30" %}
30-Iniciada
{% endif %}
{% if info.SITUACION == "40" %}
40-Finalizada
{% endif %}
{% if info.SITUACION == "50" %}
50-Cancelada
{% endif %}
</label>
</div>
</div>
<div class="well subcampo">
<legend class="subcampo">IDENTIFICADOR DE ESPECIALIDAD PRINCIPAL</legend>
<div class="form-group">
<label class="control-label col-sm-3">Origen de especialidad: </label>
<div class="col-sm-9">
<label class="campo_texto">{{ info.ORIGEN_ESPECIALIDAD }}</label>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">Área profesional: </label>
<div class="col-sm-9">
<label class="campo_texto">{{ info.AREA_PROFESIONAL }}</label>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">Código de Especialidad: </label>
<div class="col-sm-9">
<label class="campo_texto">{{ info.CODIGO_ESPECIALIDAD }}</label>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">Duración: </label>
<div class="col-sm-9">
<label class="campo_texto">
{% if info.DURACION > 0 %}
{{ info.DURACION }}
{% else %}
<i>Sin especificar</i>
{% endif %}
</label>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">Fecha de inicio: </label>
<div class="col-sm-9">
<label class="campo_texto">
{% if info.FECHA_INICIO == "0000-00-00" %}
<i>Sin especificar</i>
{% else %}
{{ fecha_start }}
{% endif %}
</label>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">Fecha de fin: </label>
<div class="col-sm-9">
<label class="campo_texto">
{% if info.FECHA_FIN == "0000-00-00" %}
<i>Sin especificar</i>
{% else %}
{{ fecha_end }}
{% endif %}
</label>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">Indicador de itinerario completo: </label>
<div class="col-sm-9">
<label class="campo_texto">{{ info.IND_ITINERARIO_COMPLETO }}</label>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">Tipo de Financiación: </label>
<div class="col-sm-9">
<label class="campo_texto">
{% if info.TIPO_FINANCIACION == "PU" %}
Pública
{% endif %}
{% if info.TIPO_FINANCIACION == "PR" %}
Privada
{% endif %}
{% if info.TIPO_FINANCIACION == "" %}
<i>Sin especificar</i>
{% endif %}
</label>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">Número de Asistentes: </label>
<div class="col-sm-9">
<label class="campo_texto">{{ info.NUMERO_ASISTENTES }}</label>
</div>
</div>
<div class="well subcampo">
<legend class="subcampo">DESCRIPCION DE LA ACCION FORMATIVA</legend>
<div class="form-group">
<label class="control-label col-sm-3">Denominación de la Acción: </label>
<div class="col-sm-9">
<label class="campo_texto">{{ info.DENOMINACION_ACCION }}</label>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">Información General: </label>
<div class="col-sm-9">
<label class="campo_texto">{{ info.INFORMACION_GENERAL }}</label>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">Horarios: </label>
<div class="col-sm-9">
<label class="campo_texto">{{ info.HORARIOS }}</label>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">Requisitos: </label>
<div class="col-sm-9">
<label class="campo_texto">{{ info.REQUISITOS }}</label>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">Contacto Acción: </label>
<div class="col-sm-9">
<label class="campo_texto">{{ info.CONTACTO_ACCION }}</label>
</div>
</div>
</div>
{% else %}
<div class="error-message">No hay información de la acción formativa</div>
{% endif %}
</fieldset>
</form>
</div>
<div class="well_border">
<form class="form-horizontal">
<fieldset>
<legend>Especialidades:
<a href="editar-especialidad-accion.php?new_specialty=SI&cod_action={{ cod_action }}" class="btn btn-info pull-right">Crear especialidad</a>
</legend>
{% for specialty in listSpecialty %}
<div class="form-group">
<label class="control-label col-sm-3">Especialidad: </label>
<div class="col-sm-9">
<table width="100%" class="campo_texto">
<tr>
<td>{{ specialty.ORIGEN_ESPECIALIDAD }} {{ specialty.AREA_PROFESIONAL }} {{ specialty.CODIGO_ESPECIALIDAD }}</td>
<td>
<a href="#" class="btn btn-danger btn-sm pull-right mlateral del_specialty" id="specialty{{ specialty.cod }}">Borrar</a>
<a href="editar-especialidad-accion.php?new_specialty=NO&cod_specialty={{ specialty.cod }}&cod_action={{ cod_action }}" class="btn btn-warning btn-sm pull-right mlateral">Editar</a>
</td>
</tr>
</table>
</div>
</div>
{% endfor %}
</fieldset>
</form>
</div>
<div class="well_border">
<form class="form-horizontal">
<fieldset>
<legend>Participantes:
<a href="editar-participante-accion.php?new_participant=SI&cod_action={{ cod_action }}" class="btn btn-info pull-right">Crear participante</a>
</legend>
{% for participant in listParticipant %}
<div class="form-group">
<label class="control-label col-sm-3">Participante: </label>
<div class="col-sm-9">
<table width="100%" class="campo_texto">
<tr>
<td>{{ participant.firstname }} {{ participant.lastname }} </td>
<td>{{ participant.NUM_DOCUMENTO }} {{ participant.LETRA_NIF }} </td>
<td>
<a href="#" class="btn btn-danger btn-sm pull-right mlateral del_participant" id="participant{{ participant.cod }}">Borrar</a>
<a href="editar-participante-accion.php?new_participant=NO&cod_participant={{ participant.cod }}&cod_action={{ cod_action }}" class="btn btn-warning btn-sm pull-right mlateral">Editar</a>
</td>
</tr>
</table>
</div>
</div>
{% endfor %}
</fieldset>
</form>
</div>
</div>
</div>

@ -0,0 +1,40 @@
<script type='text/javascript' src="../js/sepe.js"></script>
<link rel="stylesheet" type="text/css" href="../resources/plugin.css"/>
<div class="row">
<form class="form-horizontal" action="configuracion.php" method="post" name="form_datos_centro">
<div class="col-md-2">&nbsp;</div>
<div class="col-md-8">
{% if message_info != "" %}
<div class="confirmation-message">
{{ message_info }}
</div>
{% endif %}
{% if message_error != "" %}
<div class="error-message">
{{ message_error }}
</div>
{% endif %}
<fieldset>
<legend>Usuario SEPE</legend>
<div class="form-group">
<label class="col-md-2 control-label">Clave API</label>
<div class="col-md-7">
<input class="form-control" type="text" id="input_key" name="api_key" value="{{ info }}" />
</div>
<div class="col-md-3">
<input type="button" id="generar_key_sepe" class="btn btn-info" value="Generar api key" />
</div>
</div>
</fieldset>
</div>
<div class="col-md-2">&nbsp;</div>
</form>
</div>

@ -0,0 +1,95 @@
<script type='text/javascript' src="../js/sepe.js"></script>
<link rel="stylesheet" type="text/css" href="../resources/plugin.css"/>
<div class="row">
<div class="col-md-3">
<div id="course_category_well" class="well">
<ul class="nav nav-list">
<li class="nav-header"><h3>Opciones:</h3></li>
<li class="sepe_editar_link">
<a href="editar-datos-identificativos.php">
{% if info == false %}
Nuevo centro
{% else %}
Editar centro
{% endif %}
</a>
</li>
<li class="sepe_borrar_link">
<a href="borrar-datos-identificativos.php" id="borrar_datos_identificativos">Borrar centro</a>
</li>
</ul>
</div>
</div>
<div class="col-md-9">
{% if message_info != "" %}
<div class="alert alert-success">
{{ message_info }}
</div>
{% endif %}
{% if message_error != "" %}
<div class="alert alert-danger">
{{ message_error }}
</div>
{% endif %}
<div class="well_border">
<form class="form-horizontal">
<fieldset>
<legend>Datos Identificativos del Centro</legend>
{% if info != false %}
<div class="form-group ">
<label class="col-sm-3 control-label">Origen Centro</label>
<div class="col-sm-9">
<label class="campo_texto text-primary">{{ info.origen_centro }}</label>
</div>
</div>
<div class="form-group ">
<label class="col-sm-3 control-label">Código Centro</label>
<div class="col-sm-9">
<label class="campo_texto text-primary">{{ info.codigo_centro }}</label>
</div>
</div>
<div class="form-group ">
<label class="col-sm-3 control-label">Nombre Centro</label>
<div class="col-sm-9">
<label class="campo_texto text-primary">{{ info.nombre_centro }}</label>
</div>
</div>
<div class="form-group ">
<label class="col-sm-3 control-label">URL plataforma</label>
<div class="col-sm-9">
<label class="campo_texto text-primary">{{ info.url }}</label>
</div>
</div>
<div class="form-group ">
<label class="col-sm-3 control-label">URL seguimiento</label>
<div class="col-sm-9">
<label class="campo_texto text-primary">{{ info.url_seguimiento }}</label>
</div>
</div>
<div class="form-group ">
<label class="col-sm-3 control-label">Teléfono</label>
<div class="col-sm-9">
<label class="campo_texto text-primary">{{ info.telefono }}</label>
</div>
</div>
<div class="form-group ">
<label class="col-sm-3 control-label">E-mail</label>
<div class="col-sm-9">
<label class="campo_texto text-primary">{{ info.email }}</label>
</div>
</div>
{% else %}
<div class="alert alert-danger">No hay datos identificativos del centro</div>
{% endif %}
</fieldset>
</form>
</div>
</div>
</div>

@ -0,0 +1,357 @@
<link rel="stylesheet" type="text/css" href="../resources/plugin.css"/>
<div class="row">
<form class="form-horizontal" action="editar-accion-formativa.php" method="post" name="form_datos_centro">
<div class="col-md-3">
<div id="course_category_well" class="well">
<ul class="nav nav-list">
<li class="nav-header"><h3>Acciones:</h3></li>
<li>
{% if new_action == "SI" %}
<input type="hidden" name="cod_action" value="NO" />
<input type="hidden" name="id_course" value="{{ id_course }}" />
{% else %}
<input type="hidden" name="cod_action" value="{{ info.cod }}" />
{% endif %}
<input class="btn btn-primary btn_menu_lateral" type="submit" value="Guardar cambios" />
</li>
<li>
<input class="btn btn-warning btn_menu_lateral" type="reset" value="Restablecer" />
</li>
</ul>
</div>
</div>
<div class="col-md-9">
{% if rmessage == "YES" %}
<div class="{{ class }}">
{{ responseMessage }}
</div>
{% endif %}
<div class="well_border">
<fieldset>
<legend>Acción Formativa</legend>
<div class="well subcampo">
<legend class="subcampo">IDENTIFICADOR DE ACCIÓN (ID_ACCION): </legend>
<div class="form-group">
<label class="col-md-3 control-label">Origen de la acción: </label>
<div class="col-md-2">
<input class="form-control" type="text" name="ORIGEN_ACCION" value="{{ info.ORIGEN_ACCION }}" />
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Código de la acción: </label>
<div class="col-md-2">
<input class="form-control" type="text" name="CODIGO_ACCION" value="{{ info.CODIGO_ACCION }}" />
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Situación: </label>
<div class="col-md-9">
<select name="SITUACION" class="form-control">
<option value=""></option>
{% if info.SITUACION == "10" %}
<option value="10" selected="selected">10-Solicitada Autorización</option>
{% else %}
<option value="10">10-Solicitada Autorización</option>
{% endif %}
{% if info.SITUACION == "20" %}
<option value="20" selected="selected">20-Programada/Autorizada</option>
{% else %}
<option value="20">20-Programada/Autorizada</option>
{% endif %}
{% if info.SITUACION == "30" %}
<option value="30" selected="selected">30-Iniciada</option>
{% else %}
<option value="30">30-Iniciada</option>
{% endif %}
{% if info.SITUACION == "40" %}
<option value="40" selected="selected">40-Finalizada</option>
{% else %}
<option value="40">40-Finalizada</option>
{% endif %}
{% if info.SITUACION == "50" %}
<option value="50" selected="selected">50-Cancelada</option>
{% else %}
<option value="50">50-Cancelada</option>
{% endif %}
</select>
</div>
</div>
<div class="well subcampo">
<legend class="subcampo">IDENTIFICADOR DE ESPECIALIDAD PRINCIPAL</legend>
<div class="form-group">
<label class="col-md-3 control-label">Origen de especialidad: </label>
<div class="col-md-9">
<input class="form-control" type="text" name="ORIGEN_ESPECIALIDAD" value="{{ info.ORIGEN_ESPECIALIDAD }}" />
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Área profesional: </label>
<div class="col-md-9">
<input class="form-control" type="text" name="AREA_PROFESIONAL" value="{{ info.AREA_PROFESIONAL }}" />
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Código de Especialidad: </label>
<div class="col-md-9">
<input class="form-control" type="text" name="CODIGO_ESPECIALIDAD" value="{{ info.CODIGO_ESPECIALIDAD }}"/>
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Duración: </label>
<div class="col-md-2">
<input class="form-control" type="number" name="DURACION" value="{{ info.DURACION }}" />
</div>
<div class="col-md-7 alert alert-info mensaje_info">
Número de horas de la acción formativa.
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Fecha de Inicio: </label>
<div class="col-md-4">
<select name="day_start" class="form-control slt_fecha">
<option value=""></option>
<option value="1" {% if day_start == "1" %} selected="selected" {% endif %} >01</option>
<option value="2" {% if day_start == "2" %} selected="selected" {% endif %} >02</option>
<option value="3" {% if day_start == "3" %} selected="selected" {% endif %} >03</option>
<option value="4" {% if day_start == "4" %} selected="selected" {% endif %} >04</option>
<option value="5" {% if day_start == "5" %} selected="selected" {% endif %} >05</option>
<option value="6" {% if day_start == "6" %} selected="selected" {% endif %} >06</option>
<option value="7" {% if day_start == "7" %} selected="selected" {% endif %} >07</option>
<option value="8" {% if day_start == "8" %} selected="selected" {% endif %} >08</option>
<option value="9" {% if day_start == "9" %} selected="selected" {% endif %} >09</option>
<option value="10" {% if day_start == "10" %} selected="selected" {% endif %} >10</option>
<option value="11" {% if day_start == "11" %} selected="selected" {% endif %} >11</option>
<option value="12" {% if day_start == "12" %} selected="selected" {% endif %} >12</option>
<option value="13" {% if day_start == "13" %} selected="selected" {% endif %} >13</option>
<option value="14" {% if day_start == "14" %} selected="selected" {% endif %} >14</option>
<option value="15" {% if day_start == "15" %} selected="selected" {% endif %} >15</option>
<option value="16" {% if day_start == "16" %} selected="selected" {% endif %} >16</option>
<option value="17" {% if day_start == "17" %} selected="selected" {% endif %} >17</option>
<option value="18" {% if day_start == "18" %} selected="selected" {% endif %} >18</option>
<option value="19" {% if day_start == "19" %} selected="selected" {% endif %} >19</option>
<option value="20" {% if day_start == "20" %} selected="selected" {% endif %} >20</option>
<option value="21" {% if day_start == "21" %} selected="selected" {% endif %} >21</option>
<option value="22" {% if day_start == "22" %} selected="selected" {% endif %} >22</option>
<option value="23" {% if day_start == "23" %} selected="selected" {% endif %} >23</option>
<option value="24" {% if day_start == "24" %} selected="selected" {% endif %} >24</option>
<option value="25" {% if day_start == "25" %} selected="selected" {% endif %} >25</option>
<option value="26" {% if day_start == "26" %} selected="selected" {% endif %} >26</option>
<option value="27" {% if day_start == "27" %} selected="selected" {% endif %} >27</option>
<option value="28" {% if day_start == "28" %} selected="selected" {% endif %} >28</option>
<option value="29" {% if day_start == "29" %} selected="selected" {% endif %} >29</option>
<option value="30" {% if day_start == "30" %} selected="selected" {% endif %} >30</option>
<option value="31" {% if day_start == "31" %} selected="selected" {% endif %} >31</option>
</select>
/
<select name="month_start" class="form-control slt_fecha">
<option value=""></option>
<option value="1" {% if month_start == "1" %} selected="selected" {% endif %} >01</option>
<option value="2" {% if month_start == "2" %} selected="selected" {% endif %} >02</option>
<option value="3" {% if month_start == "3" %} selected="selected" {% endif %} >03</option>
<option value="4" {% if month_start == "4" %} selected="selected" {% endif %} >04</option>
<option value="5" {% if month_start == "5" %} selected="selected" {% endif %} >05</option>
<option value="6" {% if month_start == "6" %} selected="selected" {% endif %} >06</option>
<option value="7" {% if month_start == "7" %} selected="selected" {% endif %} >07</option>
<option value="8" {% if month_start == "8" %} selected="selected" {% endif %} >08</option>
<option value="9" {% if month_start == "9" %} selected="selected" {% endif %} >09</option>
<option value="10" {% if month_start == "10" %} selected="selected" {% endif %} >10</option>
<option value="11" {% if month_start == "11" %} selected="selected" {% endif %} >11</option>
<option value="12" {% if month_start == "12" %} selected="selected" {% endif %} >12</option>
</select>
/
<select name="year_start" class="form-control slt_fecha">
<option value=""></option>
{% for i in list_year %}
{% if year_start == i %}
<option value="{{ i }}" selected="selected">{{ i }}</option>
{% else %}
<option value="{{ i }}">{{ i }}</option>
{% endif %}
{% endfor %}
</select>
</div>
<div class="col-md-5 alert alert-info mensaje_info">Fecha de inicio de la acción formativa.</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Fecha Fin: </label>
<div class="col-md-4">
<select name="day_end" class="form-control slt_fecha">
<option value=""></option>
<option value="1" {% if day_end == "1" %} selected="selected" {% endif %} >01</option>
<option value="2" {% if day_end == "2" %} selected="selected" {% endif %} >02</option>
<option value="3" {% if day_end == "3" %} selected="selected" {% endif %} >03</option>
<option value="4" {% if day_end == "4" %} selected="selected" {% endif %} >04</option>
<option value="5" {% if day_end == "5" %} selected="selected" {% endif %} >05</option>
<option value="6" {% if day_end == "6" %} selected="selected" {% endif %} >06</option>
<option value="7" {% if day_end == "7" %} selected="selected" {% endif %} >07</option>
<option value="8" {% if day_end == "8" %} selected="selected" {% endif %} >08</option>
<option value="9" {% if day_end == "9" %} selected="selected" {% endif %} >09</option>
<option value="10" {% if day_end == "10" %} selected="selected" {% endif %} >10</option>
<option value="11" {% if day_end == "11" %} selected="selected" {% endif %} >11</option>
<option value="12" {% if day_end == "12" %} selected="selected" {% endif %} >12</option>
<option value="13" {% if day_end == "13" %} selected="selected" {% endif %} >13</option>
<option value="14" {% if day_end == "14" %} selected="selected" {% endif %} >14</option>
<option value="15" {% if day_end == "15" %} selected="selected" {% endif %} >15</option>
<option value="16" {% if day_end == "16" %} selected="selected" {% endif %} >16</option>
<option value="17" {% if day_end == "17" %} selected="selected" {% endif %} >17</option>
<option value="18" {% if day_end == "18" %} selected="selected" {% endif %} >18</option>
<option value="19" {% if day_end == "19" %} selected="selected" {% endif %} >19</option>
<option value="20" {% if day_end == "20" %} selected="selected" {% endif %} >20</option>
<option value="21" {% if day_end == "21" %} selected="selected" {% endif %} >21</option>
<option value="22" {% if day_end == "22" %} selected="selected" {% endif %} >22</option>
<option value="23" {% if day_end == "23" %} selected="selected" {% endif %} >23</option>
<option value="24" {% if day_end == "24" %} selected="selected" {% endif %} >24</option>
<option value="25" {% if day_end == "25" %} selected="selected" {% endif %} >25</option>
<option value="26" {% if day_end == "26" %} selected="selected" {% endif %} >26</option>
<option value="27" {% if day_end == "27" %} selected="selected" {% endif %} >27</option>
<option value="28" {% if day_end == "28" %} selected="selected" {% endif %} >28</option>
<option value="29" {% if day_end == "29" %} selected="selected" {% endif %} >29</option>
<option value="30" {% if day_end == "30" %} selected="selected" {% endif %} >30</option>
<option value="31" {% if day_end == "31" %} selected="selected" {% endif %} >31</option>
</select>
/
<select name="month_end" class="form-control slt_fecha">
<option value=""></option>
<option value="1" {% if month_end == "1" %} selected="selected" {% endif %} >01</option>
<option value="2" {% if month_end == "2" %} selected="selected" {% endif %} >02</option>
<option value="3" {% if month_end == "3" %} selected="selected" {% endif %} >03</option>
<option value="4" {% if month_end == "4" %} selected="selected" {% endif %} >04</option>
<option value="5" {% if month_end == "5" %} selected="selected" {% endif %} >05</option>
<option value="6" {% if month_end == "6" %} selected="selected" {% endif %} >06</option>
<option value="7" {% if month_end == "7" %} selected="selected" {% endif %} >07</option>
<option value="8" {% if month_end == "8" %} selected="selected" {% endif %} >08</option>
<option value="9" {% if month_end == "9" %} selected="selected" {% endif %} >09</option>
<option value="10" {% if month_end == "10" %} selected="selected" {% endif %} >10</option>
<option value="11" {% if month_end == "11" %} selected="selected" {% endif %} >11</option>
<option value="12" {% if month_end == "12" %} selected="selected" {% endif %} >12</option>
</select>
/
<select name="year_end" class="form-control slt_fecha">
<option value=""></option>
{% for i in list_year %}
{% if year_end == i %}
<option value="{{ i }}" selected="selected">{{ i }}</option>
{% else %}
<option value="{{ i }}">{{ i }}</option>
{% endif %}
{% endfor %}
</select>
</div>
<div class="alert alert-info col-md-5 mensaje_info">Fecha de finalización de la acción formativa.</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Ind. de itinerario completo: </label>
<div class="col-md-2">
<select class="form-control" name="IND_ITINERARIO_COMPLETO">
<option value=""></option>
{% if info.IND_ITINERARIO_COMPLETO == "SI" %}
<option value="SI" selected="selected">SI</option>
{% else %}
<option value="SI">SI</option>
{% endif %}
{% if info.IND_ITINERARIO_COMPLETO == "NO" %}
<option value="NO" selected="selected">NO</option>
{% else %}
<option value="NO">NO</option>
{% endif %}
</select>
</div>
<div class="alert alert-info col-md-7 mensaje_info">Indica si la acción formativa se imparte de forma completa.</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Tipo de Financiación: </label>
<div class="col-md-2">
<select name="TIPO_FINANCIACION" class="form-control">
<option value=""></option>
{% if info.TIPO_FINANCIACION == "PU" %}
<option value="PU" selected="selected">Pública</option>
{% else %}
<option value="PU">Pública</option>
{% endif %}
{% if info.TIPO_FINANCIACION == "PR" %}
<option value="PR" selected="selected">Privada</option>
{% else %}
<option value="PR">Privada</option>
{% endif %}
</select>
</div>
<div class="alert alert-info col-md-7 mensaje_info">Procedencia de la dotación económica.
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Número de asistentes: </label>
<div class="col-md-2">
<input class="form-control" type="number" name="NUMERO_ASISTENTES" value="{{ info.NUMERO_ASISTENTES }}" />
</div>
<div class="alert alert-info col-md-7 mensaje_info">Número de plazas ofertadas.
</div>
</div>
<div class="well subcampo">
<legend class="subcampo">DESCRIPCION DE LA ACCION FORMATIVA</legend>
<div class="form-group">
<label class="col-md-3 control-label">Denominación de la Acción: </label>
<div class="col-md-9">
<input class="form-control" type="text" name="DENOMINACION_ACCION" value="{{ info.DENOMINACION_ACCION }}" />
<div class="alert alert-info mensaje_info mtop5">Nombre o descripción breve de la acción formativa.</div>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Información General: </label>
<div class="col-md-9">
<textarea class="form-control" name="INFORMACION_GENERAL">{{ info.INFORMACION_GENERAL }}</textarea>
<div class="alert alert-info mensaje_info mtop5">Breve texto descriptivo de los objetivos, contenidos y estructura de la acción formativa.</div>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Horarios: </label>
<div class="col-md-9">
<textarea class="form-control" name="HORARIOS">{{ info.HORARIOS }}</textarea>
<div class="alert alert-info mensaje_info mtop5">Breve texto que señala el período temporal durante el que se desarrolla la acción formativa.</div>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Requisitos: </label>
<div class="col-md-9">
<textarea class="form-control" name="REQUISITOS">{{ info.REQUISITOS }}</textarea>
<div class="alert alert-info mensaje_info mtop5">Breve texto que especifica los requisitos de acceso a la formación.</div>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Contacto Acción: </label>
<div class="col-md-9">
<textarea class="form-control" name="CONTACTO_ACCION">{{ info.CONTACTO_ACCION }}</textarea>
<div class="alert alert-info mensaje_info mtop5">Teléfono, sitio web o dirección de correo electrónico a través de los que obtener información específica y detallada sobre la acción formativa.</div>
</div>
</div>
</div>
</fieldset>
</div>
</div>
</form>
</div>

@ -0,0 +1,89 @@
<link rel="stylesheet" type="text/css" href="../resources/plugin.css"/>
<div class="row">
<form class="form-horizontal" action="editar-datos-identificativos.php" method="post" name="form_datos_centro">
<div class="col-md-3">
<div id="course_category_well" class="well">
<ul class="nav nav-list">
<li class="nav-header"><h3>Opciones:</h3></li>
<li>
<input class="btn btn-primary btn_menu_lateral" type="submit" value="Guardar cambios" />
<input type="hidden" name="cod" value="{{ info.cod }}" />
</li>
<li>
<input class="btn btn-warning btn_menu_lateral" type="reset" value="Restablecer" />
</li>
</ul>
</div>
</div>
<div class="col-md-9">
{% if message_info != "" %}
<div class="alert alert-success">
{{ message_info }}
</div>
{% endif %}
{% if message_error != "" %}
<div class="alert alert-danger">
{{ message_error }}
</div>
{% endif %}
<div class="well_border span8">
<fieldset>
<legend>Datos Identificativos del Centro</legend>
<div class="form-group">
<label class="col-sm-3 control-label">Origen Centro</label>
<div class="col-sm-2">
<input type="text" class="form-control" name="origen_centro" value="{{ info.origen_centro }}" />
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Código Centro</label>
<div class="col-sm-2">
<input type="text" class="form-control" name="codigo_centro" value="{{ info.codigo_centro }}" />
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Nombre Centro</label>
<div class="col-sm-9">
<input type="text" class="form-control" name="nombre_centro" value="{{ info.nombre_centro }}" />
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">URL plataforma</label>
<div class="col-sm-9">
<input type="text" class="form-control" name="url" value="{{ info.url }}" style="width:100%"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">URL seguimiento</label>
<div class="col-sm-9">
<input type="text" class="form-control" name="url_seguimiento" value="{{ info.url_seguimiento }}" style="width:100%" />
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Teléfono</label>
<div class="col-sm-3">
<input type="text" class="form-control" name="telefono" value="{{ info.telefono }}" />
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">E-mail</label>
<div class="col-sm-3">
<input type="text" class="form-control" name="email" value="{{ info.email }}" />
</div>
</div>
</fieldset>
</div>
</div>
</form>
</div>

@ -0,0 +1,435 @@
<script type='text/javascript' src="../js/sepe.js"></script>
<link rel="stylesheet" type="text/css" href="../resources/plugin.css"/>
<div class="row">
<form class="form-horizontal" action="editar-especialidad-accion.php" method="post" name="form_specialty_action">
<div class="col-md-3">
<div id="course_category_well" class="well">
<ul class="nav nav-list">
<li class="nav-header"><h3>Acciones:</h3></li>
<li>
{% if new_action == "SI" %}
<input type="hidden" name="cod_action" value="{{ cod_action }}" />
<input type="hidden" name="new_specialty" value="SI" />
{% else %}
<input type="hidden" name="cod_action" value="{{ cod_action }}" />
<input type="hidden" name="cod_specialty" value="{{ cod_specialty }}" />
<input type="hidden" name="new_specialty" value="NO" />
{% endif %}
<input class="btn btn-primary btn_menu_lateral" type="submit" value="Guardar cambios" />
</li>
<li>
<input class="btn btn-warning btn_menu_lateral" type="reset" value="Restablecer" />
</li>
</ul>
</div>
</div>
<div class="col-md-9">
{% if message_info != "" %}
<div class="alert alert-success">
{{ message_info }}
</div>
{% endif %}
{% if message_error != "" %}
<div class="alert alert-danger">
{{ message_error }}
</div>
{% endif %}
<div class="well_border">
<fieldset>
<legend>Especialidad Acción Formativa</legend>
<div class="well subcampo">
<legend class="subcampo">IDENTIFICADOR DE ESPECIALIDAD: </legend>
<div class="form-group">
<label class="col-sm-3 control-label">Origen de la especialidad: </label>
<div class="col-sm-2">
<input class="form-control" type="text" name="ORIGEN_ESPECIALIDAD" value="{{ info.ORIGEN_ESPECIALIDAD }}" />
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Área Profesional: </label>
<div class="col-sm-2">
<input class="form-control" type="text" name="AREA_PROFESIONAL" value="{{ info.AREA_PROFESIONAL }}" />
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Código de la Especialidad: </label>
<div class="col-sm-3">
<input class="form-control" type="text" name="CODIGO_ESPECIALIDAD" value="{{ info.CODIGO_ESPECIALIDAD }}" />
</div>
</div>
</div>
<div class="well subcampo">
<legend class="subcampo">CENTRO DE IMPARTICIÓN: </legend>
<div class="form-group">
<label class="col-sm-3 control-label">Origen del centro: </label>
<div class="col-sm-2">
<input class="form-control" type="text" name="ORIGEN_CENTRO" value="{{ info.ORIGEN_CENTRO }}" />
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Código del centro: </label>
<div class="col-sm-3">
<input class="form-control" type="text" name="CODIGO_CENTRO" value="{{ info.CODIGO_CENTRO }}" />
</div>
</div>
</div>
<div class="form-group">
<label class="col-lg-3 control-label">Fecha de Inicio: </label>
<div class="col-lg-4">
<select name="day_start" class="form-control slt_fecha">
<option value=""></option>
<option value="1" {% if day_start == "1" %} selected="selected" {% endif %} >01</option>
<option value="2" {% if day_start == "2" %} selected="selected" {% endif %} >02</option>
<option value="3" {% if day_start == "3" %} selected="selected" {% endif %} >03</option>
<option value="4" {% if day_start == "4" %} selected="selected" {% endif %} >04</option>
<option value="5" {% if day_start == "5" %} selected="selected" {% endif %} >05</option>
<option value="6" {% if day_start == "6" %} selected="selected" {% endif %} >06</option>
<option value="7" {% if day_start == "7" %} selected="selected" {% endif %} >07</option>
<option value="8" {% if day_start == "8" %} selected="selected" {% endif %} >08</option>
<option value="9" {% if day_start == "9" %} selected="selected" {% endif %} >09</option>
<option value="10" {% if day_start == "10" %} selected="selected" {% endif %} >10</option>
<option value="11" {% if day_start == "11" %} selected="selected" {% endif %} >11</option>
<option value="12" {% if day_start == "12" %} selected="selected" {% endif %} >12</option>
<option value="13" {% if day_start == "13" %} selected="selected" {% endif %} >13</option>
<option value="14" {% if day_start == "14" %} selected="selected" {% endif %} >14</option>
<option value="15" {% if day_start == "15" %} selected="selected" {% endif %} >15</option>
<option value="16" {% if day_start == "16" %} selected="selected" {% endif %} >16</option>
<option value="17" {% if day_start == "17" %} selected="selected" {% endif %} >17</option>
<option value="18" {% if day_start == "18" %} selected="selected" {% endif %} >18</option>
<option value="19" {% if day_start == "19" %} selected="selected" {% endif %} >19</option>
<option value="20" {% if day_start == "20" %} selected="selected" {% endif %} >20</option>
<option value="21" {% if day_start == "21" %} selected="selected" {% endif %} >21</option>
<option value="22" {% if day_start == "22" %} selected="selected" {% endif %} >22</option>
<option value="23" {% if day_start == "23" %} selected="selected" {% endif %} >23</option>
<option value="24" {% if day_start == "24" %} selected="selected" {% endif %} >24</option>
<option value="25" {% if day_start == "25" %} selected="selected" {% endif %} >25</option>
<option value="26" {% if day_start == "26" %} selected="selected" {% endif %} >26</option>
<option value="27" {% if day_start == "27" %} selected="selected" {% endif %} >27</option>
<option value="28" {% if day_start == "28" %} selected="selected" {% endif %} >28</option>
<option value="29" {% if day_start == "29" %} selected="selected" {% endif %} >29</option>
<option value="30" {% if day_start == "30" %} selected="selected" {% endif %} >30</option>
<option value="31" {% if day_start == "31" %} selected="selected" {% endif %} >31</option>
</select>
/
<select name="month_start" class="form-control slt_fecha">
<option value=""></option>
<option value="1" {% if month_start == "1" %} selected="selected" {% endif %} >01</option>
<option value="2" {% if month_start == "2" %} selected="selected" {% endif %} >02</option>
<option value="3" {% if month_start == "3" %} selected="selected" {% endif %} >03</option>
<option value="4" {% if month_start == "4" %} selected="selected" {% endif %} >04</option>
<option value="5" {% if month_start == "5" %} selected="selected" {% endif %} >05</option>
<option value="6" {% if month_start == "6" %} selected="selected" {% endif %} >06</option>
<option value="7" {% if month_start == "7" %} selected="selected" {% endif %} >07</option>
<option value="8" {% if month_start == "8" %} selected="selected" {% endif %} >08</option>
<option value="9" {% if month_start == "9" %} selected="selected" {% endif %} >09</option>
<option value="10" {% if month_start == "10" %} selected="selected" {% endif %} >10</option>
<option value="11" {% if month_start == "11" %} selected="selected" {% endif %} >11</option>
<option value="12" {% if month_start == "12" %} selected="selected" {% endif %} >12</option>
</select>
/
<select name="year_start" class="form-control slt_fecha">
<option value=""></option>
{% for i in list_year %}
{% if year_start == i %}
<option value="{{ i }}" selected="selected">{{ i }}</option>
{% else %}
<option value="{{ i }}">{{ i }}</option>
{% endif %}
{% endfor %}
</select>
</div>
<div class="alert alert-info mensaje_info col-lg-5">Fecha de inicio de la especialidad formativa.</div>
</div>
<div class="form-group">
<label class="col-lg-3 control-label">Fecha Fin: </label>
<div class="col-lg-4">
<select name="day_end" class="form-control slt_fecha">
<option value=""></option>
<option value="1" {% if day_end == "1" %} selected="selected" {% endif %} >01</option>
<option value="2" {% if day_end == "2" %} selected="selected" {% endif %} >02</option>
<option value="3" {% if day_end == "3" %} selected="selected" {% endif %} >03</option>
<option value="4" {% if day_end == "4" %} selected="selected" {% endif %} >04</option>
<option value="5" {% if day_end == "5" %} selected="selected" {% endif %} >05</option>
<option value="6" {% if day_end == "6" %} selected="selected" {% endif %} >06</option>
<option value="7" {% if day_end == "7" %} selected="selected" {% endif %} >07</option>
<option value="8" {% if day_end == "8" %} selected="selected" {% endif %} >08</option>
<option value="9" {% if day_end == "9" %} selected="selected" {% endif %} >09</option>
<option value="10" {% if day_end == "10" %} selected="selected" {% endif %} >10</option>
<option value="11" {% if day_end == "11" %} selected="selected" {% endif %} >11</option>
<option value="12" {% if day_end == "12" %} selected="selected" {% endif %} >12</option>
<option value="13" {% if day_end == "13" %} selected="selected" {% endif %} >13</option>
<option value="14" {% if day_end == "14" %} selected="selected" {% endif %} >14</option>
<option value="15" {% if day_end == "15" %} selected="selected" {% endif %} >15</option>
<option value="16" {% if day_end == "16" %} selected="selected" {% endif %} >16</option>
<option value="17" {% if day_end == "17" %} selected="selected" {% endif %} >17</option>
<option value="18" {% if day_end == "18" %} selected="selected" {% endif %} >18</option>
<option value="19" {% if day_end == "19" %} selected="selected" {% endif %} >19</option>
<option value="20" {% if day_end == "20" %} selected="selected" {% endif %} >20</option>
<option value="21" {% if day_end == "21" %} selected="selected" {% endif %} >21</option>
<option value="22" {% if day_end == "22" %} selected="selected" {% endif %} >22</option>
<option value="23" {% if day_end == "23" %} selected="selected" {% endif %} >23</option>
<option value="24" {% if day_end == "24" %} selected="selected" {% endif %} >24</option>
<option value="25" {% if day_end == "25" %} selected="selected" {% endif %} >25</option>
<option value="26" {% if day_end == "26" %} selected="selected" {% endif %} >26</option>
<option value="27" {% if day_end == "27" %} selected="selected" {% endif %} >27</option>
<option value="28" {% if day_end == "28" %} selected="selected" {% endif %} >28</option>
<option value="29" {% if day_end == "29" %} selected="selected" {% endif %} >29</option>
<option value="30" {% if day_end == "30" %} selected="selected" {% endif %} >30</option>
<option value="31" {% if day_end == "31" %} selected="selected" {% endif %} >31</option>
</select>
/
<select name="month_end" class="form-control slt_fecha">
<option value=""></option>
<option value="1" {% if month_end == "1" %} selected="selected" {% endif %} >01</option>
<option value="2" {% if month_end == "2" %} selected="selected" {% endif %} >02</option>
<option value="3" {% if month_end == "3" %} selected="selected" {% endif %} >03</option>
<option value="4" {% if month_end == "4" %} selected="selected" {% endif %} >04</option>
<option value="5" {% if month_end == "5" %} selected="selected" {% endif %} >05</option>
<option value="6" {% if month_end == "6" %} selected="selected" {% endif %} >06</option>
<option value="7" {% if month_end == "7" %} selected="selected" {% endif %} >07</option>
<option value="8" {% if month_end == "8" %} selected="selected" {% endif %} >08</option>
<option value="9" {% if month_end == "9" %} selected="selected" {% endif %} >09</option>
<option value="10" {% if month_end == "10" %} selected="selected" {% endif %} >10</option>
<option value="11" {% if month_end == "11" %} selected="selected" {% endif %} >11</option>
<option value="12" {% if month_end == "12" %} selected="selected" {% endif %} >12</option>
</select>
/
<select name="year_end" class="form-control slt_fecha">
<option value=""></option>
{% for i in list_year %}
{% if year_end == i %}
<option value="{{ i }}" selected="selected">{{ i }}</option>
{% else %}
<option value="{{ i }}">{{ i }}</option>
{% endif %}
{% endfor %}
</select>
</div>
<div class="col-lg-5 mensaje_info alert alert-info">Fecha de finalización de especialidad formativa.</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Modalidad de impartición: </label>
<div class="col-sm-9">
<select name="MODALIDAD_IMPARTICION" class="chzn-select">
<option value=""></option>
{% if info.MODALIDAD_IMPARTICION == "TF" %}
<option value="TF" selected="selected">Teleformación</option>
{% else %}
<option value="TF">Teleformación</option>
{% endif %}
{% if info.MODALIDAD_IMPARTICION == "PR" %}
<option value="PR" selected="selected">Presencial</option>
{% else %}
<option value="PR">Presencial</option>
{% endif %}
{% if info.MODALIDAD_IMPARTICION == "PE" %}
<option value="PE" selected="selected">Práctica no laboral (formación) en centro de trabajo</option>
{% else %}
<option value="PE">Práctica no laboral (formación) en centro de trabajo</option>
{% endif %}
</select>
<em class="alert alert-info mensaje_info mtop5">Modo de impartición de la especialidad formativa de la acción.</em>
</div>
</div>
<div class="well subcampo">
<legend class="subcampo">DATOS DE DURACIÓN: </legend>
<div class="form-group">
<label class="col-sm-3 control-label">Horas presenciales: </label>
<div class="col-sm-2">
<input class="form-control" type="number" name="HORAS_PRESENCIAL" value="{{ info.HORAS_PRESENCIAL }}" />
</div>
<div class="col-sm-7 alert alert-info mensaje_info">Número de horas realizadas de forma presencial.</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Horas teleformación: </label>
<div class="col-sm-2">
<input class="form-control" type="number" name="HORAS_TELEFORMACION" value="{{ info.HORAS_TELEFORMACION }}" />
</div>
<div class="col-sm-7 alert alert-info mensaje_info">Número de horas realizadas a través de teleformación.</div>
</div>
</div>
<div class="well subcampo">
{% if new_action == "SI" %}
<legend>CENTROS DE SESIONES PRESENCIALES: </legend>
<div class="alert alert-warning">Debe guardar los cambios antes de crear un centro presencial</div>
{% else %}
<legend>CENTROS DE SESIONES PRESENCIALES:
<a href="editar-especialidad-classroom.php?new_classroom=SI&cod_specialty={{ info.cod }}&cod_action={{ cod_action }}" class="btn btn-sm btn-info pull-right">Crear centro presencial</a>
</legend>
{% for classroom in listClassroom %}
<div class="form-group">
<label class="col-sm-3 control-label">Centro presencial: </label>
<div class="col-sm-9">
<label class="campo_texto">{{ classroom.ORIGEN_CENTRO }} {{ classroom.CODIGO_CENTRO }}
<a href="#" class="btn btn-danger btn-sm pull-right mlateral del_classroom" id="classroom{{ classroom.cod }}">Borrar</a>
<a href="editar-especialidad-classroom.php?new_classroom=NO&cod_specialty={{ info.cod }}&cod_classroom={{ classroom.cod }}&cod_action={{ cod_action }}" class="btn btn-warning btn-sm pull-right mlateral">Editar</a>
</label>
</div>
</div>
{% endfor %}
{% endif %}
</div>
<div class="well subcampo">
{% if new_action == "SI" %}
<legend>TUTORES-FORMADORES: </legend>
<div class="alert alert-warning">Debe guardar los cambios antes de crear un centro presencial</div>
{% else %}
<legend>TUTORES-FORMADORES:
<a href="editar-especialidad-tutor.php?new_tutor=SI&cod_specialty={{ info.cod }}&cod_action={{ cod_action }}" class="btn btn-sm btn-info pull-right">Crear tutor-formador</a>
</legend>
{% for tutor in listTutors %}
<div class="form-group">
<label class="col-sm-3 control-label">Tutor-formador: </label>
<div class="col-sm-9">
<label class="campo_texto">
{{ tutor.firstname }} {{ tutor.lastname }}
( {{ tutor.NUM_DOCUMENTO }}-{{ tutor.LETRA_NIF }} )
<a href="#" class="btn btn-danger btn-sm pull-right mlateral del_tutor" id="tutor{{ tutor.cod }}">Borrar</a>
<a href="editar-especialidad-tutor.php?new_tutor=NO&cod_specialty={{ info.cod }}&cod_tutor={{ tutor.cod }}&cod_action={{ cod_action }}" class="btn btn-warning btn-sm pull-right mlateral">Editar</a>
</label>
</div>
</div>
{% endfor %}
{% endif %}
</div>
<div class="well subcampo">
<legend class="subcampo">USO DEL CONTENIDO</legend>
<div class="well">
<legend class="subcampo2">HORARIO MAÑANA</legend>
<div class="alert alert-info mensaje_info">Se considerará el período temporal comprendido entre las 7:00 y las 15:00 horas.</div>
<div class="form-group">
<label class="col-sm-3 control-label">Nº de participantes: </label>
<div class="col-sm-2">
<input class="form-control" type="number" name="HM_NUM_PARTICIPANTES" value="{{ info.HM_NUM_PARTICIPANTES }}" />
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Número de accesos: </label>
<div class="col-sm-2">
<input class="form-control" type="number" name="HM_NUMERO_ACCESOS" value="{{ info.HM_NUMERO_ACCESOS }}" />
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Duración Total: </label>
<div class="col-sm-2">
<input class="form-control" type="number" name="HM_DURACION_TOTAL" value="{{ info.HM_DURACION_TOTAL }}"/>
</div>
</div>
</div>
<hr />
<div class="well">
<legend class="subcampo2">HORARIO TARDE</legend>
<div class="alert alert-info mensaje_info">Se considerará el período temporal comprendido entre las 15:00 horas y las 23:00 horas.</div>
<div class="form-group">
<label class="col-sm-3 control-label">Nº de participantes: </label>
<div class="col-sm-2">
<input class="form-control" type="number" name="HT_NUM_PARTICIPANTES" value="{{ info.HT_NUM_PARTICIPANTES }}" />
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Número de accesos: </label>
<div class="col-sm-2">
<input class="form-control" type="number" name="HT_NUMERO_ACCESOS" value="{{ info.HT_NUMERO_ACCESOS }}" />
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Duración Total: </label>
<div class="col-sm-2">
<input class="form-control" type="number" name="HT_DURACION_TOTAL" value="{{ info.HT_DURACION_TOTAL }}"/>
</div>
</div>
</div>
<hr />
<div class="well">
<legend class="subcampo2">HORARIO NOCHE</legend>
<div class="alert alert-info mensaje_info">Se considerará el período temporal comprendido entre las 23:00 horas y las 7:00 horas.</div>
<div class="form-group">
<label class="col-sm-3 control-label">Nº de participantes: </label>
<div class="col-sm-2">
<input class="form-control" type="number" name="HN_NUM_PARTICIPANTES" value="{{ info.HN_NUM_PARTICIPANTES }}" />
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Número de accesos: </label>
<div class="col-sm-2">
<input class="form-control" type="number" name="HN_NUMERO_ACCESOS" value="{{ info.HN_NUMERO_ACCESOS }}" />
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Duración Total: </label>
<div class="col-sm-2">
<input class="form-control" type="number" name="HN_DURACION_TOTAL" value="{{ info.HN_DURACION_TOTAL }}"/>
</div>
</div>
</div>
<hr />
<div class="well">
<legend class="subcampo2">SEGUIMIENTO Y EVALUACIÓN</legend>
<div class="form-group">
<label class="col-sm-3 control-label">Nº de participantes: </label>
<div class="col-sm-2">
<input class="form-control" type="number" name="NUM_PARTICIPANTES" value="{{ info.NUM_PARTICIPANTES }}" />
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Número de actividades de aprendizaje: </label>
<div class="col-sm-2">
<input class="form-control" type="number" name="NUMERO_ACTIVIDADES_APRENDIZAJE" value="{{ info.NUMERO_ACTIVIDADES_APRENDIZAJE }}" />
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Número de intentos: </label>
<div class="col-sm-2">
<input class="form-control" type="number" name="NUMERO_INTENTOS" value="{{ info.NUMERO_INTENTOS }}"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Número de actividades de evaluación: </label>
<div class="col-sm-2">
<input class="form-control" type="number" name="NUMERO_ACTIVIDADES_EVALUACION" value="{{ info.NUMERO_ACTIVIDADES_EVALUACION }}"/>
</div>
</div>
</div>
<hr />
</div>
</fieldset>
</div>
</div>
</form>
</div>

@ -0,0 +1,95 @@
<script type='text/javascript' src="../js/sepe.js"></script>
<link rel="stylesheet" type="text/css" href="../resources/plugin.css"/>
<div class="row">
<form class="form-horizontal" action="editar-especialidad-classroom.php" method="post" name="form_specialty_action">
<div class="col-md-3">
<div id="course_category_well" class="well">
<ul class="nav nav-list">
<li class="nav-header"><h3>Acciones:</h3></li>
<li>
{% if new_classroom == "SI" %}
<input type="hidden" name="cod_action" value="{{ cod_action }}" />
<input type="hidden" name="cod_specialty" value="{{ cod_specialty }}" />
<input type="hidden" name="new_classroom" value="SI" />
{% else %}
<input type="hidden" name="cod_action" value="{{ cod_action }}" />
<input type="hidden" name="cod_specialty" value="{{ cod_specialty }}" />
<input type="hidden" name="cod_classroom" value="{{ cod_classroom }}" />
<input type="hidden" name="new_classroom" value="NO" />
{% endif %}
<input class="btn btn-primary btn_menu_lateral" type="submit" value="Guardar cambios" />
</li>
<li>
<input class="btn btn-warning btn_menu_lateral" type="reset" value="Restablecer" />
</li>
</ul>
</div>
</div>
<div class="col-md-9">
{% if message_info != "" %}
<div class="alert alert-success">
{{ message_info }}
</div>
{% endif %}
{% if message_error != "" %}
<div class="alert alert-danger">
{{ message_error }}
</div>
{% endif %}
{% if new_classroom == "SI" %}
<div class="well_border">
<div class="form-group">
<label class="control-label col-sm-3">Usar centro existente: </label>
<div class="col-sm-9">
<select id="slt_centro_existente" class="chzn-select" style="width:100%" name="slt_centro_existente">
<option value="SI" selected="selected">Usar existente</option>
<option value="NO">Crear nuevo centro</option>
</select>
</div>
</div>
</div>
<div class="well_border" id="box_listado_centros">
<fieldset>
<legend>Listado de centros</legend>
<div class="form-group">
<label class="control-label col-sm-3">Centro: </label>
<div class="col-sm-9">
<select name="centro_existente" class="chzn-select" style="width:100%">
<option value="" selected="selected"></option>
{% for centro in listCentrosExistentes %}
<option value="{{ centro.cod }}">{{ centro.ORIGEN_CENTRO }} {{ centro.CODIGO_CENTRO }}</option>
{% endfor %}
</select>
</div>
</div>
</fieldset>
</div>
<div class="well_border" style="display:none" id="box_datos_centro">
{% else %}
<div class="well_border" id="box_datos_centro">
{% endif %}
<fieldset>
<legend>CENTRO PRESENCIAL</legend>
<div class="form-group">
<label class="control-label col-sm-3">Origen del centro: </label>
<div class="col-sm-2">
<input class="form-control" type="text" name="ORIGEN_CENTRO" value="{{ info.ORIGEN_CENTRO }}" />
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">Código del centro: </label>
<div class="col-sm-3">
<input class="form-control" type="text" name="CODIGO_CENTRO" value="{{ info.CODIGO_CENTRO }}" />
</div>
</div>
</fieldset>
</div>
</div>
</form>
</div>

@ -0,0 +1,480 @@
<script type='text/javascript' src="../js/sepe.js"></script>
<link rel="stylesheet" type="text/css" href="../resources/plugin.css"/>
<div class="row">
<form class="form-horizontal" action="editar-especialidad-participante.php" method="post" name="form_specialty_action">
<div class="col-md-3">
<div id="course_category_well" class="well">
<ul class="nav nav-list">
<li class="nav-header"><h3>Acciones:</h3></li>
<li>
{% if new_specialty == "SI" %}
<input type="hidden" name="cod_action" value="{{ cod_action }}" />
<input type="hidden" name="cod_participant" value="{{ cod_participant }}" />
<input type="hidden" name="new_specialty" value="SI" />
{% else %}
<input type="hidden" name="cod_action" value="{{ cod_action }}" />
<input type="hidden" name="cod_specialty" value="{{ cod_specialty }}" />
<input type="hidden" name="cod_participant" value="{{ cod_participant }}" />
<input type="hidden" name="new_specialty" value="NO" />
{% endif %}
<input class="btn btn-primary btn_menu_lateral" type="submit" value="Guardar cambios" />
</li>
<li>
<input class="btn btn-warning btn_menu_lateral" type="reset" value="Restablecer" />
</li>
</ul>
</div>
</div>
<div class="col-md-9">
{% if message_info != "" %}
<div class="alert alert-success">
{{ message_info }}
</div>
{% endif %}
{% if message_error != "" %}
<div class="alert alert-danger">
{{ message_error }}
</div>
{% endif %}
<div class="well_border">
<fieldset>
<legend>ESPECIALIDADES DEL PARTICIPANTE</legend>
<div class="well subcampo">
<legend class="subcampo">IDENTIFICADOR DE ESPECIALIDAD: </legend>
<div class="form-group">
<label class="control-label col-sm-3">Origen de la especialidad: </label>
<div class="col-sm-9">
<input class="form-control" type="text" name="ORIGEN_ESPECIALIDAD" value="{{ info.ORIGEN_ESPECIALIDAD }}" />
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">Área Profesional: </label>
<div class="col-sm-9">
<input class="form-control" type="text" name="AREA_PROFESIONAL" value="{{ info.AREA_PROFESIONAL }}" />
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">Código de la Especialidad: </label>
<div class="col-sm-9">
<input class="form-control" type="text" name="CODIGO_ESPECIALIDAD" value="{{ info.CODIGO_ESPECIALIDAD }}" />
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-lg-3">Fecha de Alta: </label>
<div class="col-lg-4">
<select name="day_alta" class="form-control slt_fecha">
<option value=""></option>
<option value="1" {% if day_alta == "1" %} selected="selected" {% endif %} >01</option>
<option value="2" {% if day_alta == "2" %} selected="selected" {% endif %} >02</option>
<option value="3" {% if day_alta == "3" %} selected="selected" {% endif %} >03</option>
<option value="4" {% if day_alta == "4" %} selected="selected" {% endif %} >04</option>
<option value="5" {% if day_alta == "5" %} selected="selected" {% endif %} >05</option>
<option value="6" {% if day_alta == "6" %} selected="selected" {% endif %} >06</option>
<option value="7" {% if day_alta == "7" %} selected="selected" {% endif %} >07</option>
<option value="8" {% if day_alta == "8" %} selected="selected" {% endif %} >08</option>
<option value="9" {% if day_alta == "9" %} selected="selected" {% endif %} >09</option>
<option value="10" {% if day_alta == "10" %} selected="selected" {% endif %} >10</option>
<option value="11" {% if day_alta == "11" %} selected="selected" {% endif %} >11</option>
<option value="12" {% if day_alta == "12" %} selected="selected" {% endif %} >12</option>
<option value="13" {% if day_alta == "13" %} selected="selected" {% endif %} >13</option>
<option value="14" {% if day_alta == "14" %} selected="selected" {% endif %} >14</option>
<option value="15" {% if day_alta == "15" %} selected="selected" {% endif %} >15</option>
<option value="16" {% if day_alta == "16" %} selected="selected" {% endif %} >16</option>
<option value="17" {% if day_alta == "17" %} selected="selected" {% endif %} >17</option>
<option value="18" {% if day_alta == "18" %} selected="selected" {% endif %} >18</option>
<option value="19" {% if day_alta == "19" %} selected="selected" {% endif %} >19</option>
<option value="20" {% if day_alta == "20" %} selected="selected" {% endif %} >20</option>
<option value="21" {% if day_alta == "21" %} selected="selected" {% endif %} >21</option>
<option value="22" {% if day_alta == "22" %} selected="selected" {% endif %} >22</option>
<option value="23" {% if day_alta == "23" %} selected="selected" {% endif %} >23</option>
<option value="24" {% if day_alta == "24" %} selected="selected" {% endif %} >24</option>
<option value="25" {% if day_alta == "25" %} selected="selected" {% endif %} >25</option>
<option value="26" {% if day_alta == "26" %} selected="selected" {% endif %} >26</option>
<option value="27" {% if day_alta == "27" %} selected="selected" {% endif %} >27</option>
<option value="28" {% if day_alta == "28" %} selected="selected" {% endif %} >28</option>
<option value="29" {% if day_alta == "29" %} selected="selected" {% endif %} >29</option>
<option value="30" {% if day_alta == "30" %} selected="selected" {% endif %} >30</option>
<option value="31" {% if day_alta == "31" %} selected="selected" {% endif %} >31</option>
</select>
/
<select name="month_alta" class="form-control slt_fecha">
<option value=""></option>
<option value="1" {% if month_alta == "1" %} selected="selected" {% endif %} >01</option>
<option value="2" {% if month_alta == "2" %} selected="selected" {% endif %} >02</option>
<option value="3" {% if month_alta == "3" %} selected="selected" {% endif %} >03</option>
<option value="4" {% if month_alta == "4" %} selected="selected" {% endif %} >04</option>
<option value="5" {% if month_alta == "5" %} selected="selected" {% endif %} >05</option>
<option value="6" {% if month_alta == "6" %} selected="selected" {% endif %} >06</option>
<option value="7" {% if month_alta == "7" %} selected="selected" {% endif %} >07</option>
<option value="8" {% if month_alta == "8" %} selected="selected" {% endif %} >08</option>
<option value="9" {% if month_alta == "9" %} selected="selected" {% endif %} >09</option>
<option value="10" {% if month_alta == "10" %} selected="selected" {% endif %} >10</option>
<option value="11" {% if month_alta == "11" %} selected="selected" {% endif %} >11</option>
<option value="12" {% if month_alta == "12" %} selected="selected" {% endif %} >12</option>
</select>
/
<select name="year_alta" class="form-control slt_fecha">
<option value=""></option>
{% for i in list_year %}
{% if year_alta == i %}
<option value="{{ i }}" selected="selected">{{ i }}</option>
{% else %}
<option value="{{ i }}">{{ i }}</option>
{% endif %}
{% endfor %}
</select>
</div>
<div class="alert alert-info col-lg-5 mensaje_info">Alta para acceder a la especialidad de la acción formativa.
</div>
</div>
<div class="form-group">
<label class="control-label col-lg-3">Fecha de baja: </label>
<div class="col-lg-4">
<select name="day_baja" class="form-control slt_fecha">
<option value=""></option>
<option value="1" {% if day_baja == "1" %} selected="selected" {% endif %} >01</option>
<option value="2" {% if day_baja == "2" %} selected="selected" {% endif %} >02</option>
<option value="3" {% if day_baja == "3" %} selected="selected" {% endif %} >03</option>
<option value="4" {% if day_baja == "4" %} selected="selected" {% endif %} >04</option>
<option value="5" {% if day_baja == "5" %} selected="selected" {% endif %} >05</option>
<option value="6" {% if day_baja == "6" %} selected="selected" {% endif %} >06</option>
<option value="7" {% if day_baja == "7" %} selected="selected" {% endif %} >07</option>
<option value="8" {% if day_baja == "8" %} selected="selected" {% endif %} >08</option>
<option value="9" {% if day_baja == "9" %} selected="selected" {% endif %} >09</option>
<option value="10" {% if day_baja == "10" %} selected="selected" {% endif %} >10</option>
<option value="11" {% if day_baja == "11" %} selected="selected" {% endif %} >11</option>
<option value="12" {% if day_baja == "12" %} selected="selected" {% endif %} >12</option>
<option value="13" {% if day_baja == "13" %} selected="selected" {% endif %} >13</option>
<option value="14" {% if day_baja == "14" %} selected="selected" {% endif %} >14</option>
<option value="15" {% if day_baja == "15" %} selected="selected" {% endif %} >15</option>
<option value="16" {% if day_baja == "16" %} selected="selected" {% endif %} >16</option>
<option value="17" {% if day_baja == "17" %} selected="selected" {% endif %} >17</option>
<option value="18" {% if day_baja == "18" %} selected="selected" {% endif %} >18</option>
<option value="19" {% if day_baja == "19" %} selected="selected" {% endif %} >19</option>
<option value="20" {% if day_baja == "20" %} selected="selected" {% endif %} >20</option>
<option value="21" {% if day_baja == "21" %} selected="selected" {% endif %} >21</option>
<option value="22" {% if day_baja == "22" %} selected="selected" {% endif %} >22</option>
<option value="23" {% if day_baja == "23" %} selected="selected" {% endif %} >23</option>
<option value="24" {% if day_baja == "24" %} selected="selected" {% endif %} >24</option>
<option value="25" {% if day_baja == "25" %} selected="selected" {% endif %} >25</option>
<option value="26" {% if day_baja == "26" %} selected="selected" {% endif %} >26</option>
<option value="27" {% if day_baja == "27" %} selected="selected" {% endif %} >27</option>
<option value="28" {% if day_baja == "28" %} selected="selected" {% endif %} >28</option>
<option value="29" {% if day_baja == "29" %} selected="selected" {% endif %} >29</option>
<option value="30" {% if day_baja == "30" %} selected="selected" {% endif %} >30</option>
<option value="31" {% if day_baja == "31" %} selected="selected" {% endif %} >31</option>
</select>
/
<select name="month_baja" class="form-control slt_fecha">
<option value=""></option>
<option value="1" {% if month_baja == "1" %} selected="selected" {% endif %} >01</option>
<option value="2" {% if month_baja == "2" %} selected="selected" {% endif %} >02</option>
<option value="3" {% if month_baja == "3" %} selected="selected" {% endif %} >03</option>
<option value="4" {% if month_baja == "4" %} selected="selected" {% endif %} >04</option>
<option value="5" {% if month_baja == "5" %} selected="selected" {% endif %} >05</option>
<option value="6" {% if month_baja == "6" %} selected="selected" {% endif %} >06</option>
<option value="7" {% if month_baja == "7" %} selected="selected" {% endif %} >07</option>
<option value="8" {% if month_baja == "8" %} selected="selected" {% endif %} >08</option>
<option value="9" {% if month_baja == "9" %} selected="selected" {% endif %} >09</option>
<option value="10" {% if month_baja == "10" %} selected="selected" {% endif %} >10</option>
<option value="11" {% if month_baja == "11" %} selected="selected" {% endif %} >11</option>
<option value="12" {% if month_baja == "12" %} selected="selected" {% endif %} >12</option>
</select>
/
<select name="year_baja" class="form-control slt_fecha">
<option value=""></option>
{% for i in list_year %}
{% if year_baja == i %}
<option value="{{ i }}" selected="selected">{{ i }}</option>
{% else %}
<option value="{{ i }}">{{ i }}</option>
{% endif %}
{% endfor %}
</select>
</div>
<div class="alert alert-info col-lg-5">Baja para acceder a la especialidad de la acción formativa.
</div>
</div>
<div class="well subcampo">
{% if new_specialty == "SI" %}
<legend>TUTORÍAS PRESENCIALES: </legend>
<div class="alert alert-warning">Debe guardar los cambios antes de crear un centro de tutorias presenciales</div>
{% else %}
<legend>TUTORÍAS PRESENCIALES:
<a href="editar-especialidad-tutorials.php?new_tutorial=SI&cod_specialty={{ info.cod }}&cod_action={{ cod_action }}" class="btn btn-sm btn-info pull-right">Crear tutoria presencial</a>
</legend>
{% for tutorial in listSpecialtyTutorials %}
<div class="form-group">
<label class="control-label col-sm-3">Tutoria presencial: </label>
<div class="col-sm-9">
<label class="campo_texto">{{ tutorial.ORIGEN_CENTRO }} {{ tutorial.CODIGO_CENTRO }}
<a href="#" class="btn btn-danger btn-sm pull-right mlateral del_classroom" id="tutorial{{ tutorial.cod }}">Borrar</a>
<a href="editar-especialidad-tutorials.php?new_tutorial=NO&cod_specialty={{ info.cod }}&cod_tutorial={{ tutorial.cod }}&cod_action={{ cod_action }}" class="btn btn-warning btn-sm pull-right mlateral">Editar</a>
</label>
</div>
</div>
{% endfor %}
{% endif %}
</div>
<div class="well subcampo">
<legend class="subcampo">EVALUACIÓN FINAL: </legend>
<div class="well">
<legend class="subcampo2">CENTRO PRESENCIAL DE EVALUACIÓN FINAL</legend>
<div class="form-group">
<label class="control-label col-sm-3">Origen del centro: </label>
<div class="col-sm-9">
<input class="form-control" type="text" name="ORIGEN_CENTRO" value="{{ info.ORIGEN_CENTRO }}" />
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">Código del centro: </label>
<div class="col-sm-9">
<input class="form-control" type="text" name="CODIGO_CENTRO" value="{{ info.CODIGO_CENTRO }}" />
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-lg-3">Fecha de Inicio: </label>
<div class="col-lg-4">
<select name="day_start" class="form-control slt_fecha">
<option value=""></option>
<option value="1" {% if day_start == "1" %} selected="selected" {% endif %} >01</option>
<option value="2" {% if day_start == "2" %} selected="selected" {% endif %} >02</option>
<option value="3" {% if day_start == "3" %} selected="selected" {% endif %} >03</option>
<option value="4" {% if day_start == "4" %} selected="selected" {% endif %} >04</option>
<option value="5" {% if day_start == "5" %} selected="selected" {% endif %} >05</option>
<option value="6" {% if day_start == "6" %} selected="selected" {% endif %} >06</option>
<option value="7" {% if day_start == "7" %} selected="selected" {% endif %} >07</option>
<option value="8" {% if day_start == "8" %} selected="selected" {% endif %} >08</option>
<option value="9" {% if day_start == "9" %} selected="selected" {% endif %} >09</option>
<option value="10" {% if day_start == "10" %} selected="selected" {% endif %} >10</option>
<option value="11" {% if day_start == "11" %} selected="selected" {% endif %} >11</option>
<option value="12" {% if day_start == "12" %} selected="selected" {% endif %} >12</option>
<option value="13" {% if day_start == "13" %} selected="selected" {% endif %} >13</option>
<option value="14" {% if day_start == "14" %} selected="selected" {% endif %} >14</option>
<option value="15" {% if day_start == "15" %} selected="selected" {% endif %} >15</option>
<option value="16" {% if day_start == "16" %} selected="selected" {% endif %} >16</option>
<option value="17" {% if day_start == "17" %} selected="selected" {% endif %} >17</option>
<option value="18" {% if day_start == "18" %} selected="selected" {% endif %} >18</option>
<option value="19" {% if day_start == "19" %} selected="selected" {% endif %} >19</option>
<option value="20" {% if day_start == "20" %} selected="selected" {% endif %} >20</option>
<option value="21" {% if day_start == "21" %} selected="selected" {% endif %} >21</option>
<option value="22" {% if day_start == "22" %} selected="selected" {% endif %} >22</option>
<option value="23" {% if day_start == "23" %} selected="selected" {% endif %} >23</option>
<option value="24" {% if day_start == "24" %} selected="selected" {% endif %} >24</option>
<option value="25" {% if day_start == "25" %} selected="selected" {% endif %} >25</option>
<option value="26" {% if day_start == "26" %} selected="selected" {% endif %} >26</option>
<option value="27" {% if day_start == "27" %} selected="selected" {% endif %} >27</option>
<option value="28" {% if day_start == "28" %} selected="selected" {% endif %} >28</option>
<option value="29" {% if day_start == "29" %} selected="selected" {% endif %} >29</option>
<option value="30" {% if day_start == "30" %} selected="selected" {% endif %} >30</option>
<option value="31" {% if day_start == "31" %} selected="selected" {% endif %} >31</option>
</select>
/
<select name="month_start" class="form-control slt_fecha">
<option value=""></option>
<option value="1" {% if month_start == "1" %} selected="selected" {% endif %} >01</option>
<option value="2" {% if month_start == "2" %} selected="selected" {% endif %} >02</option>
<option value="3" {% if month_start == "3" %} selected="selected" {% endif %} >03</option>
<option value="4" {% if month_start == "4" %} selected="selected" {% endif %} >04</option>
<option value="5" {% if month_start == "5" %} selected="selected" {% endif %} >05</option>
<option value="6" {% if month_start == "6" %} selected="selected" {% endif %} >06</option>
<option value="7" {% if month_start == "7" %} selected="selected" {% endif %} >07</option>
<option value="8" {% if month_start == "8" %} selected="selected" {% endif %} >08</option>
<option value="9" {% if month_start == "9" %} selected="selected" {% endif %} >09</option>
<option value="10" {% if month_start == "10" %} selected="selected" {% endif %} >10</option>
<option value="11" {% if month_start == "11" %} selected="selected" {% endif %} >11</option>
<option value="12" {% if month_start == "12" %} selected="selected" {% endif %} >12</option>
</select>
/
<select name="year_start" class="form-control slt_fecha">
<option value=""></option>
{% for i in list_year_2 %}
{% if year_start == i %}
<option value="{{ i }}" selected="selected">{{ i }}</option>
{% else %}
<option value="{{ i }}">{{ i }}</option>
{% endif %}
{% endfor %}
</select>
</div>
<div class="alert alert-info col-lg-5 mensaje_info">Fecha de inicio de la evaluación final.
</div>
</div>
<div class="form-group">
<label class="control-label col-lg-3">Fecha Fin: </label>
<div class="col-lg-4">
<select name="day_end" class="form-control slt_fecha">
<option value=""></option>
<option value="1" {% if day_end == "1" %} selected="selected" {% endif %} >01</option>
<option value="2" {% if day_end == "2" %} selected="selected" {% endif %} >02</option>
<option value="3" {% if day_end == "3" %} selected="selected" {% endif %} >03</option>
<option value="4" {% if day_end == "4" %} selected="selected" {% endif %} >04</option>
<option value="5" {% if day_end == "5" %} selected="selected" {% endif %} >05</option>
<option value="6" {% if day_end == "6" %} selected="selected" {% endif %} >06</option>
<option value="7" {% if day_end == "7" %} selected="selected" {% endif %} >07</option>
<option value="8" {% if day_end == "8" %} selected="selected" {% endif %} >08</option>
<option value="9" {% if day_end == "9" %} selected="selected" {% endif %} >09</option>
<option value="10" {% if day_end == "10" %} selected="selected" {% endif %} >10</option>
<option value="11" {% if day_end == "11" %} selected="selected" {% endif %} >11</option>
<option value="12" {% if day_end == "12" %} selected="selected" {% endif %} >12</option>
<option value="13" {% if day_end == "13" %} selected="selected" {% endif %} >13</option>
<option value="14" {% if day_end == "14" %} selected="selected" {% endif %} >14</option>
<option value="15" {% if day_end == "15" %} selected="selected" {% endif %} >15</option>
<option value="16" {% if day_end == "16" %} selected="selected" {% endif %} >16</option>
<option value="17" {% if day_end == "17" %} selected="selected" {% endif %} >17</option>
<option value="18" {% if day_end == "18" %} selected="selected" {% endif %} >18</option>
<option value="19" {% if day_end == "19" %} selected="selected" {% endif %} >19</option>
<option value="20" {% if day_end == "20" %} selected="selected" {% endif %} >20</option>
<option value="21" {% if day_end == "21" %} selected="selected" {% endif %} >21</option>
<option value="22" {% if day_end == "22" %} selected="selected" {% endif %} >22</option>
<option value="23" {% if day_end == "23" %} selected="selected" {% endif %} >23</option>
<option value="24" {% if day_end == "24" %} selected="selected" {% endif %} >24</option>
<option value="25" {% if day_end == "25" %} selected="selected" {% endif %} >25</option>
<option value="26" {% if day_end == "26" %} selected="selected" {% endif %} >26</option>
<option value="27" {% if day_end == "27" %} selected="selected" {% endif %} >27</option>
<option value="28" {% if day_end == "28" %} selected="selected" {% endif %} >28</option>
<option value="29" {% if day_end == "29" %} selected="selected" {% endif %} >29</option>
<option value="30" {% if day_end == "30" %} selected="selected" {% endif %} >30</option>
<option value="31" {% if day_end == "31" %} selected="selected" {% endif %} >31</option>
</select>
/
<select name="month_end" class="form-control slt_fecha">
<option value=""></option>
<option value="1" {% if month_end == "1" %} selected="selected" {% endif %} >01</option>
<option value="2" {% if month_end == "2" %} selected="selected" {% endif %} >02</option>
<option value="3" {% if month_end == "3" %} selected="selected" {% endif %} >03</option>
<option value="4" {% if month_end == "4" %} selected="selected" {% endif %} >04</option>
<option value="5" {% if month_end == "5" %} selected="selected" {% endif %} >05</option>
<option value="6" {% if month_end == "6" %} selected="selected" {% endif %} >06</option>
<option value="7" {% if month_end == "7" %} selected="selected" {% endif %} >07</option>
<option value="8" {% if month_end == "8" %} selected="selected" {% endif %} >08</option>
<option value="9" {% if month_end == "9" %} selected="selected" {% endif %} >09</option>
<option value="10" {% if month_end == "10" %} selected="selected" {% endif %} >10</option>
<option value="11" {% if month_end == "11" %} selected="selected" {% endif %} >11</option>
<option value="12" {% if month_end == "12" %} selected="selected" {% endif %} >12</option>
</select>
/
<select name="year_end" class="form-control slt_fecha">
<option value=""></option>
{% for i in list_year_2 %}
{% if year_end == i %}
<option value="{{ i }}" selected="selected">{{ i }}</option>
{% else %}
<option value="{{ i }}">{{ i }}</option>
{% endif %}
{% endfor %}
</select>
</div>
<div class="alert alert-info col-lg-5 mensaje_info">Fecha de finalización de la evaluación final.
</div>
</div>
</div>
<div class="well subcampo">
<legend class="subcampo">RESULTADOS: </legend>
<div class="form-group">
<label class="control-label col-sm-3">Resultado final: </label>
<div class="col-sm-9">
<select name="RESULTADO_FINAL" class="form-control">
<option value=""></option>
{% if info.RESULTADO_FINAL == "0" %}
<option value="0" selected="selected">0 - Iniciado</option>
{% else %}
<option value="0">0 - Iniciado</option>
{% endif %}
{% if info.RESULTADO_FINAL == "1" %}
<option value="1" selected="selected">1 - Abandona por colocación</option>
{% else %}
<option value="1">1 - Abandona por colocación</option>
{% endif %}
{% if info.RESULTADO_FINAL == "2" %}
<option value="2" selected="selected">2 - Abandona por otras causas</option>
{% else %}
<option value="2">2 - Abandona por otras causas</option>
{% endif %}
{% if info.RESULTADO_FINAL == "3" %}
<option value="3" selected="selected">3 - Termina con evaluación positiva</option>
{% else %}
<option value="3">3 - Termina con evaluación positiva</option>
{% endif %}
{% if info.RESULTADO_FINAL == "4" %}
<option value="4" selected="selected">4 - Termina con evaluación negativa</option>
{% else %}
<option value="4">4 - Termina con evaluación negativa</option>
{% endif %}
{% if info.RESULTADO_FINAL == "5" %}
<option value="5" selected="selected">5 - Termina sin evaluar</option>
{% else %}
<option value="5">5 - Termina sin evaluar</option>
{% endif %}
{% if info.RESULTADO_FINAL == "6" %}
<option value="6" selected="selected">6 - Exento</option>
{% else %}
<option value="6">6 - Exento</option>
{% endif %}
{% if info.RESULTADO_FINAL == "7" %}
<option value="7" selected="selected">7 - Eximido</option>
{% else %}
<option value="7">7 - Eximido</option>
{% endif %}
</select>
<div class="alert alert-info mensaje_info mtop5">Valor que indica la situación del participante y el resultado logrado por el participante en la especialidad de la acción formativa.<br />
Puede tomar los valores de:<br />
<ul>
<li>0 – Iniciado</li>
<li>1 – Abandona por colocación</li>
<li>2 – Abandona por otras causas</li>
<li>3 – Termina con evaluación positiva</li>
<li>4 – Termina con evaluación negativa</li>
<li>5 – Termina sin evaluar</li>
<li>6 – Exento (de la realización del módulo de formación práctica en centros de trabajo por formación en alternancia con el empleo o por acreditación de la experiencia laboral requerida a tal fin, según lo establecido en el artículo 5bis4 del Real Decreto 34/2008, de 18 de enero).</li>
<li>7 – Eximido (de la realización aquellos módulos formativos asociados a unidades de competencia para las que se ha obtenido acreditación, ya sea mediante formación o a través de procesos de reconocimiento de las competencias profesionales adquiridas por la experiencia laboral, regulados en el Real Decreto 1224/2009, de 17 de julio).</li>
</ul>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">Calificación final: </label>
<div class="col-sm-9">
<input class="form-control" type="text" name="CALIFICACION_FINAL" value="{{ info.CALIFICACION_FINAL }}" />
<div class="alert alert-info mensaje_info mtop5">
Puntuación obtenida en la prueba de evaluación final del módulo (con independencia de la convocatoria en la que se obtuvo) reflejando, en su caso, las puntuaciones correspondientes a las unidades formativas que lo compongan.<br />
Adopta un valor entre 5 y 10, registrándose con cuatro dígitos para dar cabida a las calificaciones decimales (por ejemplo, la calificación 7,6 debe registrarse como 760).
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">Puntuación final: </label>
<div class="col-sm-9">
<input class="form-control" class="form-control" type="text" name="PUNTUACION_FINAL" value="{{ info.PUNTUACION_FINAL }}" />
<div class="alert alert-info mensaje_info mtop5">Suma de la puntuación media obtenida en la evaluación durante el proceso de aprendizaje, y de la puntuación obtenida en la prueba de evaluación final del módulo, ponderándolas previamente con un peso de 30 por ciento y 70 por ciento, respectivamente.
Adopta un valor entre 5 y 10, sin que pueda ser inferior a 5, ni inferior a la obtenida en la prueba de evaluación final.<br />
Se registra con cuatro dígitos para dar cabida a las puntuaciones decimales (por ejemplo, la puntuación 8,3 debe registrarse como 830).</div>
</div>
</div>
</div>
</fieldset>
</div>
</div>
</form>
</div>

@ -0,0 +1,299 @@
<script type='text/javascript' src="../js/sepe.js"></script>
<script type='text/javascript'>
$(document).ready(function () {
//Al pulsar submit se comprueba si al guardar una edición un profesor chamilo existente puede
// remplazar sus datos
$("input[type='submit']").click(function(e){
e.preventDefault();
e.stopPropagation();
if( $("#slt_user_existente").val() == "SI" ){
if($("select[name='tutor_existente']").val()==""){
alert("Seleccione un tutor de la lista o seleccione Crear nuevo tutor")
}else{
$("form").submit();
}
}else{
var tipo_documento = $("select[name='TIPO_DOCUMENTO']").val();
var num_documento = $("input[name='NUM_DOCUMENTO']").val();
var letra_nif = $("input[name='LETRA_NIF']").val();
vcodchamilo = $("select[name='cod_user_chamilo']").val();
if($.trim(tipo_documento)=='' || $.trim(num_documento)=='' || $.trim(letra_nif)==''){
alert("Los campos de Identificador del tutor son obligatorios");
}else{
if($("input[name='new_tutor']" ).val()=="NO"){
$.post("function.php", {tab:"comprobar_editar_tutor", tipo:tipo_documento, num:num_documento, letra:letra_nif, codchamilo:vcodchamilo},
function (data) {
if (data.status == "false") {
if(confirm(data.content)){
$("form").submit();
}
} else {
$("form").submit();
}
}, "json");
}else{
$("form").submit();
}
}
}
});
});
</script>
<link rel="stylesheet" type="text/css" href="../resources/plugin.css"/>
<div class="row">
<form class="form-horizontal" action="editar-especialidad-tutor.php" method="post" name="form_specialty_action">
<div class="col-md-3">
<div id="course_category_well" class="well">
<ul class="nav nav-list">
<li class="nav-header"><h3>Acciones:</h3></li>
<li>
{% if new_tutor == "SI" %}
<input type="hidden" name="cod_action" value="{{ cod_action }}" />
<input type="hidden" name="cod_specialty" value="{{ cod_specialty }}" />
<input type="hidden" name="new_tutor" value="SI" />
{% else %}
<input type="hidden" name="cod_action" value="{{ cod_action }}" />
<input type="hidden" name="cod_specialty" value="{{ cod_specialty }}" />
<input type="hidden" name="cod_s_tutor" value="{{ cod_tutor }}" />
<input type="hidden" name="new_tutor" value="NO" />
{% endif %}
<input class="btn btn-primary btn_menu_lateral" type="submit" value="Guardar cambios" />
</li>
<li>
<input class="btn btn-warning btn_menu_lateral" type="reset" value="Restablecer" />
</li>
</ul>
</div>
</div>
<div class="col-md-9">
{% if message_info != "" %}
<div class="alert alert-success">
{{ message_info }}
</div>
{% endif %}
{% if message_error != "" %}
<div class="alert alert-danger">
{{ message_error }}
</div>
{% endif %}
{% if new_tutor == "SI" %}
<div class="well_border">
<div class="form-group">
<label class="control-label col-sm-3">Usar tutor existente: </label>
<div class="col-sm-9">
<select id="slt_user_existente" class="form-control" name="slt_user_existente">
<option value="SI" selected="selected">Usar existente</option>
<option value="NO">Crear nuevo tutor</option>
</select>
</div>
</div>
</div>
<div class="well_border" id="box_listado_tutores">
<fieldset>
<legend>Listado de tutores</legend>
<div class="form-group">
<label class="control-label col-sm-3">Tutor: </label>
<div class="col-sm-9">
<select name="tutor_existente" class="form-control">
<option value=""></option>
{% for tutor in listTutorsExistentes %}
<option value="{{ tutor.cod }}">{{ tutor.datos }}</option>
{% endfor %}
</select>
</div>
</div>
</fieldset>
</div>
<div class="well_border" style="display:none" id="box_datos_tutor">
{% else %}
<input type="hidden" name="slt_user_existente" value="NO" />
<div class="well_border" id="box_datos_tutor">
{% endif %}
<fieldset>
<legend>Tutor - Formador</legend>
<div class="well subcampo">
<legend class="subcampo">IDENTIFICADOR DEL TUTOR: </legend>
<div class="form-group">
<label class="control-label col-sm-3">Tipo del documento: </label>
<div class="col-sm-9">
<select name="TIPO_DOCUMENTO" class="form-control">
<option value=""></option>
{% if info.TIPO_DOCUMENTO == "D" %}
<option value="D" selected="selected">D - Documento Nacional de Identidad (DNI)</option>
{% else %}
<option value="D">D - Documento Nacional de Identidad (DNI).</option>
{% endif %}
{% if info.TIPO_DOCUMENTO == "E" %}
<option value="E" selected="selected">E - Número de Identificador de Extranjero (NIE)</option>
{% else %}
<option value="E">E - Número de Identificador de Extranjero (NIE)</option>
{% endif %}
{% if info.TIPO_DOCUMENTO == "U" %}
<option value="U" selected="selected">U - Identificación convencional para ciudadanos del Espacio Económico Europeo sin NIE</option>
{% else %}
<option value="U">U - Identificación convencional para ciudadanos del Espacio Económico Europeo sin NIE</option>
{% endif %}
{% if info.TIPO_DOCUMENTO == "G" %}
<option value="G" selected="selected">G - Personas privadas de libertad</option>
{% else %}
<option value="G">G - Personas privadas de libertad</option>
{% endif %}
{% if info.TIPO_DOCUMENTO == "W" %}
<option value="W" selected="selected">W - Identificación convencional para ciudadanos que no pertenecen Espacio Económico Europeo y sin NIE</option>
{% else %}
<option value="W">W - Identificación convencional para ciudadanos que no pertenecen Espacio Económico Europeo y sin NIE</option>
{% endif %}
{% if info.TIPO_DOCUMENTO == "H" %}
<option value="H" selected="selected">H - Identificación convencional de Personas que no hayan podido ser adecuadas en el proceso de adecuación de datos</option>
{% else %}
<option value="H">H - Identificación convencional de Personas que no hayan podido ser adecuadas en el proceso de adecuación de datos</option>
{% endif %}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">Número del documento: </label>
<div class="col-sm-2">
<input class="form-control" type="text" name="NUM_DOCUMENTO" value="{{ info.NUM_DOCUMENTO }}" />
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">Letra del NIF: </label>
<div class="col-sm-1">
<input class="form-control" type="text" name="LETRA_NIF" value="{{ info.LETRA_NIF }}" />
</div>
</div>
<div class="warning-message">
El campo de "Número del documento" tiene una longitud de 10 caracteres alfanuméricos.
<table id="tabla_info_nif">
<tr><th>Tipo</th><th>Número</th><th>Carácter de control NIF</th></tr>
<tr><td>D</td><td>bbN8</td><td>L</td></tr>
<tr><td>E</td><td>bbXN7<br />bbYN7<br />bbZN7</td><td>L<br />L<br />L</td></tr>
<tr><td>U</td><td>bbN8</td><td>L</td></tr>
<tr><td>W</td><td>bbN8</td><td>L</td></tr>
<tr><td>G</td><td>N10</td><td>L</td></tr>
<tr><td>H</td><td>bbN8</td><td>L</td></tr>
</table>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">Acreditación del tutor: </label>
<div class="col-sm-9">
<input class="form-control" type="text" name="ACREDITACION_TUTOR" value="{{ info.ACREDITACION_TUTOR }}" style="width:100%" />
<div class="alert alert-info mensaje_info mtop5">Titulación o certificación de la formación académica o profesional que posee.</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">Experiencia profesional: </label>
<div class="col-sm-2">
<input class="form-control" class="numerico" type="number" name="EXPERIENCIA_PROFESIONAL" value="{{ info.EXPERIENCIA_PROFESIONAL }}" />
</div>
<div class="alert alert-info mensaje_info col-sm-7">Duración (en años) de experiencia profesional en el campo de las competencias relacionadas con el módulo formativo.</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">Competencia docente: </label>
<div class="col-sm-9">
<select name="COMPETENCIA_DOCENTE" class="form-control" >
<option value=""></option>
{% if info.COMPETENCIA_DOCENTE == "01" %}
<option value="01" selected="selected">Certificado de profesionalidad de docencia de la formación profesional para el empleo</option>
{% else %}
<option value="01">Certificado de profesionalidad de docencia de la formación profesional para el empleo</option>
{% endif %}
{% if info.COMPETENCIA_DOCENTE == "02" %}
<option value="02" selected="selected">Certificado de profesionalidad de formador ocupacional</option>
{% else %}
<option value="02">Certificado de profesionalidad de formador ocupacional</option>
{% endif %}{% if info.COMPETENCIA_DOCENTE == "03" %}
<option value="03" selected="selected">Certificado de Aptitud Pedagógica o título profesional de Especialización Didáctica o Certificado de Cualificación Pedagógica</option>
{% else %}
<option value="03">Certificado de Aptitud Pedagógica o título profesional de Especialización Didáctica o Certificado de Cualificación Pedagógica</option>
{% endif %}{% if info.COMPETENCIA_DOCENTE == "04" %}
<option value="04" selected="selected">Máster Universitario</option>
{% else %}
<option value="04">Máster Universitario</option>
{% endif %}{% if info.COMPETENCIA_DOCENTE == "05" %}
<option value="05" selected="selected">Curso de formación equivalente a la formación pedagógica y didáctica</option>
{% else %}
<option value="05">Curso de formación equivalente a la formación pedagógica y didáctica</option>
{% endif %}{% if info.COMPETENCIA_DOCENTE == "06" %}
<option value="06" selected="selected">Experiencia docente contrastada de al menos 600 horas de impartición de acciones formativas</option>
{% else %}
<option value="06">Experiencia docente contrastada de al menos 600 horas de impartición de acciones formativas</option>
{% endif %}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">Experiencia modalidad teleformación: </label>
<div class="col-sm-2">
<input class="form-control" type="number" name="EXPERIENCIA_MODALIDAD_TELEFORMACION" value="{{ info.EXPERIENCIA_MODALIDAD_TELEFORMACION }}" />
</div>
<div class="col-sm-7 alert alert-info mensaje_info">Número entero que equivale a la duración (en horas) de experiencia docente en modalidad de teleformación.</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">Formación modalidad teleformación: </label>
<div class="col-sm-9">
<select name="FORMACION_MODALIDAD_TELEFORMACION" class="form-control">
<option value=""></option>
{% if info.FORMACION_MODALIDAD_TELEFORMACION == "01" %}
<option value="01" selected="selected">Certificado de profesionalidad de docencia de la formación profesional para el empleo</option>
{% else %}
<option value="01">Certificado de profesionalidad de docencia de la formación profesional para el empleo</option>
{% endif %}
{% if info.FORMACION_MODALIDAD_TELEFORMACION == "02" %}
<option value="02" selected="selected">Acreditación parcial acumulable correspondiente al módulo formativo MF1444_3</option>
{% else %}
<option value="02">Acreditación parcial acumulable correspondiente al módulo formativo MF1444_3</option>
{% endif %}
{% if info.FORMACION_MODALIDAD_TELEFORMACION == "03" %}
<option value="03" selected="selected">Diploma expedido por la administración laboral competente que certifique que se ha superado con evaluación positiva la formación, de duración no inferior a 30 horas</option>
{% else %}
<option value="03">Diploma expedido por la administración laboral competente que certifique que se ha superado con evaluación positiva la formación, de duración no inferior a 30 horas</option>
{% endif %}
{% if info.FORMACION_MODALIDAD_TELEFORMACION == "04" %}
<option value="04" selected="selected">Diploma que certifique que se han superado con evaluación positiva acciones de formación, de al menos 30 horas de duración</option>
{% else %}
<option value="04">Diploma que certifique que se han superado con evaluación positiva acciones de formación, de al menos 30 horas de duración</option>
{% endif %}
</select>
</div>
</div>
<div class="well subcampo">
<legend class="subcampo">PROFESOR CURSO CHAMILO: </legend>
<div class="form-group">
<label class="control-label col-sm-3">Profesor: </label>
<div class="col-sm-9">
<select name="cod_user_chamilo" class="form-control">
<option value=""></option>
{% for profesor in listProfesor %}
{% if info.cod_user_chamilo == profesor.user_id %}
<option value="{{ profesor.user_id }}" selected="selected">{{ profesor.firstname }} {{ profesor.lastname }}</option>
{% else %}
<option value="{{ profesor.user_id }}">{{ profesor.firstname }} {{ profesor.lastname }}</option>
{% endif %}
{% endfor %}
</select>
</div>
</div>
</div>
</div>
</form>
</div>

@ -0,0 +1,199 @@
<script type='text/javascript' src="../js/sepe.js"></script>
<link rel="stylesheet" type="text/css" href="../resources/plugin.css"/>
<div class="row">
<form class="form-horizontal" action="editar-especialidad-tutorials.php" method="post" name="form_specialty_action">
<div class="col-md-3">
<div id="course_category_well" class="well">
<ul class="nav nav-list">
<li class="nav-header"><h3>Acciones:</h3></li>
<li>
{% if new_tutorial == "SI" %}
<input type="hidden" name="cod_action" value="{{ cod_action }}" />
<input type="hidden" name="cod_specialty" value="{{ cod_specialty }}" />
<input type="hidden" name="new_tutorial" value="SI" />
{% else %}
<input type="hidden" name="cod_action" value="{{ cod_action }}" />
<input type="hidden" name="cod_specialty" value="{{ cod_specialty }}" />
<input type="hidden" name="cod_tutorial" value="{{ cod_tutorial }}" />
<input type="hidden" name="new_tutorial" value="NO" />
{% endif %}
<input class="btn btn-primary btn_menu_lateral" type="submit" value="Guardar cambios" />
</li>
<li>
<input class="btn btn-warning btn_menu_lateral" type="reset" value="Restablecer" />
</li>
</ul>
</div>
</div>
<div class="col-md-9">
{% if message_info != "" %}
<div class="alert alert-success">
{{ message_info }}
</div>
{% endif %}
{% if message_error != "" %}
<div class="alert alert-danger">
{{ message_error }}
</div>
{% endif %}
<div class="well_border">
<fieldset>
<legend>CENTRO PRESENCIAL</legend>
<div class="form-group">
<label class="control-label col-sm-3">Origen del centro: </label>
<div class="col-sm-9">
<input class="form-control" type="text" name="ORIGEN_CENTRO" value="{{ info.ORIGEN_CENTRO }}" />
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">Código del centro: </label>
<div class="col-sm-9">
<input class="form-control" type="text" name="CODIGO_CENTRO" value="{{ info.CODIGO_CENTRO }}" />
</div>
</div>
</fieldset>
<div class="form-group">
<label class="control-label col-lg-3">Fecha de Inicio: </label>
<div class="col-lg-4">
<select name="day_start" class="form-control slt_fecha">
<option value=""></option>
<option value="1" {% if day_start == "1" %} selected="selected" {% endif %} >01</option>
<option value="2" {% if day_start == "2" %} selected="selected" {% endif %} >02</option>
<option value="3" {% if day_start == "3" %} selected="selected" {% endif %} >03</option>
<option value="4" {% if day_start == "4" %} selected="selected" {% endif %} >04</option>
<option value="5" {% if day_start == "5" %} selected="selected" {% endif %} >05</option>
<option value="6" {% if day_start == "6" %} selected="selected" {% endif %} >06</option>
<option value="7" {% if day_start == "7" %} selected="selected" {% endif %} >07</option>
<option value="8" {% if day_start == "8" %} selected="selected" {% endif %} >08</option>
<option value="9" {% if day_start == "9" %} selected="selected" {% endif %} >09</option>
<option value="10" {% if day_start == "10" %} selected="selected" {% endif %} >10</option>
<option value="11" {% if day_start == "11" %} selected="selected" {% endif %} >11</option>
<option value="12" {% if day_start == "12" %} selected="selected" {% endif %} >12</option>
<option value="13" {% if day_start == "13" %} selected="selected" {% endif %} >13</option>
<option value="14" {% if day_start == "14" %} selected="selected" {% endif %} >14</option>
<option value="15" {% if day_start == "15" %} selected="selected" {% endif %} >15</option>
<option value="16" {% if day_start == "16" %} selected="selected" {% endif %} >16</option>
<option value="17" {% if day_start == "17" %} selected="selected" {% endif %} >17</option>
<option value="18" {% if day_start == "18" %} selected="selected" {% endif %} >18</option>
<option value="19" {% if day_start == "19" %} selected="selected" {% endif %} >19</option>
<option value="20" {% if day_start == "20" %} selected="selected" {% endif %} >20</option>
<option value="21" {% if day_start == "21" %} selected="selected" {% endif %} >21</option>
<option value="22" {% if day_start == "22" %} selected="selected" {% endif %} >22</option>
<option value="23" {% if day_start == "23" %} selected="selected" {% endif %} >23</option>
<option value="24" {% if day_start == "24" %} selected="selected" {% endif %} >24</option>
<option value="25" {% if day_start == "25" %} selected="selected" {% endif %} >25</option>
<option value="26" {% if day_start == "26" %} selected="selected" {% endif %} >26</option>
<option value="27" {% if day_start == "27" %} selected="selected" {% endif %} >27</option>
<option value="28" {% if day_start == "28" %} selected="selected" {% endif %} >28</option>
<option value="29" {% if day_start == "29" %} selected="selected" {% endif %} >29</option>
<option value="30" {% if day_start == "30" %} selected="selected" {% endif %} >30</option>
<option value="31" {% if day_start == "31" %} selected="selected" {% endif %} >31</option>
</select>
/
<select name="month_start" class="form-control slt_fecha">
<option value=""></option>
<option value="1" {% if month_start == "1" %} selected="selected" {% endif %} >01</option>
<option value="2" {% if month_start == "2" %} selected="selected" {% endif %} >02</option>
<option value="3" {% if month_start == "3" %} selected="selected" {% endif %} >03</option>
<option value="4" {% if month_start == "4" %} selected="selected" {% endif %} >04</option>
<option value="5" {% if month_start == "5" %} selected="selected" {% endif %} >05</option>
<option value="6" {% if month_start == "6" %} selected="selected" {% endif %} >06</option>
<option value="7" {% if month_start == "7" %} selected="selected" {% endif %} >07</option>
<option value="8" {% if month_start == "8" %} selected="selected" {% endif %} >08</option>
<option value="9" {% if month_start == "9" %} selected="selected" {% endif %} >09</option>
<option value="10" {% if month_start == "10" %} selected="selected" {% endif %} >10</option>
<option value="11" {% if month_start == "11" %} selected="selected" {% endif %} >11</option>
<option value="12" {% if month_start == "12" %} selected="selected" {% endif %} >12</option>
</select>
/
<select name="year_start" class="form-control slt_fecha">
<option value=""></option>
{% for i in list_year %}
{% if year_start == i %}
<option value="{{ i }}" selected="selected">{{ i }}</option>
{% else %}
<option value="{{ i }}">{{ i }}</option>
{% endif %}
{% endfor %}
</select>
</div>
<div class="lert alert-info mensaje_info col-lg-5">Fecha de inicio de la tutoría presencial.</div>
</div>
<div class="form-group">
<label class="col-lg-3 control-label">Fecha Fin: </label>
<div class="col-lg-4">
<select name="day_end" class="form-control slt_fecha">
<option value=""></option>
<option value="1" {% if day_end == "1" %} selected="selected" {% endif %} >01</option>
<option value="2" {% if day_end == "2" %} selected="selected" {% endif %} >02</option>
<option value="3" {% if day_end == "3" %} selected="selected" {% endif %} >03</option>
<option value="4" {% if day_end == "4" %} selected="selected" {% endif %} >04</option>
<option value="5" {% if day_end == "5" %} selected="selected" {% endif %} >05</option>
<option value="6" {% if day_end == "6" %} selected="selected" {% endif %} >06</option>
<option value="7" {% if day_end == "7" %} selected="selected" {% endif %} >07</option>
<option value="8" {% if day_end == "8" %} selected="selected" {% endif %} >08</option>
<option value="9" {% if day_end == "9" %} selected="selected" {% endif %} >09</option>
<option value="10" {% if day_end == "10" %} selected="selected" {% endif %} >10</option>
<option value="11" {% if day_end == "11" %} selected="selected" {% endif %} >11</option>
<option value="12" {% if day_end == "12" %} selected="selected" {% endif %} >12</option>
<option value="13" {% if day_end == "13" %} selected="selected" {% endif %} >13</option>
<option value="14" {% if day_end == "14" %} selected="selected" {% endif %} >14</option>
<option value="15" {% if day_end == "15" %} selected="selected" {% endif %} >15</option>
<option value="16" {% if day_end == "16" %} selected="selected" {% endif %} >16</option>
<option value="17" {% if day_end == "17" %} selected="selected" {% endif %} >17</option>
<option value="18" {% if day_end == "18" %} selected="selected" {% endif %} >18</option>
<option value="19" {% if day_end == "19" %} selected="selected" {% endif %} >19</option>
<option value="20" {% if day_end == "20" %} selected="selected" {% endif %} >20</option>
<option value="21" {% if day_end == "21" %} selected="selected" {% endif %} >21</option>
<option value="22" {% if day_end == "22" %} selected="selected" {% endif %} >22</option>
<option value="23" {% if day_end == "23" %} selected="selected" {% endif %} >23</option>
<option value="24" {% if day_end == "24" %} selected="selected" {% endif %} >24</option>
<option value="25" {% if day_end == "25" %} selected="selected" {% endif %} >25</option>
<option value="26" {% if day_end == "26" %} selected="selected" {% endif %} >26</option>
<option value="27" {% if day_end == "27" %} selected="selected" {% endif %} >27</option>
<option value="28" {% if day_end == "28" %} selected="selected" {% endif %} >28</option>
<option value="29" {% if day_end == "29" %} selected="selected" {% endif %} >29</option>
<option value="30" {% if day_end == "30" %} selected="selected" {% endif %} >30</option>
<option value="31" {% if day_end == "31" %} selected="selected" {% endif %} >31</option>
</select>
/
<select name="month_end" class="form-control slt_fecha">
<option value=""></option>
<option value="1" {% if month_end == "1" %} selected="selected" {% endif %} >01</option>
<option value="2" {% if month_end == "2" %} selected="selected" {% endif %} >02</option>
<option value="3" {% if month_end == "3" %} selected="selected" {% endif %} >03</option>
<option value="4" {% if month_end == "4" %} selected="selected" {% endif %} >04</option>
<option value="5" {% if month_end == "5" %} selected="selected" {% endif %} >05</option>
<option value="6" {% if month_end == "6" %} selected="selected" {% endif %} >06</option>
<option value="7" {% if month_end == "7" %} selected="selected" {% endif %} >07</option>
<option value="8" {% if month_end == "8" %} selected="selected" {% endif %} >08</option>
<option value="9" {% if month_end == "9" %} selected="selected" {% endif %} >09</option>
<option value="10" {% if month_end == "10" %} selected="selected" {% endif %} >10</option>
<option value="11" {% if month_end == "11" %} selected="selected" {% endif %} >11</option>
<option value="12" {% if month_end == "12" %} selected="selected" {% endif %} >12</option>
</select>
/
<select name="year_end" class="form-control slt_fecha">
<option value=""></option>
{% for i in list_year %}
{% if year_end == i %}
<option value="{{ i }}" selected="selected">{{ i }}</option>
{% else %}
<option value="{{ i }}">{{ i }}</option>
{% endif %}
{% endfor %}
</select>
</div>
<div class="alert alert-info mensaje_info col-lg-5">Fecha de finalización de la tutoría presencial.</div>
</div>
</div>
</div>
</div>
</form>
</div>

@ -0,0 +1,410 @@
<script type='text/javascript' src="../js/sepe.js"></script>
<script type='text/javascript'>
$(document).ready(function () {
$("select[name='cod_tutor_empresa']").change(function(){
if($(this).val() == "nuevo_tutor_empresa"){
$("#box_nuevo_tutor_empresa").show();
}else{
$("#box_nuevo_tutor_empresa").hide();
}
});
$("select[name='cod_tutor_formacion']").change(function(){
if($(this).val() == "nuevo_tutor_formacion"){
$("#box_nuevo_tutor_formacion").show();
}else{
$("#box_nuevo_tutor_formacion").hide();
}
});
});
</script>
<link rel="stylesheet" type="text/css" href="../resources/plugin.css"/>
<div class="row">
<form class="form-horizontal" action="editar-participante-accion.php" method="post" name="form_participant_action">
<div class="col-md-3">
<div id="course_category_well" class="well">
<ul class="nav nav-list">
<li class="nav-header"><h3>Acciones:</h3></li>
<li>
{% if new_participant == "SI" %}
<input type="hidden" name="cod_action" value="{{ cod_action }}" />
<input type="hidden" name="new_participant" value="SI" />
{% else %}
<input type="hidden" name="cod_action" value="{{ cod_action }}" />
<input type="hidden" name="cod_participant" value="{{ cod_participant }}" />
<input type="hidden" name="new_participant" value="NO" />
{% endif %}
<input class="btn btn-primary btn_menu_lateral" type="submit" value="Guardar cambios" />
</li>
<li>
<input class="btn btn-warning btn_menu_lateral" type="reset" value="Restablecer" />
</li>
</ul>
</div>
</div>
<div class="col-md-9">
{% if message_info != "" %}
<div class="alert alert-success">
{{ message_info }}
</div>
{% endif %}
{% if message_error != "" %}
<div class="alert alert-danger">
{{ message_error }}
</div>
{% endif %}
<div class="well_border">
<fieldset>
<legend>Participante Acción Formativa</legend>
<div class="well subcampo">
<legend class="subcampo">LISTADO DE USUARIOS DEL CURSO CHAMILO: </legend>
<div class="form-group">
<label class="control-label col-sm-3">Alumno: </label>
<div class="col-sm-9">
<select name="cod_user_chamilo" id="cod_user_chamilo" class="form-control">
{% if info_user_chamilo is empty %}
<option value="" selected="selected"></option>
{% else %}
<option value=""></option>
<option value="{{ info_user_chamilo.user_id }}" selected="selected">{{ info_user_chamilo.firstname }} {{ info_user_chamilo.lastname }}</option>
{% endif %}
{% for alumno in listAlumno %}
<option value="{{ alumno.user_id }}">{{ alumno.firstname }} {{ alumno.lastname }}</option>
{% endfor %}
</select>
</div>
</div>
</div>
<div class="well subcampo">
<legend class="subcampo">IDENTIFICADOR PARTICIPANTE: </legend>
<div class="form-group">
<label class="control-label col-sm-3">Tipo de documento: </label>
<div class="col-sm-9">
<select name="TIPO_DOCUMENTO" class="form-control">
<option value=""></option>
{% if info.TIPO_DOCUMENTO == "D" %}
<option value="D" selected="selected">D - Documento Nacional de Identidad (DNI)</option>
{% else %}
<option value="D">D - Documento Nacional de Identidad (DNI).</option>
{% endif %}
{% if info.TIPO_DOCUMENTO == "E" %}
<option value="E" selected="selected">E - Número de Identificador de Extranjero (NIE)</option>
{% else %}
<option value="E">E - Número de Identificador de Extranjero (NIE)</option>
{% endif %}
{% if info.TIPO_DOCUMENTO == "U" %}
<option value="U" selected="selected">U - Identificación convencional para ciudadanos del Espacio Económico Europeo sin NIE</option>
{% else %}
<option value="U">U - Identificación convencional para ciudadanos del Espacio Económico Europeo sin NIE</option>
{% endif %}
{% if info.TIPO_DOCUMENTO == "G" %}
<option value="G" selected="selected">G - Personas privadas de libertad</option>
{% else %}
<option value="G">G - Personas privadas de libertad</option>
{% endif %}
{% if info.TIPO_DOCUMENTO == "W" %}
<option value="W" selected="selected">W - Identificación convencional para ciudadanos que no pertenecen Espacio Económico Europeo y sin NIE</option>
{% else %}
<option value="W">W - Identificación convencional para ciudadanos que no pertenecen Espacio Económico Europeo y sin NIE</option>
{% endif %}
{% if info.TIPO_DOCUMENTOO == "H" %}
<option value="H" selected="selected">H - Identificación convencional de Personas que no hayan podido ser adecuadas en el proceso de adecuación de datos</option>
{% else %}
<option value="H">H - Identificación convencional de Personas que no hayan podido ser adecuadas en el proceso de adecuación de datos</option>
{% endif %}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">Número de documento: </label>
<div class="col-sm-3">
<input class="form-control" type="text" name="NUM_DOCUMENTO" value="{{ info.NUM_DOCUMENTO }}" />
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">Letra NIF: </label>
<div class="col-sm-2">
<input class="form-control" type="text" name="LETRA_NIF" value="{{ info.LETRA_NIF }}" />
</div>
</div>
<div class="alert alert-warning">
El campo de "Número del documento" tiene una longitud de 10 caracteres alfanuméricos.
<table id="tabla_info_nif">
<tr><th>Tipo</th><th>Número</th><th>Carácter de control NIF</th></tr>
<tr><td>D</td><td>bbN8</td><td>L</td></tr>
<tr><td>E</td><td>bbXN7<br />bbYN7<br />bbZN7</td><td>L<br />L<br />L</td></tr>
<tr><td>U</td><td>bbN8</td><td>L</td></tr>
<tr><td>W</td><td>bbN8</td><td>L</td></tr>
<tr><td>G</td><td>N10</td><td>L</td></tr>
<tr><td>H</td><td>bbN8</td><td>L</td></tr>
</table>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">Indicador de competencias clave: </label>
<div class="col-sm-9">
<input class="form-control" type="text" name="INDICADOR_COMPETENCIAS_CLAVE" value="{{ info.INDICADOR_COMPETENCIAS_CLAVE }}" />
</div>
</div>
<div class="well subcampo">
<legend class="subcampo">CONTRATO FORMACION: </legend>
<div class="form-group">
<label class="control-label col-sm-3">ID contrato CFA: </label>
<div class="col-sm-9">
<input class="form-control" type="text" name="ID_CONTRATO_CFA" value="{{ info.ID_CONTRATO_CFA }}" />
<em class="alert alert-info mensaje_info mtop5">Dato alfanumérico de 14 posiciones formado por la concatenación de:<br />
<ul>
<li> 1 posición alfabética que indica el organismo que asignó identificador al contrato. En la actualidad siempre “E” estatal.</li>
<li> 2 posiciones numéricas con el código de la provincia.</li>
<li> 4 posiciones numéricas con el año del contrato.</li>
<li> 7 posiciones numéricas con el número secuencial asignado al contrato en la provincia y año.</li></ul></em>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">CIF empresa: </label>
<div class="col-sm-9">
<input class="form-control" type="text" name="CIF_EMPRESA" value="{{ info.CIF_EMPRESA }}" />
</div>
</div>
<div class="well">
<legend class="subcampo2">ID TUTOR EMPRESA: </legend>
<div class="form-group">
<label class="control-label col-sm-3">Listado tutores empresa</label>
<div class="col-sm-9">
<select name="cod_tutor_empresa" class="form-control">
<option value="nuevo_tutor_empresa">Crear nuevo tutor empresa</option>
{% for tutor in listTutorE %}
{% if tutor.cod == info.cod_tutor_empresa or ( info|length == 0 and tutor.cod == "1" ) %}
<option value="{{ tutor.cod }}" selected="selected">{{ tutor.alias }}</option>
{% else %}
<option value="{{ tutor.cod }}">{{ tutor.alias }}</option>
{% endif %}
{% endfor %}
</select>
</div>
</div>
<div id="box_nuevo_tutor_empresa" style="display:none">
<div class="form-group">
<label class="control-label col-sm-3">Nombre</label>
<div class="col-sm-9">
<input class="form-control" type="text" name="TE_alias" value="" />
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">Tipo de documento: </label>
<div class="col-sm-9">
<select name="TE_TIPO_DOCUMENTO" class="form-control">
<option value=""></option>
{% if info.TE_TIPO_DOCUMENTO == "D" %}
<option value="D" selected="selected">D - Documento Nacional de Identidad (DNI)</option>
{% else %}
<option value="D">D - Documento Nacional de Identidad (DNI).</option>
{% endif %}
{% if info.TE_TIPO_DOCUMENTO == "E" %}
<option value="E" selected="selected">E - Número de Identificador de Extranjero (NIE)</option>
{% else %}
<option value="E">E - Número de Identificador de Extranjero (NIE)</option>
{% endif %}
{% if info.TE_TIPO_DOCUMENTO == "U" %}
<option value="U" selected="selected">U - Identificación convencional para ciudadanos del Espacio Económico Europeo sin NIE</option>
{% else %}
<option value="U">U - Identificación convencional para ciudadanos del Espacio Económico Europeo sin NIE</option>
{% endif %}
{% if info.TE_TIPO_DOCUMENTO == "G" %}
<option value="G" selected="selected">G - Personas privadas de libertad</option>
{% else %}
<option value="G">G - Personas privadas de libertad</option>
{% endif %}
{% if info.TE_TIPO_DOCUMENTO == "W" %}
<option value="W" selected="selected">W - Identificación convencional para ciudadanos que no pertenecen Espacio Económico Europeo y sin NIE</option>
{% else %}
<option value="W">W - Identificación convencional para ciudadanos que no pertenecen Espacio Económico Europeo y sin NIE</option>
{% endif %}
{% if info.TE_TIPO_DOCUMENTOO == "H" %}
<option value="H" selected="selected">H - Identificación convencional de Personas que no hayan podido ser adecuadas en el proceso de adecuación de datos</option>
{% else %}
<option value="H">H - Identificación convencional de Personas que no hayan podido ser adecuadas en el proceso de adecuación de datos</option>
{% endif %}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">Número de documento: </label>
<div class="col-sm-3">
<input class="form-control" type="text" name="TE_NUM_DOCUMENTO" value="" />
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">Letra NIF: </label>
<div class="col-sm-2">
<input class="form-control" type="text" name="TE_LETRA_NIF" value="" />
</div>
</div>
<div class="alert alert-warning mensaje_info">
El campo de "Número del documento" tiene una longitud de 10 caracteres alfanuméricos.
<table id="tabla_info_nif">
<tr><th>Tipo</th><th>Número</th><th>Carácter de control NIF</th></tr>
<tr><td>D</td><td>bbN8</td><td>L</td></tr>
<tr><td>E</td><td>bbXN7<br />bbYN7<br />bbZN7</td><td>L<br />L<br />L</td></tr>
<tr><td>U</td><td>bbN8</td><td>L</td></tr>
<tr><td>W</td><td>bbN8</td><td>L</td></tr>
<tr><td>G</td><td>N10</td><td>L</td></tr>
<tr><td>H</td><td>bbN8</td><td>L</td></tr>
</table>
</div>
</div>
</div>
<div class="well">
<legend class="subcampo2">ID TUTOR FORMACIÓN: </legend>
<div class="form-group">
<label class="control-label col-sm-3">Listado tutores formación</label>
<div class="col-sm-9">
<select name="cod_tutor_formacion" class="form-control">
<option value="nuevo_tutor_formacion">Crear nuevo tutor formación</option>
{% for tutor in listTutorF %}
{% if tutor.cod == info.cod_tutor_formacion or ( info|length == 0 and tutor.cod == "1" ) %}
<option value="{{ tutor.cod }}" selected="selected">{{ tutor.alias }}</option>
{% else %}
<option value="{{ tutor.cod }}">{{ tutor.alias }}</option>
{% endif %}
{% endfor %}
</select>
</div>
</div>
<div id="box_nuevo_tutor_formacion" style="display:none">
<div class="form-group">
<label class="control-label col-sm-3">Nombre</label>
<div class="col-sm-9">
<input class="form-control" type="text" name="TF_alias" value="" />
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">Tipo de documento: </label>
<div class="col-sm-9">
<select name="TF_TIPO_DOCUMENTO" class="form-control">
<option value=""></option>
{% if info.TF_TIPO_DOCUMENTO == "D" %}
<option value="D" selected="selected">D - Documento Nacional de Identidad (DNI)</option>
{% else %}
<option value="D">D - Documento Nacional de Identidad (DNI).</option>
{% endif %}
{% if info.TF_TIPO_DOCUMENTO == "E" %}
<option value="E" selected="selected">E - Número de Identificador de Extranjero (NIE)</option>
{% else %}
<option value="E">E - Número de Identificador de Extranjero (NIE)</option>
{% endif %}
{% if info.TF_TIPO_DOCUMENTO == "U" %}
<option value="U" selected="selected">U - Identificación convencional para ciudadanos del Espacio Económico Europeo sin NIE</option>
{% else %}
<option value="U">U - Identificación convencional para ciudadanos del Espacio Económico Europeo sin NIE</option>
{% endif %}
{% if info.TF_TIPO_DOCUMENTO == "G" %}
<option value="G" selected="selected">G - Personas privadas de libertad</option>
{% else %}
<option value="G">G - Personas privadas de libertad</option>
{% endif %}
{% if info.TF_TIPO_DOCUMENTO == "W" %}
<option value="W" selected="selected">W - Identificación convencional para ciudadanos que no pertenecen Espacio Económico Europeo y sin NIE</option>
{% else %}
<option value="W">W - Identificación convencional para ciudadanos que no pertenecen Espacio Económico Europeo y sin NIE</option>
{% endif %}
{% if info.TF_TIPO_DOCUMENTOO == "H" %}
<option value="H" selected="selected">H - Identificación convencional de Personas que no hayan podido ser adecuadas en el proceso de adecuación de datos</option>
{% else %}
<option value="H">H - Identificación convencional de Personas que no hayan podido ser adecuadas en el proceso de adecuación de datos</option>
{% endif %}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">Número de documento: </label>
<div class="col-sm-3">
<input class="form-control" type="text" name="TF_NUM_DOCUMENTO" value="" />
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">Letra NIF: </label>
<div class="col-sm-2">
<input class="form-control" type="text" name="TF_LETRA_NIF" value="" />
</div>
</div>
<div class="alert alert-warning">
El campo de "Número del documento" tiene una longitud de 10 caracteres alfanuméricos.
<table id="tabla_info_nif">
<tr><th>Tipo</th><th>Número</th><th>Carácter de control NIF</th></tr>
<tr><td>D</td><td>bbN8</td><td>L</td></tr>
<tr><td>E</td><td>bbXN7<br />bbYN7<br />bbZN7</td><td>L<br />L<br />L</td></tr>
<tr><td>U</td><td>bbN8</td><td>L</td></tr>
<tr><td>W</td><td>bbN8</td><td>L</td></tr>
<tr><td>G</td><td>N10</td><td>L</td></tr>
<tr><td>H</td><td>bbN8</td><td>L</td></tr>
</table>
</div>
</div>
</div>
</div>
<div class="well subcampo">
{% if new_participant == "SI" %}
<legend>ESPECIALIDADES DEL PARTICIPANTE: </legend>
<div class="alert alert-warning">Debe guardar los cambios antes de crear una especialidad al participante.</div>
{% else %}
<legend>ESPECIALIDADES DEL PARTICIPANTE:
<a href="editar-especialidad-participante.php?new_specialty=SI&cod_participant={{ info.cod }}&cod_action={{ cod_action }}" class="btn btn-sm btn-info pull-right">Crear especialidad</a>
</legend>
{% for specialty in listParticipantSpecialty %}
<div class="form-group">
<label class="control-label col-sm-3">Especialidad: </label>
<div class="col-sm-9">
<label class="campo_texto">{{ specialty.ORIGEN_ESPECIALIDAD }} {{ specialty. AREA_PROFESIONAL }} {{ specialty.CODIGO_ESPECIALIDAD }}
<a href="#" class="btn btn-danger btn-sm pull-right mlateral del_specialty_participant" id="specialty{{ specialty.cod }}">Borrar</a>
<a href="editar-especialidad-participante.php?new_specialty=NO&cod_participant={{ info.cod }}&cod_specialty={{ specialty.cod }}&cod_action={{ cod_action }}" class="btn btn-warning btn-sm pull-right mlateral">Editar</a>
</label>
</div>
</div>
{% endfor %}
{% endif %}
</div>
</fieldset>
</div>
</div>
</form>
</div>

@ -0,0 +1,72 @@
<script type='text/javascript' src="../js/sepe.js"></script>
<link rel="stylesheet" type="text/css" href="../resources/plugin.css"/>
<div class="row">
<div class="col-md-12">
{% if message_info != "" %}
<div class="alert alert-success">
{{ message_info }}
</div>
{% endif %}
{% if message_error != "" %}
<div class="alert alert-danger">
{{ message_error }}
</div>
{% endif %}
<div class="page-header">
<h2>Listado de acciones formativas</h2>
</div>
<div class="report_section">
{% if lista_curso_acciones|length > 0 %}
<table class="table table-bordered box_centrado" style="width:auto">
{% for lista in lista_curso_acciones %}
<tr>
<td class="va_middle">Curso: <strong>{{ lista.title }}</strong> -> ID ACCION: <strong>{{ lista.ORIGEN_ACCION }} {{ lista.CODIGO_ACCION }}</strong></td>
<td class="ta-center">
<a href="#" class="btn btn-danger btn-sm mlateral del_action_formativa" id="cod{{ lista.cod_action }}">Borrar</a>
<a href="#" class="btn btn-warning btn-sm mlateral desvincular_accion" id="cod{{ lista.cod }}">Desvincular</a>
<a href="accion-formativa.php?cid={{ lista.id_course }}" class="btn btn-info btn-sm mlateral">Ver / Editar</a>
</td>
</tr>
{% endfor %}
</table>
{% else %}
<div class="alert alert-warning">
No hay acciones formativas asociadas a un curso.
</div>
{% endif %}
</div>
<hr />
<div class="page-header">
<h2>Cursos sin acciones formativas asignadas</h2>
</div>
<div class="report_section">
<table class="table table-striped">
{% for lista in lista_curso_libre_acciones %}
<tr>
<td class="va_middle">Curso: <strong>{{ lista.title }}</strong></td>
<td class="ta-center va_middle">
<select class="chzn-select" id="accion_formativa{{ lista.id }}" style="width:250px">
<option value="">Seleccione una acción formativa</option>
{% for accion in lista_acciones_libres %}
<option value="{{ accion.cod }}">
{{ accion.ORIGEN_ACCION }} {{ accion.CODIGO_ACCION }}
</option>
{% endfor %}
</select>
</td>
<td class="ta-center va_middle" style="min-width:240px">
<a href="#" class="btn btn-info btn-sm mlateral asignar_action_formativa" id="course_code{{ lista.id }}">Asignar acción</a>
<a href="editar-accion-formativa.php?new_action=SI&cid={{ lista.id }}" class="btn btn-success btn-sm mlateral">Crear acción</a>
</td>
</tr>
{% endfor %}
</table>
</div>
</div>
</div>

@ -0,0 +1,5 @@
<div class="row">
<div class="col-md-12">
{{ html_text }}
</div>
</div>

@ -0,0 +1,913 @@
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="ProveedorCentroTFWS" targetNamespace="http://impl.ws.application.proveedorcentro.meyss.spee.es" xmlns:entrada="http://entrada.bean.domain.common.proveedorcentro.meyss.spee.es" xmlns:entsal="http://entsal.bean.domain.common.proveedorcentro.meyss.spee.es" xmlns:impl="http://impl.ws.application.proveedorcentro.meyss.spee.es" xmlns:salida="http://salida.bean.domain.common.proveedorcentro.meyss.spee.es" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<xsd:schema targetNamespace="http://impl.ws.application.proveedorcentro.meyss.spee.es" xmlns="http://impl.ws.application.proveedorcentro.meyss.spee.es">
<xsd:import namespace="http://salida.bean.domain.common.proveedorcentro.meyss.spee.es"/>
<xsd:import namespace="http://entsal.bean.domain.common.proveedorcentro.meyss.spee.es"/>
<xsd:element name="crearCentro">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" ref="entsal:DATOS_IDENTIFICATIVOS"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="crearCentroResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" ref="salida:RESPUESTA_DATOS_CENTRO"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="obtenerDatosCentro">
<xsd:complexType/>
</xsd:element>
<xsd:element name="obtenerDatosCentroResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" ref="salida:RESPUESTA_DATOS_CENTRO"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="crearAccion">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" ref="entsal:ACCION_FORMATIVA"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="crearAccionResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" ref="salida:RESPUESTA_OBT_ACCION"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="obtenerAccion">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" ref="entsal:ID_ACCION"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="obtenerAccionResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" ref="salida:RESPUESTA_OBT_ACCION"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="obtenerListaAcciones">
<xsd:complexType/>
</xsd:element>
<xsd:element name="obtenerListaAccionesResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" ref="salida:RESPUESTA_OBT_LISTA_ACCIONES"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="eliminarAccion">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" ref="entsal:ID_ACCION"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="eliminarAccionResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" ref="salida:RESPUESTA_ELIMINAR_ACCION"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<xsd:schema targetNamespace="http://entsal.bean.domain.common.proveedorcentro.meyss.spee.es" xmlns="http://entsal.bean.domain.common.proveedorcentro.meyss.spee.es">
<xsd:simpleType name="tipo_fecha">
<xsd:restriction base="xsd:string">
<xsd:pattern value="(0[1-9]|[12][0-9]|3[01])/(0[1-9]|1[012])/\d{4}"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="tipo_si_no">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="SI"/>
<xsd:enumeration value="NO"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="tipo_documento">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="D"/>
<xsd:enumeration value="E"/>
<xsd:enumeration value="U"/>
<xsd:enumeration value="W"/>
<xsd:enumeration value="G"/>
<xsd:enumeration value="H"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="codigo_retorno">
<xsd:restriction base="xsd:int">
<xsd:minInclusive value="-2"/>
<xsd:maxInclusive value="2"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="origen">
<xsd:restriction base="xsd:string">
<xsd:minLength value="2"/>
<xsd:maxLength value="2"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="codigo_centro">
<xsd:restriction base="xsd:string">
<xsd:length value="16"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="string_40">
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="40"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="url">
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="400"/>
<xsd:pattern value="^(http|https|HTTP|HTTPS){1}://\w{1}(\w|[-_.~!*&apos;();:@&amp;=+$,/?%#]|\[|\])*$"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="telefono">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="15"/>
<xsd:pattern value="^([+]\d)?\d{9,15}$"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="email">
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="250"/>
<xsd:pattern value="^\w([.]?(\w|[!#$&apos;*+\-/=?\^_`{|}~]))*@(\w|[.\-]){1,254}[.](\w){2,6}$"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:element name="DATOS_IDENTIFICATIVOS">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="ID_CENTRO" nillable="false">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="ORIGEN_CENTRO" nillable="false" type="origen"/>
<xsd:element maxOccurs="1" minOccurs="1" name="CODIGO_CENTRO" nillable="false" type="codigo_centro"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="NOMBRE_CENTRO" nillable="false" type="string_40"/>
<xsd:element maxOccurs="1" minOccurs="1" name="URL_PLATAFORMA" nillable="false" type="url"/>
<xsd:element maxOccurs="1" minOccurs="1" name="URL_SEGUIMIENTO" nillable="false" type="url"/>
<xsd:element maxOccurs="1" minOccurs="1" name="TELEFONO" nillable="false" type="telefono"/>
<xsd:element maxOccurs="1" minOccurs="1" name="EMAIL" nillable="false" type="email"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="ID_ACCION">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="ORIGEN_ACCION" nillable="false">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="2"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="CODIGO_ACCION" nillable="false">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="30"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="ACCION_FORMATIVA">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="ID_ACCION" nillable="false">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="ORIGEN_ACCION" nillable="false">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="2"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="CODIGO_ACCION" nillable="false">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="30"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="SITUACION" nillable="false">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="2"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="ID_ESPECIALIDAD_PRINCIPAL" nillable="false">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="ORIGEN_ESPECIALIDAD" nillable="false">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="2"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="AREA_PROFESIONAL" nillable="false">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="4"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="CODIGO_ESPECIALIDAD" nillable="false">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="14"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="DURACION" nillable="false" type="xsd:int"/>
<xsd:element maxOccurs="1" minOccurs="1" name="FECHA_INICIO" nillable="false" type="tipo_fecha"/>
<xsd:element maxOccurs="1" minOccurs="1" name="FECHA_FIN" nillable="false" type="tipo_fecha"/>
<xsd:element maxOccurs="1" minOccurs="1" name="IND_ITINERARIO_COMPLETO" nillable="false" type="tipo_si_no"/>
<xsd:element maxOccurs="1" minOccurs="1" name="TIPO_FINANCIACION" nillable="false">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="2"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="NUMERO_ASISTENTES" nillable="false" type="xsd:int"/>
<xsd:element maxOccurs="1" minOccurs="1" name="DESCRIPCION_ACCION" nillable="false">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="DENOMINACION_ACCION" nillable="false">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="250"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="INFORMACION_GENERAL" nillable="false">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="0"/>
<xsd:maxLength value="650"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="HORARIOS" nillable="false">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="0"/>
<xsd:maxLength value="650"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="REQUISITOS" nillable="false">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="0"/>
<xsd:maxLength value="650"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="CONTACTO_ACCION" nillable="false">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="0"/>
<xsd:maxLength value="650"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="ESPECIALIDADES_ACCION">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="ESPECIALIDAD">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="ID_ESPECIALIDAD" nillable="false">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="ORIGEN_ESPECIALIDAD" nillable="false">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="2"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="AREA_PROFESIONAL" nillable="false">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="4"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="CODIGO_ESPECIALIDAD" nillable="false">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="14"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="CENTRO_IMPARTICION" nillable="false">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="ORIGEN_CENTRO" nillable="false">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="2"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="CODIGO_CENTRO" nillable="false" type="codigo_centro"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="FECHA_INICIO" nillable="false" type="tipo_fecha"/>
<xsd:element maxOccurs="1" minOccurs="1" name="FECHA_FIN" nillable="false" type="tipo_fecha"/>
<xsd:element maxOccurs="1" minOccurs="1" name="MODALIDAD_IMPARTICION" nillable="false">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="2"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="DATOS_DURACION" nillable="false">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="HORAS_PRESENCIAL" nillable="false" type="xsd:int"/>
<xsd:element maxOccurs="1" minOccurs="1" name="HORAS_TELEFORMACION" nillable="false" type="xsd:int"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="CENTROS_SESIONES_PRESENCIALES">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="CENTRO_PRESENCIAL" nillable="false">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="ORIGEN_CENTRO" nillable="false">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="2"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="CODIGO_CENTRO" nillable="false" type="codigo_centro"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="TUTORES_FORMADORES">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="TUTOR_FORMADOR" nillable="false">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="ID_TUTOR" nillable="false">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="TIPO_DOCUMENTO" nillable="false" type="tipo_documento"/>
<xsd:element maxOccurs="1" minOccurs="1" name="NUM_DOCUMENTO" nillable="false">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="10"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="LETRA_NIF" nillable="false">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="1"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="ACREDITACION_TUTOR" nillable="false">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="200"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="EXPERIENCIA_PROFESIONAL" nillable="false" type="xsd:int"/>
<xsd:element maxOccurs="1" minOccurs="1" name="COMPETENCIA_DOCENTE" nillable="false">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="2"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="EXPERIENCIA_MODALIDAD_TELEFORMACION" nillable="false" type="xsd:int"/>
<xsd:element maxOccurs="1" minOccurs="1" name="FORMACION_MODALIDAD_TELEFORMACION" nillable="false">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="2"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="USO" nillable="false">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="0" name="HORARIO_MANANA">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="NUM_PARTICIPANTES" nillable="false" type="xsd:int"/>
<xsd:element maxOccurs="1" minOccurs="1" name="NUMERO_ACCESOS" nillable="false" type="xsd:int"/>
<xsd:element maxOccurs="1" minOccurs="1" name="DURACION_TOTAL" nillable="false" type="xsd:int"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="0" name="HORARIO_TARDE">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="NUM_PARTICIPANTES" nillable="false" type="xsd:int"/>
<xsd:element maxOccurs="1" minOccurs="1" name="NUMERO_ACCESOS" nillable="false" type="xsd:int"/>
<xsd:element maxOccurs="1" minOccurs="1" name="DURACION_TOTAL" nillable="false" type="xsd:int"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="0" name="HORARIO_NOCHE">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="NUM_PARTICIPANTES" nillable="false" type="xsd:int"/>
<xsd:element maxOccurs="1" minOccurs="1" name="NUMERO_ACCESOS" nillable="false" type="xsd:int"/>
<xsd:element maxOccurs="1" minOccurs="1" name="DURACION_TOTAL" nillable="false" type="xsd:int"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="0" name="SEGUIMIENTO_EVALUACION">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="NUM_PARTICIPANTES" nillable="false" type="xsd:int"/>
<xsd:element maxOccurs="1" minOccurs="1" name="NUMERO_ACTIVIDADES_APRENDIZAJE" nillable="false" type="xsd:int"/>
<xsd:element maxOccurs="1" minOccurs="1" name="NUMERO_INTENTOS" nillable="false" type="xsd:int"/>
<xsd:element maxOccurs="1" minOccurs="1" name="NUMERO_ACTIVIDADES_EVALUACION" nillable="false" type="xsd:int"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="PARTICIPANTES">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="PARTICIPANTE">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="ID_PARTICIPANTE" nillable="false">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="TIPO_DOCUMENTO" nillable="false" type="tipo_documento"/>
<xsd:element maxOccurs="1" minOccurs="1" name="NUM_DOCUMENTO" nillable="false">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="10"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="LETRA_NIF" nillable="false">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="1"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="INDICADOR_COMPETENCIAS_CLAVE" nillable="false">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="2"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="CONTRATO_FORMACION">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="0" name="ID_CONTRATO_CFA" nillable="false">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:pattern value="^[A-Za-z]\d{13}$"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="0" name="CIF_EMPRESA" nillable="false">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="9"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="0" name="ID_TUTOR_EMPRESA" nillable="false">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="TIPO_DOCUMENTO" nillable="false" type="tipo_documento"/>
<xsd:element maxOccurs="1" minOccurs="1" name="NUM_DOCUMENTO" nillable="false">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="10"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="LETRA_NIF" nillable="false">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="1"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="0" name="ID_TUTOR_FORMACION" nillable="false">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="TIPO_DOCUMENTO" nillable="false" type="tipo_documento"/>
<xsd:element maxOccurs="1" minOccurs="1" name="NUM_DOCUMENTO" nillable="false">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="10"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="LETRA_NIF" nillable="false">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="1"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="ESPECIALIDADES_PARTICIPANTE">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="1" name="ESPECIALIDAD" nillable="false">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="ID_ESPECIALIDAD" nillable="false">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="ORIGEN_ESPECIALIDAD" nillable="false">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="2"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="AREA_PROFESIONAL" nillable="false">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="4"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="CODIGO_ESPECIALIDAD" nillable="false">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="14"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="0" name="FECHA_ALTA" nillable="false" type="tipo_fecha"/>
<xsd:element maxOccurs="1" minOccurs="0" name="FECHA_BAJA" nillable="false" type="tipo_fecha"/>
<xsd:element maxOccurs="1" minOccurs="1" name="TUTORIAS_PRESENCIALES">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="TUTORIA_PRESENCIAL" nillable="false">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="CENTRO_PRESENCIAL_TUTORIA" nillable="false">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="ORIGEN_CENTRO" nillable="false">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="2"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="CODIGO_CENTRO" nillable="false" type="codigo_centro"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="FECHA_INICIO" nillable="false" type="tipo_fecha"/>
<xsd:element maxOccurs="1" minOccurs="1" name="FECHA_FIN" nillable="false" type="tipo_fecha"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="EVALUACION_FINAL">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="0" name="CENTRO_PRESENCIAL_EVALUACION" nillable="false">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="ORIGEN_CENTRO" nillable="false">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="2"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="CODIGO_CENTRO" nillable="false" type="codigo_centro"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="0" name="FECHA_INICIO" nillable="false" type="tipo_fecha"/>
<xsd:element maxOccurs="1" minOccurs="0" name="FECHA_FIN" nillable="false" type="tipo_fecha"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="RESULTADOS">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="0" name="RESULTADO_FINAL" nillable="false">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="1"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="0" name="CALIFICACION_FINAL" nillable="false">
<xsd:simpleType>
<xsd:restriction base="xsd:int"/>
</xsd:simpleType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="0" name="PUNTUACION_FINAL" nillable="false">
<xsd:simpleType>
<xsd:restriction base="xsd:int"/>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<xsd:schema targetNamespace="http://salida.bean.domain.common.proveedorcentro.meyss.spee.es" xmlns="http://salida.bean.domain.common.proveedorcentro.meyss.spee.es">
<xsd:import namespace="http://entsal.bean.domain.common.proveedorcentro.meyss.spee.es"/>
<xsd:simpleType name="mensaje_error">
<xsd:restriction base="xsd:string">
<xsd:length value="250"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:element name="RESPUESTA_DATOS_CENTRO">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="CODIGO_RETORNO" nillable="false" type="entsal:codigo_retorno"/>
<xsd:element maxOccurs="1" minOccurs="1" name="ETIQUETA_ERROR" nillable="true" type="mensaje_error"/>
<xsd:element maxOccurs="1" ref="entsal:DATOS_IDENTIFICATIVOS"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="RESPUESTA_OBT_ACCION">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="CODIGO_RETORNO" nillable="false" type="entsal:codigo_retorno"/>
<xsd:element maxOccurs="1" minOccurs="1" name="ETIQUETA_ERROR" nillable="true" type="mensaje_error"/>
<xsd:element maxOccurs="1" ref="entsal:ACCION_FORMATIVA"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="RESPUESTA_OBT_LISTA_ACCIONES">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="CODIGO_RETORNO" nillable="false" type="entsal:codigo_retorno"/>
<xsd:element maxOccurs="1" minOccurs="1" name="ETIQUETA_ERROR" nillable="true" type="mensaje_error"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" ref="entsal:ID_ACCION"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="RESPUESTA_ELIMINAR_ACCION">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="CODIGO_RETORNO" nillable="false" type="entsal:codigo_retorno"/>
<xsd:element maxOccurs="1" minOccurs="1" name="ETIQUETA_ERROR" nillable="true" type="mensaje_error"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</wsdl:types>
<wsdl:message name="obtenerDatosCentroMessageRequest">
<wsdl:part element="impl:obtenerDatosCentro" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:message name="crearAccionMessageResponse">
<wsdl:part element="impl:crearAccionResponse" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:message name="eliminarAccionMessageResponse">
<wsdl:part element="impl:eliminarAccionResponse" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:message name="obtenerListaAccionesMessageResponse">
<wsdl:part element="impl:obtenerListaAccionesResponse" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:message name="crearCentroMessageResponse">
<wsdl:part element="impl:crearCentroResponse" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:message name="crearCentroMessageRequest">
<wsdl:part element="impl:crearCentro" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:message name="crearAccionMessageRequest">
<wsdl:part element="impl:crearAccion" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:message name="obtenerAccionMessageRequest">
<wsdl:part element="impl:obtenerAccion" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:message name="obtenerDatosCentroMessageResponse">
<wsdl:part element="impl:obtenerDatosCentroResponse" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:message name="obtenerListaAccionesMessageRequest">
<wsdl:part element="impl:obtenerListaAcciones" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:message name="eliminarAccionMessageRequest">
<wsdl:part element="impl:eliminarAccion" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:message name="obtenerAccionMessageResponse">
<wsdl:part element="impl:obtenerAccionResponse" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="IProveedorCentroEndPoint">
<wsdl:operation name="crearCentro">
<wsdl:input message="impl:crearCentroMessageRequest" name="crearCentroInput">
</wsdl:input>
<wsdl:output message="impl:crearCentroMessageResponse" name="crearCentroOutput">
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="obtenerDatosCentro">
<wsdl:input message="impl:obtenerDatosCentroMessageRequest" name="obtenerDatosCentroInput">
</wsdl:input>
<wsdl:output message="impl:obtenerDatosCentroMessageResponse" name="obtenerDatosCentroOutput">
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="crearAccion">
<wsdl:input message="impl:crearAccionMessageRequest" name="crearAccionInput">
</wsdl:input>
<wsdl:output message="impl:crearAccionMessageResponse" name="crearAccionOutput">
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="obtenerAccion">
<wsdl:input message="impl:obtenerAccionMessageRequest" name="obtenerAccionInput">
</wsdl:input>
<wsdl:output message="impl:obtenerAccionMessageResponse" name="obtenerAccionOutput">
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="obtenerListaAcciones">
<wsdl:input message="impl:obtenerListaAccionesMessageRequest" name="obtenerListaAccionesInput">
</wsdl:input>
<wsdl:output message="impl:obtenerListaAccionesMessageResponse" name="obtenerListaAccionesOutput">
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="eliminarAccion">
<wsdl:input message="impl:eliminarAccionMessageRequest" name="eliminarAccionInput">
</wsdl:input>
<wsdl:output message="impl:eliminarAccionMessageResponse" name="eliminarAccionOutput">
</wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="ProveedorCentroEndPointSoapBinding" type="impl:IProveedorCentroEndPoint">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsp:PolicyReference URI="#UsernameTokenPolicy" wsdl:required="false"/>
<wsdl:operation name="crearCentro">
<soap:operation soapAction="crearCentro"/>
<wsdl:input name="crearCentroInput">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="crearCentroOutput">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="obtenerDatosCentro">
<soap:operation soapAction="obtenerDatosCentro"/>
<wsdl:input name="obtenerDatosCentroInput">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="obtenerDatosCentroOutput">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="crearAccion">
<soap:operation soapAction="crearAccion"/>
<wsdl:input name="crearAccionInput">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="crearAccionOutput">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="obtenerAccion">
<soap:operation soapAction="obtenerAccion"/>
<wsdl:input name="obtenerAccionInput">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="obtenerAccionOutput">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="obtenerListaAcciones">
<soap:operation soapAction="obtenerListaAcciones"/>
<wsdl:input name="obtenerListaAccionesInput">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="obtenerListaAccionesOutput">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="eliminarAccion">
<soap:operation soapAction="eliminarAccion"/>
<wsdl:input name="eliminarAccionInput">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="eliminarAccionOutput">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="ProveedorCentroTFWS">
<wsdl:port binding="impl:ProveedorCentroEndPointSoapBinding" name="ProveedorCentroEndPoint">
<soap:address location="http://##midominio##/plugin/sepe/ws/service.php"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

File diff suppressed because it is too large Load Diff

@ -0,0 +1,170 @@
<?php
/* For licensing terms, see /license.txt */
/**
* @package chamilo.webservices
*/
ini_set('log_errors_max_len', 0);
ini_set('soap.wsdl_cache_enabled', '0');
ini_set('soap.wsdl_cache_ttl', '0');
require_once '../../../main/inc/global.inc.php';
require_once '../../../vendor/autoload.php';
ini_set("soap.wsdl_cache_enabled", 0);
$libpath = api_get_path(LIBRARY_PATH);
require_once api_get_path(SYS_PLUGIN_PATH).'sepe/ws/Sepe.php';
require_once $libpath.'nusoap/class.nusoap_base.php';
require_once api_get_path(SYS_PLUGIN_PATH).'sepe/src/wsse/soap-server-wsse.php';
//require_once api_get_path(SYS_PLUGIN_PATH).'sepe/src/wsse/soap-wsse.php';
$ns = api_get_path(WEB_PLUGIN_PATH)."sepe/ws/ProveedorCentroTFWS.wsdl";
$wsdl = api_get_path(SYS_PLUGIN_PATH)."sepe/ws/ProveedorCentroTFWS.wsdl";
$serviceUrl = api_get_path(WEB_PLUGIN_PATH).'sepe/ws/service.php';
class CustomServer extends Zend\Soap\Server
{
/**
* @inheritdoc
**/
public function __construct($wsdl = null, array $options = null)
{
parent::__construct($wsdl, $options);
// Response of handle will always be returned
$this->setReturnResponse(true);
}
private function addNamespaceToTag($response, $tag, $namespace)
{
return str_replace(
$tag,
$namespace.":".$tag,
$response
);
}
public function handle($request = null)
{
$response = parent::handle($request);
//$response = str_replace("\n", '', $response);
//$response = str_replace("00/00/0000", '', $response);
/*$response = str_replace(
'xmlns:ns1="http://impl.ws.application.proveedorcentro.meyss.spee.es"',
'xmlns:ns1="http://impl.ws.application.proveedorcentro.meyss.spee.es" xmlns:sal="http://salida.bean.domain.common.proveedorcentro.meyss.spee.es" xmlns:ent="http://entsal.bean.domain.common.proveedorcentro.meyss.spee.es"',
$response
);*/
$response = str_replace(
'xmlns:ns1="http://impl.ws.application.proveedorcentro.meyss.spee.es"',
'xmlns:ns1="http://impl.ws.application.proveedorcentro.meyss.spee.es" xmlns:impl="http://impl.ws.application.proveedorcentro.meyss.spee.es" xmlns:sal="http://salida.bean.domain.common.proveedorcentro.meyss.spee.es" xmlns:ent="http://entsal.bean.domain.common.proveedorcentro.meyss.spee.es" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"',
$response
);
$response = $this->addNamespaceToTag($response, 'RESPUESTA_DATOS_CENTRO', 'sal');
$response = $this->addNamespaceToTag($response, 'RESPUESTA_OBT_LISTA_ACCIONES', 'sal');
$response = $this->addNamespaceToTag($response, 'RESPUESTA_ELIMINAR_ACCION', 'sal');
$response = $this->addNamespaceToTag($response, 'RESPUESTA_OBT_ACCION', 'sal');
$response = $this->addNamespaceToTag($response, 'ACCION_FORMATIVA', 'ent');
$response = $this->addNamespaceToTag($response, 'ID_ACCION', 'ent');
$response = $this->addNamespaceToTag($response, 'DATOS_IDENTIFICATIVOS', 'ent');
// Dentro de ACCION_FORMATIVA no hay ent:ID_ACCION
$response = str_replace(
'<ent:ACCION_FORMATIVA><ent:ID_ACCION>',
'<ent:ACCION_FORMATIVA><ID_ACCION>',
$response
);
$response = str_replace(
'</ent:ID_ACCION><SITUACION>',
'</ID_ACCION><SITUACION>',
$response
);
//$response = file_get_contents('/tmp/log4.xml');
header('Content-Length:'.strlen($response));
echo $response;
exit;
}
}
function authenticate($WSUser,$WSKey)
{
$tUser = Database::get_main_table(TABLE_MAIN_USER);
$tApi = Database::get_main_table(TABLE_MAIN_USER_API_KEY);
$login = Database::escape_string($WSUser);
$sql = "SELECT u.user_id, u.status FROM $tUser u, $tApi a WHERE u.username='".$login."' and u.user_id = a.user_id AND a.api_service = 'dokeos' and a.api_key='".$WSKey."'";
$result = Database::query($sql);
if (Database::num_rows($result) > 0)
{
$row = Database::fetch_row($result);
if ($row[1] == '4') { //UserManager::is_admin($row[0])) {
return true;
} else {
return false;
}
} else {
return false;
}
}
$doc = new DOMDocument();
$post = file_get_contents('php://input');
if (!empty($post)) {
$doc->loadXML($post);
$WSUser = $doc->getElementsByTagName('Username')->item(0)->nodeValue;
$WSKey = $doc->getElementsByTagName('Password')->item(0)->nodeValue;
$s = new WSSESoapServer($doc);
//error_log(print_r($s,true));
if (!empty($WSUser) && !empty($WSKey)) {
if (authenticate($WSUser,$WSKey))
{
//error_log("Claves correctas");
// pointing to the current file here
$options = array(
'soap_version' => SOAP_1_1
);
//error_log('s1');
$soap = new CustomServer($wsdl, $options);
//error_log('s2');
$soap->setObject(new Sepe());
//error_log('s3');
if ($s->process()) {
//error_log(print_r($s,true));
//error_log('s4');
$xml = $s->saveXML();
//error_log('s5');
//error_log(print_r($xml,true));
//header('Content-type: application/xml');
$soap->handle($xml);
error_log('s6');
exit;
} else {
error_log('not processed');
}
} else {
error_log('Claves incorrectas');
}
} else {
error_log('not processed');
}
} else {
$contents = file_get_contents($wsdl);
header('Content-type: application/xml');
echo $contents;
exit;
}
exit;
Loading…
Cancel
Save