Browse Source

Merge remote-tracking branch 'origin/1.11.x' into 1.11.x

Yannick Warnier 7 years ago
parent
commit
fb698c853d
53 changed files with 711 additions and 4531 deletions
  1. 3 5
      app/Migrations/Schema/V111/Version111.php
  2. 9 1
      app/Resources/public/css/base.css
  3. 6 6
      composer.json
  4. 2 2
      main/course_description/index.php
  5. 2 2
      main/course_description/layout.php
  6. 15 15
      main/course_description/listing.php
  7. 1 0
      main/document/document_quota.php
  8. 3 3
      main/inc/lib/banner.lib.php
  9. 35 3
      main/inc/lib/course_home.lib.php
  10. 1 0
      main/inc/lib/template.lib.php
  11. 19 2
      main/install/install.lib.php
  12. 176 0
      main/lp/learnpath.class.php
  13. 11 2
      main/lp/lp_add_category.php
  14. 11 1
      main/lp/lp_controller.php
  15. 2 1
      main/lp/lp_edit_item_prereq.php
  16. 210 191
      main/lp/lp_list.php
  17. 1 1
      main/lp/lp_subscribe_users_to_category.php
  18. 5 4
      main/lp/lp_upload.php
  19. 5 0
      main/template/default/layout/show_header.tpl
  20. 129 109
      main/template/default/learnpath/list.tpl
  21. 0 60
      plugin/sepe/src/accion-formativa.php
  22. 0 41
      plugin/sepe/src/configuracion.php
  23. 0 37
      plugin/sepe/src/datos-identificativos.php
  24. 0 112
      plugin/sepe/src/editar-accion-formativa.php
  25. 0 67
      plugin/sepe/src/editar-datos-identificativos.php
  26. 0 145
      plugin/sepe/src/editar-especialidad-accion.php
  27. 0 123
      plugin/sepe/src/editar-especialidad-classroom.php
  28. 0 170
      plugin/sepe/src/editar-especialidad-participante.php
  29. 0 146
      plugin/sepe/src/editar-especialidad-tutor.php
  30. 0 112
      plugin/sepe/src/editar-especialidad-tutorials.php
  31. 0 171
      plugin/sepe/src/editar-participante-accion.php
  32. 0 53
      plugin/sepe/src/listado-acciones-formativas.php
  33. 0 59
      plugin/sepe/src/menu_sepe_administracion.php
  34. 0 267
      plugin/sepe/view/accion_formativa.tpl
  35. 0 40
      plugin/sepe/view/configuracion.tpl
  36. 0 95
      plugin/sepe/view/datos_identificativos.tpl
  37. 0 357
      plugin/sepe/view/editar_accion_formativa.tpl
  38. 0 89
      plugin/sepe/view/editar_datos_identificativos.tpl
  39. 0 435
      plugin/sepe/view/editar_especialidad_accion.tpl
  40. 0 95
      plugin/sepe/view/editar_especialidad_classroom.tpl
  41. 0 480
      plugin/sepe/view/editar_especialidad_participante.tpl
  42. 0 299
      plugin/sepe/view/editar_especialidad_tutor.tpl
  43. 0 199
      plugin/sepe/view/editar_especialidad_tutorials.tpl
  44. 0 410
      plugin/sepe/view/editar_participante_accion.tpl
  45. 0 72
      plugin/sepe/view/listado_acciones_formativas.tpl
  46. 0 5
      plugin/sepe/view/menu_sepe_administracion.tpl
  47. 2 0
      plugin/studentfollowup/lang/english.php
  48. 17 4
      plugin/studentfollowup/post.php
  49. 4 1
      plugin/studentfollowup/posts.php
  50. 33 31
      plugin/studentfollowup/view/post.html.twig
  51. 1 1
      plugin/studentfollowup/view/posts.html.twig
  52. 6 6
      src/Chamilo/CourseBundle/Component/CourseCopy/CourseRestorer.php
  53. 2 1
      src/Chamilo/CourseBundle/Entity/CTool.php

+ 3 - 5
app/Migrations/Schema/V111/Version111.php

@@ -272,6 +272,7 @@ class Version111 extends AbstractMigrationChamilo
                 $this->addSql('ALTER TABLE ticket_message_attachments ENGINE=InnoDB');
                 $this->addSql('ALTER TABLE ticket_message_attachments DROP message_attch_id, CHANGE id id INT AUTO_INCREMENT NOT NULL, CHANGE message_id message_id INT DEFAULT NULL, CHANGE ticket_id ticket_id INT DEFAULT NULL, CHANGE filename filename LONGTEXT NOT NULL, CHANGE size size INT NOT NULL, CHANGE sys_insert_user_id sys_insert_user_id INT NOT NULL, CHANGE sys_insert_datetime sys_insert_datetime DATETIME NOT NULL, CHANGE sys_lastedit_user_id sys_lastedit_user_id INT DEFAULT NULL;');
                 $this->addSql('ALTER TABLE ticket_message_attachments ADD CONSTRAINT FK_70BF9E26700047D2 FOREIGN KEY (ticket_id) REFERENCES ticket_ticket (id);');
+                $this->addSql('ALTER TABLE ticket_message_attachments ADD CONSTRAINT FK_70BF9E26537A1329 FOREIGN KEY (message_id) REFERENCES ticket_message (id);');
                 $this->addSql('CREATE INDEX IDX_70BF9E26700047D2 ON ticket_message_attachments (ticket_id);');
             } else {
                 $this->addSql('CREATE TABLE IF NOT EXISTS ticket_message_attachments (id INT AUTO_INCREMENT NOT NULL, ticket_id INT DEFAULT NULL, message_id INT DEFAULT NULL, path VARCHAR(255) NOT NULL, filename LONGTEXT NOT NULL, size INT NOT NULL, sys_insert_user_id INT NOT NULL, sys_insert_datetime DATETIME NOT NULL, sys_lastedit_user_id INT DEFAULT NULL, sys_lastedit_datetime DATETIME DEFAULT NULL, INDEX IDX_70BF9E26700047D2 (ticket_id), INDEX IDX_70BF9E26537A1329 (message_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
@@ -318,7 +319,6 @@ class Version111 extends AbstractMigrationChamilo
             $this->addSql('CREATE INDEX IDX_54B65868A76ED395 ON ticket_assigned_log (user_id);');
 
 
-
             $this->addSql('ALTER TABLE ticket_message DROP message_id, CHANGE id id INT AUTO_INCREMENT NOT NULL, CHANGE ticket_id ticket_id INT DEFAULT NULL, CHANGE subject subject VARCHAR(255) DEFAULT NULL, CHANGE message message LONGTEXT DEFAULT NULL, CHANGE status status VARCHAR(255) NOT NULL, CHANGE ip_address ip_address VARCHAR(255) NOT NULL, CHANGE sys_insert_user_id sys_insert_user_id INT NOT NULL, CHANGE sys_insert_datetime sys_insert_datetime DATETIME NOT NULL, CHANGE sys_lastedit_user_id sys_lastedit_user_id INT DEFAULT NULL;');
             $this->addSql('ALTER TABLE ticket_message ADD CONSTRAINT FK_BA71692D700047D2 FOREIGN KEY (ticket_id) REFERENCES ticket_ticket (id);');
 
@@ -326,9 +326,6 @@ class Version111 extends AbstractMigrationChamilo
             $this->addSql('ALTER TABLE ticket_ticket CHANGE category_id category_id INT DEFAULT NULL;');
             $this->addSql('ALTER TABLE ticket_ticket ADD CONSTRAINT FK_EDE2C76812469DE2 FOREIGN KEY (category_id) REFERENCES ticket_category (id);');
             $this->addSql('CREATE INDEX IDX_EDE2C76812469DE2 ON ticket_ticket (category_id);');
-            if ($fixTableMessage) {
-                $this->addSql('ALTER TABLE ticket_message_attachments ADD CONSTRAINT FK_70BF9E26537A1329 FOREIGN KEY (message_id) REFERENCES ticket_message (id);');
-            }
             $this->addSql('DELETE FROM settings_current WHERE title = "Ticket"');
         } else {
             // Plugin was never installed. Create ticket tables
@@ -403,7 +400,8 @@ class Version111 extends AbstractMigrationChamilo
         $this->addSql("ALTER TABLE session MODIFY COLUMN name VARCHAR(150) NOT NULL DEFAULT ''");
 
         if (!$schema->hasTable('version')) {
-            $this->addSql('CREATE TABLE version (id int unsigned NOT NULL AUTO_INCREMENT, version varchar(255), PRIMARY KEY(id), UNIQUE(version));');
+            $sql = getVersionTable();
+            $this->addSql($sql);
         }
 
         if ($schema->hasTable('resource')) {

+ 9 - 1
app/Resources/public/css/base.css

@@ -308,8 +308,16 @@ header{
     text-align:center;
     vertical-align:middle;
 }
+.radio input[type="radio"]{
+    margin-left: -25px;
+}
 input[type=checkbox], input[type=radio]{
-    margin: 8px 0 0;
+    margin: 6px 0 0;
+}
+.prerequisites input[type=radio]{
+    margin: 0 0 0 -25px;
+    vertical-align: middle;
+    height: 20px;
 }
 #gradebook_list .centered .badge-group {
     width: auto;

+ 6 - 6
composer.json

@@ -43,7 +43,7 @@
         }
     ],
     "require": {
-        "php": ">=5.4",
+        "php": ">=5.5",
         "ext-intl": "*",
         "ext-gd": "*",
         "ext-curl": "*",
@@ -90,7 +90,6 @@
         "ircmaxell/password-compat": "~1.0.4",
         "sylius/attribute": "0.13.0",
         "sylius/translation": "0.13.0",
-        "ramsey/array_column": "~1.1",
         "patchwork/utf8": "~1.2",
         "ddeboer/data-import": "@stable",
         "phpoffice/phpexcel": "~1.8",
@@ -106,12 +105,13 @@
         "knplabs/doctrine-behaviors": "~1.1",
         "jimmiw/php-time-ago": "^0.4.14",
         "phpoffice/phpword": "^0.12.1|dev-master",
-        "facebook/php-sdk-v4" : "~5.0",
-        "kigkonsult/icalcreator" : "0.1.0",
+        "facebook/php-sdk-v4": "~5.0",
+        "kigkonsult/icalcreator": "0.1.0",
         "essence/essence": "2.6.1",
         "pclzip/pclzip": "2.8.2",
         "chamilo/chash": "dev-master",
-        "ircmaxell/random-lib": "^1.2"
+        "ircmaxell/random-lib": "^1.2",
+        "ocramius/proxy-manager": "~1.0|2.0.*"
     },
     "require-dev": {
         "behat/behat": "@stable",
@@ -151,6 +151,6 @@
         }
     },
     "config": {
-      "component-dir": "web/assets"
+        "component-dir": "web/assets"
     }
 }

+ 2 - 2
main/course_description/index.php

@@ -24,12 +24,12 @@ api_protect_course_script(true);
 $actions = array('listing', 'add', 'edit', 'delete', 'history');
 $action = 'listing';
 if (isset($_GET['action']) && in_array($_GET['action'], $actions)) {
-	$action = $_GET['action'];
+    $action = $_GET['action'];
 }
 
 $description_type = '';
 if (isset($_GET['description_type'])) {
-	$description_type = intval($_GET['description_type']);
+    $description_type = intval($_GET['description_type']);
 }
 
 $id = null;

+ 2 - 2
main/course_description/layout.php

@@ -11,7 +11,7 @@
 api_protect_course_script(true);
 
 // Header
-Display :: display_header('');
+Display::display_header('');
 
 // Introduction section
 Display::display_introduction_section(TOOL_COURSE_DESCRIPTION);
@@ -23,4 +23,4 @@ Event::event_access_tool(TOOL_COURSE_DESCRIPTION);
 echo $content;
 
 // Footer
-Display :: display_footer();
+Display::display_footer();

+ 15 - 15
main/course_description/listing.php

@@ -18,27 +18,27 @@ if (api_is_allowed_to_edit(null, true)) {
     }
     $categories[ADD_BLOCK] = get_lang('NewBloc');
 
-	$i = 1;
-	echo '<div class="actions" style="margin-bottom:30px">';
-	ksort($categories);
-	foreach ($categories as $id => $title) {
-		if ($i == ADD_BLOCK) {
-			echo '<a href="index.php?'.api_get_cidreq().'&action=add">'.
+    $i = 1;
+    echo '<div class="actions" style="margin-bottom:30px">';
+    ksort($categories);
+    foreach ($categories as $id => $title) {
+        if ($i == ADD_BLOCK) {
+            echo '<a href="index.php?'.api_get_cidreq().'&action=add">'.
                 Display::return_icon($default_description_icon[$id], $title, '', ICON_SIZE_MEDIUM).'</a>';
-			break;
-		} else {
-			echo '<a href="index.php?action=edit&'.api_get_cidreq().'&description_type='.$id.'">'.
+            break;
+        } else {
+            echo '<a href="index.php?action=edit&'.api_get_cidreq().'&description_type='.$id.'">'.
                 Display::return_icon($default_description_icon[$id], $title, '', ICON_SIZE_MEDIUM).'</a>';
-			$i++;
-		}
-	}
-	echo '</div>';
+            $i++;
+        }
+    }
+    echo '</div>';
 }
 $history = isset($history) ? $history : null;
 
 // display course description list
 if ($history) {
-	echo '<div>
+    echo '<div>
         <table width="100%">
             <tr>
                 <td><h3>'.get_lang('ThematicAdvanceHistory').'</h3></td>
@@ -49,7 +49,7 @@ if ($history) {
 $user_info = api_get_user_info();
 
 if (isset($descriptions) && count($descriptions) > 0) {
-	foreach ($descriptions as $id => $description) {
+    foreach ($descriptions as $id => $description) {
         if (!empty($description)) {
             $actions = '';
             if (api_is_allowed_to_edit(null, true) && !$history) {

+ 1 - 0
main/document/document_quota.php

@@ -1,5 +1,6 @@
 <?php
 /* For licensing terms, see /license.txt */
+
 /**
  * Document quota management script
  * @package chamilo.document

+ 3 - 3
main/inc/lib/banner.lib.php

@@ -343,9 +343,10 @@ function return_navigation_array()
         if (true) {
             $params = array('variable = ? AND subkey = ?' => ['status', 'studentfollowup']);
             $result = api_get_settings_params_simple($params);
+            $plugin = StudentFollowUpPlugin::create();
             if (!empty($result) && $result['selected_value'] === 'installed') {
                 $navigation['follow_up']['url'] = api_get_path(WEB_PLUGIN_PATH).'studentfollowup/posts.php';
-                $navigation['follow_up']['title'] = get_lang('MyDossier');
+                $navigation['follow_up']['title'] = $plugin->get_lang('CareDetailView');
                 $navigation['follow_up']['key'] = 'homepage';
                 $navigation['follow_up']['icon'] = 'homepage.png';
             }
@@ -363,8 +364,7 @@ function return_navigation_array()
         // Reports
         if (!empty($possible_tabs['reports'])) {
             if (api_get_setting('show_tabs', 'reports') == 'true') {
-                if (
-                    (api_is_platform_admin() || api_is_drh() || api_is_session_admin())
+                if ((api_is_platform_admin() || api_is_drh() || api_is_session_admin())
                         && Rights::hasRight('show_tabs:reports')
                 ) {
                     $navigation['reports'] = $possible_tabs['reports'];

+ 35 - 3
main/inc/lib/course_home.lib.php

@@ -2,6 +2,7 @@
 /* For licensing terms, see /license.txt */
 
 use Chamilo\CourseBundle\Entity\CTool;
+use Chamilo\CourseBundle\Entity\CLpCategory;
 
 /**
  * Class CourseHome
@@ -461,6 +462,8 @@ class CourseHome
         // Condition for the session
         $session_id = $sessionId ?: api_get_session_id();
         $course_id = $courseId ?: api_get_course_int_id();
+        $userId = api_get_user_id();
+        $user = api_get_user_entity($userId);
         $condition_session = api_get_session_condition(
             $session_id,
             true,
@@ -572,12 +575,12 @@ class CourseHome
                 $lp = new learnpath(
                     api_get_course_id(),
                     $lp_id,
-                    api_get_user_id()
+                    $userId
                 );
                 $path = $lp->get_preview_image_path(ICON_SIZE_BIG);
                 $add = learnpath::is_lp_visible_for_student(
                     $lp_id,
-                    api_get_user_id(),
+                    $userId,
                     api_get_course_id(),
                     api_get_session_id()
                 );
@@ -586,6 +589,16 @@ class CourseHome
                 }
             }
 
+            if ($temp_row['image'] === 'lp_category.gif') {
+                $lpCategory = self::getPublishedLpCategoryFromLink(
+                    $temp_row['link']
+                );
+                $add = learnpath::categoryIsVisibleForStudent(
+                    $lpCategory,
+                    $user
+                );
+            }
+
             if ($add) {
                 $all_tools_list[] = $temp_row;
             }
@@ -675,7 +688,7 @@ class CourseHome
                                       WHERE blog_id =".$blog_id;
                     } else {
                         $sql_blogs = "SELECT * FROM $tbl_blogs_rel_user blogs_rel_user
-                                      WHERE blog_id =".$blog_id." AND user_id = ".api_get_user_id();
+                                      WHERE blog_id =".$blog_id." AND user_id = ".$userId;
                     }
                     $result_blogs = Database::query($sql_blogs);
 
@@ -1173,6 +1186,25 @@ class CourseHome
         return $lp_id;
     }
 
+    /**
+     * Get published learning path category from link inside course home
+     * @param string $link
+     * @return CLpCategory
+     */
+    public static function getPublishedLpCategoryFromLink($link)
+    {
+        $query = parse_url($link, PHP_URL_QUERY);
+        parse_str($query, $params);
+
+        $id = isset($params['id']) ? (int) $params['id'] : 0;
+
+        $em = Database::getManager();
+        /** @var CLpCategory $category */
+        $category = $em->find('ChamiloCourseBundle:CLpCategory', $id);
+
+        return $category;
+    }
+
     /**
      * @param bool $include_admin_tools
      * @return array

+ 1 - 0
main/inc/lib/template.lib.php

@@ -427,6 +427,7 @@ class Template
         $show_course_navigation_menu = null;
 
         if (!empty($this->course_id) && $this->user_is_logged_in) {
+
             if (api_get_setting('show_toolshortcuts') != 'false') {
                 //Course toolbar
                 $show_course_shortcut = CourseHome::show_navigation_tool_shortcuts();

+ 19 - 2
main/install/install.lib.php

@@ -2918,8 +2918,7 @@ function finishInstallation(
     $files = $finder->files()->in($path);
 
     // Needed for chash
-    $sql = 'CREATE TABLE IF NOT EXISTS version (id int unsigned NOT NULL AUTO_INCREMENT, version varchar(255), PRIMARY KEY(id), UNIQUE(version));';
-    Database::query($sql);
+    createVersionTable();
 
     foreach ($files as $version) {
         $version = str_replace(['Version', '.php'], '', $version->getFilename());
@@ -2928,6 +2927,24 @@ function finishInstallation(
     }
 }
 
+/**
+ * Creates 'version' table
+ */
+function createVersionTable()
+{
+    $sql = getVersionTable();
+    Database::query($sql);
+}
+
+/**
+ * Get version creation table query
+ * @return string
+ */
+function getVersionTable()
+{
+    return 'CREATE TABLE IF NOT EXISTS version (id int unsigned NOT NULL AUTO_INCREMENT, version varchar(20), PRIMARY KEY(id), UNIQUE(version));';
+}
+
 /**
  * Update settings based on installation profile defined in a JSON file
  * @param string $installationProfile The name of the JSON file in main/install/profiles/ folder

+ 176 - 0
main/lp/learnpath.class.php

@@ -9,6 +9,8 @@ use Gedmo\Sortable\Entity\Repository\SortableRepository;
 use Symfony\Component\Filesystem\Filesystem;
 use Symfony\Component\Finder\Finder;
 use Chamilo\CourseBundle\Entity\CLp;
+use Chamilo\CourseBundle\Entity\CTool;
+use Chamilo\UserBundle\Entity\User;
 
 /**
  * Class learnpath
@@ -4145,6 +4147,8 @@ class learnpath
             foreach ($learPaths as $lp) {
                 learnpath::toggle_visibility($lp['iid'], 0);
             }
+
+            learnpath::toggleCategoryPublish($id, 0);
         }
 
         return api_item_property_update(
@@ -4247,6 +4251,178 @@ class learnpath
         }
     }
 
+    /**
+     * Generate the link for a learnpath category as course tool
+     * @param int $categoryId
+     * @return string
+     */
+    private static function getCategoryLinkForTool($categoryId)
+    {
+        $link = 'lp/lp_controller.php?'.api_get_cidreq().'&'
+            .http_build_query(
+                [
+                    'action' => 'view_category',
+                    'id' => $categoryId
+                ]
+            );
+
+        return $link;
+    }
+
+    /**
+     * Publishes a learnpath.
+     * Show or hide the learnpath category on the course homepage
+     * @param int $id
+     * @param int $setVisibility
+     * @return bool
+     */
+    public static function toggleCategoryPublish($id, $setVisibility = 1)
+    {
+        $courseId = api_get_course_int_id();
+        $sessionId = api_get_session_id();
+        $sessionCondition = api_get_session_condition($sessionId, true, false, 't.sessionId');
+        
+        $em = Database::getManager();
+
+        /** @var CLpCategory $category */
+        $category = $em->find('ChamiloCourseBundle:CLpCategory', $id);
+
+        if (!$category) {
+            return false;
+        }
+
+        $link = self::getCategoryLinkForTool($id);
+
+        /** @var CTool $tool */
+        $tool = $em
+            ->createQuery("
+                SELECT t FROM ChamiloCourseBundle:CTool t
+                WHERE
+                    t.cId = :course AND
+                    t.link = :link1 AND
+                    t.image = 'lp_category.gif' AND
+                    t.link LIKE :link2
+                    $sessionCondition
+            ")
+            ->setParameters([
+                'course' => (int) $courseId,
+                'link1' => $link,
+                'link2' => "$link%"
+            ])
+            ->getOneOrNullResult();
+
+        if ($setVisibility == 0 && $tool) {
+            $em->remove($tool);
+            $em->flush();
+
+            return true;
+        }
+
+        if ($setVisibility == 1 && !$tool) {
+            $tool = new CTool();
+            $tool
+                ->setCategory('authoring')
+                ->setCId($courseId)
+                ->setName(strip_tags($category->getName()))
+                ->setLink($link)
+                ->setImage('lp_category.gif')
+                ->setVisibility(1)
+                ->setAdmin(0)
+                ->setAddress('pastillegris.gif')
+                ->setAddedTool(0)
+                ->setSessionId($sessionId)
+                ->setTarget('_self');
+
+            $em->persist($tool);
+            $em->flush();
+
+            $tool->setId($tool->getIid());
+
+            $em->persist($tool);
+            $em->flush();
+
+            return true;
+        }
+
+        if ($setVisibility == 1 && $tool) {
+            $tool
+                ->setName(strip_tags($category->getName()))
+                ->setVisibility(1);
+
+            $em->persist($tool);
+            $em->flush();
+
+            return true;
+        }
+
+        return false;
+    }
+
+    /**
+     * Check if the learnpath category is visible for a user
+     * @param CLpCategory $category
+     * @param User $user
+     * @return bool
+     */
+    public static function categoryIsVisibleForStudent(
+        CLpCategory $category,
+        User $user
+    )
+    {
+        $isAllowedToEdit = api_is_allowed_to_edit(null, true);
+
+        if ($isAllowedToEdit) {
+            return true;
+        }
+
+        $users = $category->getUsers();
+
+        if (empty($users) || !$users->count()) {
+            return true;
+        }
+
+        if ($category->hasUserAdded($user)) {
+            return true;
+        }
+
+        return false;
+    }
+
+    /**
+     * Check if a learnpath category is published as course tool
+     * @param CLpCategory $category
+     * @param int $courseId
+     * @return bool
+     */
+    public static function categoryIsPusblished(
+        CLpCategory $category,
+        $courseId
+    )
+    {
+        $link = self::getCategoryLinkForTool($category->getId());
+        $em = Database::getManager();
+
+        $tools = $em
+            ->createQuery("
+                SELECT t FROM ChamiloCourseBundle:CTool t
+                WHERE t.cId = :course AND 
+                    t.name = :name AND
+                    t.image = 'lp_category.gif' AND
+                    t.link LIKE :link
+            ")
+            ->setParameters([
+                'course' => $courseId,
+                'name' => strip_tags($category->getName()),
+                'link' => "$link%"
+            ])
+            ->getResult();
+
+        /** @var CTool $tool */
+        $tool = current($tools);
+
+        return $tool ? $tool->getVisibility() : false;
+    }
+
     /**
      * Restart the whole learnpath. Return the URL of the first element.
      * Make sure the results are saved with anoter method. This method should probably be

+ 11 - 2
main/lp/lp_add_category.php

@@ -31,8 +31,17 @@ $form = new FormValidator(
 $form->addElement('header', null, get_lang('AddLPCategory'));
 
 // Title
-$form->addElement('text', 'name', api_ucfirst(get_lang('Name')));
-$form->addRule('name', get_lang('ThisFieldIsRequired'), 'required');
+if (api_get_configuration_value('save_titles_as_html')) {
+    $form->addHtmlEditor(
+        'name',
+        get_lang('Name'),
+        true,
+        false,
+        ['ToolbarSet' => 'Minimal']
+    );
+} else {
+    $form->addText('name', get_lang('Name'), true);
+}
 
 $form->addElement('hidden', 'action', 'add_lp_category');
 $form->addElement('hidden', 'c_id', api_get_course_int_id());

+ 11 - 1
main/lp/lp_controller.php

@@ -334,9 +334,11 @@ if (isset($_SESSION['oLP'])) {
 }
 
 if (isset($_GET['isStudentView']) && $_GET['isStudentView'] == 'true') {
-    if (isset($_REQUEST['action']) && !in_array($_REQUEST['action'], ['list', 'view'])) {
+    if (isset($_REQUEST['action']) && !in_array($_REQUEST['action'], ['list', 'view', 'view_category'])) {
         if (!empty($_REQUEST['lp_id'])) {
             $_REQUEST['action'] = 'view';
+        } elseif($_REQUEST['action'] == 'view_category') {
+            $_REQUEST['action'] = 'view_category';
         } else {
             $_REQUEST['action'] = 'list';
         }
@@ -873,6 +875,14 @@ switch ($action) {
             require 'lp_list.php';
         }
         break;
+    case 'toggle_category_publish':
+        if (!$is_allowed_to_edit) {
+            api_not_allowed(true);
+        }
+
+        learnpath::toggleCategoryPublish($_REQUEST['id'], $_REQUEST['new_status']);
+        require 'lp_list.php';
+        break;
     case 'toggle_publish':
         // Change lp published status (visibility on homepage).
         if (!$is_allowed_to_edit) {

+ 2 - 1
main/lp/lp_edit_item_prereq.php

@@ -91,6 +91,7 @@ echo '<div class="col-md-3">';
 echo $lp->return_new_tree();
 echo '</div>';
 echo '<div class="col-md-9">';
+echo '<div class="prerequisites">';
 $lpItem = new learnpathItem($_GET['id']);
 if (isset($is_success) && $is_success == true) {
     echo $lp->display_manipulate($_GET['id'], $lpItem->get_type());
@@ -100,5 +101,5 @@ if (isset($is_success) && $is_success == true) {
     echo $lp->display_item_prerequisites_form($_GET['id']);
 }
 echo '</div>';
-
+echo '</div>';
 Display::display_footer();

+ 210 - 191
main/lp/lp_list.php

@@ -10,7 +10,7 @@ use Chamilo\CourseBundle\Entity\CLpCategory;
  * will be automatically created for it, and the files will be uncompressed there for example ;
  *
  * @package chamilo.learnpath
- * @author Yannick Warnier <ywarnier@beeznest.org>
+ * @author  Yannick Warnier <ywarnier@beeznest.org>
  */
 
 $this_section = SECTION_COURSES;
@@ -28,7 +28,8 @@ $baseWordDir = $courseDir;
  * Display initialisation and security checks
  */
 // Extra javascript functions for in html head:
-$htmlHeadXtra[] = "<script>
+$htmlHeadXtra[]
+    = "<script>
 function confirmation(name) {
     if (confirm(\" ".trim(get_lang('AreYouSureToDeleteJS'))." \"+name+\"?\")) {
         return true;
@@ -55,9 +56,12 @@ $current_session = api_get_session_id();
 $introductionSection = Display::return_introduction_section(
     TOOL_LEARNPATH,
     array(
-        'CreateDocumentWebDir' => api_get_path(WEB_COURSE_PATH).api_get_course_path().'/document/',
-        'CreateDocumentDir' => '../..'.api_get_path(REL_COURSE_PATH).api_get_course_path().'/document/',
-        'BaseHref' => api_get_path(WEB_COURSE_PATH).api_get_course_path().'/',
+        'CreateDocumentWebDir' => api_get_path(WEB_COURSE_PATH)
+            .api_get_course_path().'/document/',
+        'CreateDocumentDir' => '../..'.api_get_path(REL_COURSE_PATH)
+            .api_get_course_path().'/document/',
+        'BaseHref' => api_get_path(WEB_COURSE_PATH)
+            .api_get_course_path().'/',
     )
 );
 
@@ -87,24 +91,30 @@ if ($is_allowed_to_edit) {
 
     if (!$current_session) {
         $actionLeft .= Display::url(
-            Display::return_icon('new_folder.png', get_lang('AddCategory'), array(), ICON_SIZE_MEDIUM),
+            Display::return_icon('new_folder.png', get_lang('AddCategory'),
+                array(), ICON_SIZE_MEDIUM),
             api_get_self().'?'.api_get_cidreq().'&action=add_lp_category'
         );
     }
 
     $actionLeft .= Display::url(
-        Display::return_icon('new_learnpath.png', get_lang('LearnpathAddLearnpath'), '', ICON_SIZE_MEDIUM),
+        Display::return_icon('new_learnpath.png',
+            get_lang('LearnpathAddLearnpath'), '', ICON_SIZE_MEDIUM),
         api_get_self().'?'.api_get_cidreq().'&action=add_lp'
     );
     $actionLeft .= Display::url(
-        Display::return_icon('import_scorm.png', get_lang('UploadScorm'), '', ICON_SIZE_MEDIUM),
-        '../upload/index.php?'.api_get_cidreq().'&curdirpath=/&tool='.TOOL_LEARNPATH
+        Display::return_icon('import_scorm.png', get_lang('UploadScorm'), '',
+            ICON_SIZE_MEDIUM),
+        '../upload/index.php?'.api_get_cidreq().'&curdirpath=/&tool='
+        .TOOL_LEARNPATH
     );
 
     if (api_get_setting('service_ppt2lp', 'active') === 'true') {
         $actionLeft .= Display::url(
-            Display::return_icon('import_powerpoint.png', get_lang('PowerPointConvert'), '', ICON_SIZE_MEDIUM),
-            '../upload/upload_ppt.php?'.api_get_cidreq().'&curdirpath=/&tool='.TOOL_LEARNPATH
+            Display::return_icon('import_powerpoint.png',
+                get_lang('PowerPointConvert'), '', ICON_SIZE_MEDIUM),
+            '../upload/upload_ppt.php?'.api_get_cidreq().'&curdirpath=/&tool='
+            .TOOL_LEARNPATH
         );
     }
     $actions = Display::toolbarAction('actions-lp', array($actionLeft));
@@ -131,6 +141,20 @@ $userId = api_get_user_id();
 $userInfo = api_get_user_info();
 $lpIsShown = false;
 
+$filteredCategoryId = $action === 'view_category' && !empty($_GET['id']);
+
+if ($filteredCategoryId) {
+    /** @var CLpCategory $category */
+    foreach ($categories as $category) {
+        if ($category->getId() != $filteredCategoryId) {
+            continue;
+        }
+
+        $interbreadcrumb[] = ['name' => $nameTools, 'url' => api_get_self()];
+        $nameTools = strip_tags($category->getName());
+    }
+}
+
 $test_mode = api_get_setting('server_type');
 $user = UserManager::getRepository()->find($userId);
 
@@ -139,13 +163,8 @@ $data = [];
 foreach ($categories as $item) {
     $categoryId = $item->getId();
 
-    if (!$is_allowed_to_edit) {
-        $users = $item->getUsers();
-        if (!empty($users) && $users->count() > 0) {
-            if (!$item->hasUserAdded($user)) {
-                continue;
-            }
-        }
+    if (!learnpath::categoryIsVisibleForStudent($item, $user)) {
+        continue;
     }
 
     $list = new LearnpathList(
@@ -164,7 +183,8 @@ foreach ($categories as $item) {
         continue;
     }
 
-    $showBlockedPrerequisite = api_get_configuration_value('show_prerequisite_as_blocked');
+    $showBlockedPrerequisite
+        = api_get_configuration_value('show_prerequisite_as_blocked');
     $listData = [];
 
     if (!empty($flat_list)) {
@@ -195,8 +215,9 @@ foreach ($categories as $item) {
             );
 
             // Check if the learnpath is visible for student.
-            if (!$is_allowed_to_edit && $lpVisibility === false &&
-                ($isBlocked && $showBlockedPrerequisite === false)
+            if (
+                !$is_allowed_to_edit && $lpVisibility === false
+                && ($isBlocked && $showBlockedPrerequisite === false)
             ) {
                 continue;
             }
@@ -206,8 +227,9 @@ foreach ($categories as $item) {
                 $time_limits = false;
 
                 // This is an old LP (from a migration 1.8.7) so we do nothing
-                if ((empty($details['created_on'])) &&
-                    (empty($details['modified_on']))
+                if (
+                    empty($details['created_on'])
+                    && empty($details['modified_on'])
                 ) {
                     $time_limits = false;
                 }
@@ -219,7 +241,10 @@ foreach ($categories as $item) {
 
                 if ($time_limits) {
                     // Check if start time
-                    if (!empty($details['publicated_on']) && !empty($details['expired_on'])) {
+                    if (
+                        !empty($details['publicated_on'])
+                        && !empty($details['expired_on'])
+                    ) {
                         $start_time = api_strtotime(
                             $details['publicated_on'],
                             'UTC'
@@ -262,22 +287,25 @@ foreach ($categories as $item) {
                 $oddclass = 'row_even';
             }
 
-            $url_start_lp = 'lp_controller.php?'.api_get_cidreq().'&action=view&lp_id='.$id;
+            $url_start_lp = 'lp_controller.php?'.api_get_cidreq()
+                .'&action=view&lp_id='.$id;
             $name = Security::remove_XSS($details['lp_name']);
             $extra = null;
 
             if ($is_allowed_to_edit) {
                 $url_start_lp .= '&isStudentView=true';
-                $dsp_desc = '<em>'.$details['lp_maker'].'</em> '.($lpVisibility ? '' : ' - ('.get_lang('LPNotVisibleToStudent').')');
-                $extra = '<div class ="lp_content_type_label">'.$dsp_desc.'</div>';
+                $dsp_desc = '<em>'.$details['lp_maker'].'</em> '
+                    .($lpVisibility
+                        ? ''
+                        : ' - ('.get_lang('LPNotVisibleToStudent').')');
+                $extra = '<div class ="lp_content_type_label">'.$dsp_desc
+                    .'</div>';
             }
 
             $my_title = $name;
             $icon_learnpath = Display::return_icon(
                 'learnpath.png',
-                get_lang('LPName'),
-                '',
-                ICON_SIZE_SMALL
+                get_lang('LPName')
             );
 
             if ($details['lp_visibility'] == 0) {
@@ -288,16 +316,14 @@ foreach ($categories as $item) {
                 );
                 $icon_learnpath = Display::return_icon(
                     'learnpath_na.png',
-                    get_lang('LPName'),
-                    '',
-                    ICON_SIZE_SMALL
+                    get_lang('LPName')
                 );
             }
 
             // Students can see the lp but is inactive
-            if (!$is_allowed_to_edit &&
-                $lpVisibility == false &&
-                $showBlockedPrerequisite == true
+            if (
+                !$is_allowed_to_edit && $lpVisibility == false
+                && $showBlockedPrerequisite == true
             ) {
                 $my_title = Display::tag(
                     'font',
@@ -306,9 +332,7 @@ foreach ($categories as $item) {
                 );
                 $icon_learnpath = Display::return_icon(
                     'learnpath_na.png',
-                    get_lang('LPName'),
-                    '',
-                    ICON_SIZE_SMALL
+                    get_lang('LPName')
                 );
                 $url_start_lp = '#';
             }
@@ -356,15 +380,17 @@ foreach ($categories as $item) {
                 // EDIT LP
                 if ($current_session == $details['lp_session']) {
                     $dsp_edit_lp = Display::url(
-                        Display::return_icon('settings.png', get_lang('CourseSettings'), '', ICON_SIZE_SMALL),
-                        "lp_controller.php?".api_get_cidreq()."&action=edit&lp_id=$id"
+                        Display::return_icon(
+                            'settings.png',
+                            get_lang('CourseSettings')
+                        ),
+                        "lp_controller.php?".api_get_cidreq()
+                            ."&action=edit&lp_id=$id"
                     );
                 } else {
                     $dsp_edit_lp = Display::return_icon(
                         'settings_na.png',
-                        get_lang('CourseSettings'),
-                        '',
-                        ICON_SIZE_SMALL
+                        get_lang('CourseSettings')
                     );
                 }
 
@@ -372,28 +398,30 @@ foreach ($categories as $item) {
                 if ($current_session == $details['lp_session']) {
                     if ($details['lp_type'] == 1 || $details['lp_type'] == 2) {
                         $dsp_build = Display::url(
-                            Display::return_icon('edit.png', get_lang('LearnpathEditLearnpath'), '', ICON_SIZE_SMALL),
-                            'lp_controller.php?'.api_get_cidreq().'&'.http_build_query([
-                                'action' => 'add_item',
-                                'type' => 'step',
-                                'lp_id' => $id,
-                                'isStudentView' => 'false',
-                            ])
+                            Display::return_icon(
+                                'edit.png',
+                                get_lang('LearnpathEditLearnpath')
+                            ),
+                            'lp_controller.php?'.api_get_cidreq().'&'
+                                .http_build_query(
+                                    [
+                                        'action' => 'add_item',
+                                        'type' => 'step',
+                                        'lp_id' => $id,
+                                        'isStudentView' => 'false',
+                                    ]
+                                )
                         );
                     } else {
                         $dsp_build = Display::return_icon(
                             'edit_na.png',
-                            get_lang('LearnpathEditLearnpath'),
-                            '',
-                            ICON_SIZE_SMALL
+                            get_lang('LearnpathEditLearnpath')
                         );
                     }
                 } else {
                     $dsp_build = Display::return_icon(
                         'edit_na.png',
-                        get_lang('LearnpathEditLearnpath'),
-                        '',
-                        ICON_SIZE_SMALL
+                        get_lang('LearnpathEditLearnpath')
                     );
                 }
 
@@ -402,34 +430,37 @@ foreach ($categories as $item) {
                     paths inside the session.
                     See http://support.chamilo.org/projects/chamilo-18/wiki/Tools_and_sessions).
                 */
-                if (!isset($details['subscribe_users']) || $details['subscribe_users'] != 1) {
+                if (
+                    !isset($details['subscribe_users'])
+                    || $details['subscribe_users'] != 1
+                ) {
                     if ($details['lp_visibility'] == 0) {
                         $dsp_visible = Display::url(
-                            Display::return_icon('invisible.png', get_lang('Show'), '', ICON_SIZE_SMALL),
-                            api_get_self().'?'.api_get_cidreq()."&lp_id=$id&action=toggle_visible&new_status=1"
+                            Display::return_icon(
+                                'invisible.png',
+                                get_lang('Show')
+                            ),
+                            api_get_self().'?'.api_get_cidreq()
+                                ."&lp_id=$id&action=toggle_visible&new_status=1"
                         );
                     } else {
                         $dsp_visible = Display::url(
-                            Display::return_icon('visible.png', get_lang('Hide'), '', ICON_SIZE_SMALL),
-                            api_get_self().'?'.api_get_cidreq()."&lp_id=$id&action=toggle_visible&new_status=0"
+                            Display::return_icon('visible.png', get_lang('Hide')),
+                            api_get_self().'?'.api_get_cidreq()
+                                ."&lp_id=$id&action=toggle_visible&new_status=0"
                         );
                     }
                 }
 
                 // Tracking command
                 $trackingActionUrl = 'lp_controller.php?'
-                    . api_get_cidreq().'&'
-                    . http_build_query([
-                        'action' => 'report',
-                        'lp_id' => $id,
-                    ]);
+                    .api_get_cidreq().'&'
+                    .http_build_query(['action' => 'report', 'lp_id' => $id]);
 
                 $trackingAction = Display::url(
                     Display::return_icon(
                         'test_results.png',
-                        get_lang('Results'),
-                        array(),
-                        ICON_SIZE_SMALL
+                        get_lang('Results')
                     ),
                     $trackingActionUrl
                 );
@@ -440,36 +471,25 @@ foreach ($categories as $item) {
                         $dsp_publish = Display::url(
                             Display::return_icon(
                                 'lp_publish_na.png',
-                                get_lang('LearnpathPublish'),
-                                '',
-                                ICON_SIZE_SMALL
+                                get_lang('LearnpathPublish')
                             ),
-                            api_get_self().'?'.api_get_cidreq()."&lp_id=$id&action=toggle_publish&new_status=v"
+                            api_get_self().'?'.api_get_cidreq()
+                                ."&lp_id=$id&action=toggle_publish&new_status=v"
                         );
                     } else {
-                        $dsp_publish = "<a href='".api_get_self()."?".api_get_cidreq()."&lp_id=$id&action=toggle_publish&new_status=i'>".
-                            Display::return_icon(
-                                'lp_publish.png',
-                                get_lang('LearnpathDoNotPublish'),
-                                '',
-                                ICON_SIZE_SMALL
-                            )."</a>";
                         $dsp_publish = Display::url(
                             Display::return_icon(
                                 'lp_publish.png',
-                                get_lang('LearnpathDoNotPublish'),
-                                '',
-                                ICON_SIZE_SMALL
+                                get_lang('LearnpathDoNotPublish')
                             ),
-                            api_get_self().'?'.api_get_cidreq()."&lp_id=$id&action=toggle_publish&new_status=i"
+                            api_get_self().'?'.api_get_cidreq()
+                                ."&lp_id=$id&action=toggle_publish&new_status=i"
                         );
                     }
                 } else {
                     $dsp_publish = Display::return_icon(
                         'lp_publish_na.png',
-                        get_lang('LearnpathDoNotPublish'),
-                        '',
-                        ICON_SIZE_SMALL
+                        get_lang('LearnpathDoNotPublish')
                     );
                 }
 
@@ -480,48 +500,49 @@ foreach ($categories as $item) {
                  * It is thus a mix betwenn multiple attempt and mono attempt
                  */
                 if ($current_session == $details['lp_session']) {
-                    if ($details['seriousgame_mode'] == 1 && $details['lp_prevent_reinit'] == 1) {
+                    if ($details['seriousgame_mode'] == 1
+                        && $details['lp_prevent_reinit'] == 1
+                    ) {
                         // seriousgame mode | next = single
                         $dsp_reinit = Display::url(
                             Display::return_icon(
                                 'reload.png',
-                                get_lang('PreventMultipleAttempts'),
-                                '',
-                                ICON_SIZE_SMALL
+                                get_lang('PreventMultipleAttempts')
                             ),
-                            "lp_controller.php?".api_get_cidreq()."&action=switch_attempt_mode&lp_id=$id"
+                            "lp_controller.php?".api_get_cidreq()
+                                ."&action=switch_attempt_mode&lp_id=$id"
                         );
                     }
-                    if ($details['seriousgame_mode'] == 0 && $details['lp_prevent_reinit'] == 1) {
+                    if ($details['seriousgame_mode'] == 0
+                        && $details['lp_prevent_reinit'] == 1
+                    ) {
                         // single mode | next = multiple
                         $dsp_reinit = Display::url(
                             Display::return_icon(
                                 'reload_na.png',
-                                get_lang('AllowMultipleAttempts'),
-                                '',
-                                ICON_SIZE_SMALL
+                                get_lang('AllowMultipleAttempts')
                             ),
-                            "lp_controller.php?".api_get_cidreq()."&action=switch_attempt_mode&lp_id=$id"
+                            "lp_controller.php?".api_get_cidreq()
+                                ."&action=switch_attempt_mode&lp_id=$id"
                         );
                     }
-                    if ($details['seriousgame_mode'] == 0 && $details['lp_prevent_reinit'] == 0) {
+                    if ($details['seriousgame_mode'] == 0
+                        && $details['lp_prevent_reinit'] == 0
+                    ) {
                         // multiple mode | next = seriousgame
                         $dsp_reinit = Display::url(
                             Display::return_icon(
                                 'reload.png',
-                                get_lang('AllowMultipleAttempts'),
-                                '',
-                                ICON_SIZE_SMALL
+                                get_lang('AllowMultipleAttempts')
                             ),
-                            "lp_controller.php?".api_get_cidreq()."&action=switch_attempt_mode&lp_id=$id"
+                            "lp_controller.php?".api_get_cidreq()
+                                ."&action=switch_attempt_mode&lp_id=$id"
                         );
                     }
                 } else {
                     $dsp_reinit = Display::return_icon(
                         'reload_na.png',
-                        get_lang('AllowMultipleAttempts'),
-                        '',
-                        ICON_SIZE_SMALL
+                        get_lang('AllowMultipleAttempts')
                     );
                 }
 
@@ -532,48 +553,44 @@ foreach ($categories as $item) {
                             $dsp_default_view = Display::url(
                                 Display::return_icon(
                                     'view_fullscreen.png',
-                                    get_lang('ViewModeFullScreen'),
-                                    '',
-                                    ICON_SIZE_SMALL
+                                    get_lang('ViewModeFullScreen')
                                 ),
                                 'lp_controller.php?'.api_get_cidreq()
-                                . '&action=switch_view_mode&lp_id='.$id.$token_parameter
+                                    .'&action=switch_view_mode&lp_id='.$id
+                                    .$token_parameter
                             );
                             break;
                         case 'embedded':
                             $dsp_default_view = Display::url(
                                 Display::return_icon(
                                     'view_left_right.png',
-                                    get_lang('ViewModeEmbedded'),
-                                    '',
-                                    ICON_SIZE_SMALL
+                                    get_lang('ViewModeEmbedded')
                                 ),
                                 'lp_controller.php?'.api_get_cidreq()
-                                . '&action=switch_view_mode&lp_id='.$id.$token_parameter
+                                    .'&action=switch_view_mode&lp_id='.$id
+                                    .$token_parameter
                             );
                             break;
                         case 'embedframe':
                             $dsp_default_view = Display::url(
                                 Display::return_icon(
                                     'view_nofullscreen.png',
-                                    get_lang('ViewModeEmbedFrame'),
-                                    '',
-                                    ICON_SIZE_SMALL
+                                    get_lang('ViewModeEmbedFrame')
                                 ),
                                 'lp_controller.php?'.api_get_cidreq()
-                                . '&action=switch_view_mode&lp_id='.$id.$token_parameter
+                                    .'&action=switch_view_mode&lp_id='.$id
+                                    .$token_parameter
                             );
                             break;
                         case 'impress':
                             $dsp_default_view = Display::url(
                                 Display::return_icon(
                                     'window_list_slide.png',
-                                    get_lang('ViewModeImpress'),
-                                    '',
-                                    ICON_SIZE_SMALL
+                                    get_lang('ViewModeImpress')
                                 ),
                                 'lp_controller.php?'.api_get_cidreq()
-                                . '&action=switch_view_mode&lp_id='.$id.$token_parameter
+                                    .'&action=switch_view_mode&lp_id='.$id
+                                    .$token_parameter
                             );
                             break;
                     }
@@ -581,16 +598,12 @@ foreach ($categories as $item) {
                     if ($details['lp_view_mode'] == 'fullscreen') {
                         $dsp_default_view = Display::return_icon(
                             'view_fullscreen_na.png',
-                            get_lang('ViewModeEmbedded'),
-                            '',
-                            ICON_SIZE_SMALL
+                            get_lang('ViewModeEmbedded')
                         );
                     } else {
                         $dsp_default_view = Display::return_icon(
                             'view_left_right_na.png',
-                            get_lang('ViewModeEmbedded'),
-                            '',
-                            ICON_SIZE_SMALL
+                            get_lang('ViewModeEmbedded')
                         );
                     }
                 }
@@ -601,21 +614,19 @@ foreach ($categories as $item) {
                         $dsp_debug = Display::url(
                             Display::return_icon(
                                 'bug.png',
-                                get_lang('HideDebug'),
-                                '',
-                                ICON_SIZE_SMALL
+                                get_lang('HideDebug')
                             ),
-                            "lp_controller.php?".api_get_cidreq()."&action=switch_scorm_debug&lp_id=$id"
+                            "lp_controller.php?".api_get_cidreq()
+                                ."&action=switch_scorm_debug&lp_id=$id"
                         );
                     } else {
                         $dsp_debug = Display::url(
                             Display::return_icon(
                                 'bug_na.png',
-                                get_lang('ShowDebug'),
-                                '',
-                                ICON_SIZE_SMALL
+                                get_lang('ShowDebug')
                             ),
-                            "lp_controller.php?".api_get_cidreq()."&action=switch_scorm_debug&lp_id=$id"
+                            "lp_controller.php?".api_get_cidreq()
+                                ."&action=switch_scorm_debug&lp_id=$id"
                         );
                     }
                 }
@@ -623,42 +634,27 @@ foreach ($categories as $item) {
                 /* Export */
                 if ($details['lp_type'] == 1) {
                     $dsp_disk = Display::url(
-                        Display::return_icon(
-                            'cd.png',
-                            get_lang('Export'),
-                            array(),
-                            ICON_SIZE_SMALL
-                        ),
-                        api_get_self()."?".api_get_cidreq(
-                        )."&action=export&lp_id=$id"
+                        Display::return_icon('cd.png', get_lang('Export')),
+                        api_get_self()."?".api_get_cidreq()
+                            ."&action=export&lp_id=$id"
                     );
                 } elseif ($details['lp_type'] == 2) {
                     $dsp_disk = Display::url(
-                        Display::return_icon(
-                            'cd.png',
-                            get_lang('Export'),
-                            array(),
-                            ICON_SIZE_SMALL
-                        ),
-                        api_get_self()."?".api_get_cidreq()."&action=export&lp_id=$id&export_name=".api_replace_dangerous_char($name).".zip"
+                        Display::return_icon('cd.png', get_lang('Export')),
+                        api_get_self()."?".api_get_cidreq()
+                            ."&action=export&lp_id=$id&export_name="
+                            .api_replace_dangerous_char($name).".zip"
                     );
                 } else {
                     $dsp_disk = Display::return_icon(
                         'cd_na.png',
-                        get_lang('Export'),
-                        array(),
-                        ICON_SIZE_SMALL
+                        get_lang('Export')
                     );
                 }
 
                 // Copy
                 $copy = Display::url(
-                    Display::return_icon(
-                        'cd_copy.png',
-                        get_lang('Copy'),
-                        array(),
-                        ICON_SIZE_SMALL
-                    ),
+                    Display::return_icon('cd_copy.png', get_lang('Copy')),
                     api_get_self()."?".api_get_cidreq()."&action=copy&lp_id=$id"
                 );
 
@@ -666,23 +662,35 @@ foreach ($categories as $item) {
                 $subscribeUsers = null;
                 if ($details['subscribe_users'] == 1) {
                     $subscribeUsers = Display::url(
-                        Display::return_icon('user.png', get_lang('SubscribeUsersToLp')),
-                        api_get_path(WEB_CODE_PATH)."lp/lp_subscribe_users.php?lp_id=$id&".api_get_cidreq()
+                        Display::return_icon('user.png',
+                            get_lang('SubscribeUsersToLp')
+                        ),
+                        api_get_path(WEB_CODE_PATH)
+                        ."lp/lp_subscribe_users.php?lp_id=$id&".api_get_cidreq()
                     );
                 }
 
                 /* Auto launch LP code */
                 if (api_get_course_setting('enable_lp_auto_launch') == 1) {
-                    if ($details['autolaunch'] == 1 && $autolaunch_exists == false) {
+                    if ($details['autolaunch'] == 1
+                        && $autolaunch_exists == false
+                    ) {
                         $autolaunch_exists = true;
                         $lp_auto_launch_icon = Display::url(
-                            Display::return_icon('launch.png', get_lang('DisableLPAutoLaunch')),
-                            api_get_self().'?'.api_get_cidreq()."&action=auto_launch&status=0&lp_id=$id"
+                            Display::return_icon(
+                                'launch.png',
+                                get_lang('DisableLPAutoLaunch')
+                            ),
+                            api_get_self().'?'.api_get_cidreq()
+                            ."&action=auto_launch&status=0&lp_id=$id"
                         );
                     } else {
                         $lp_auto_launch_icon = Display::url(
-                            Display::return_icon('launch_na.png', get_lang('EnableLPAutoLaunch')),
-                            api_get_self().'?'.api_get_cidreq()."&action=auto_launch&status=1&lp_id=$id"
+                            Display::return_icon('launch_na.png',
+                                get_lang('EnableLPAutoLaunch')
+                            ),
+                            api_get_self().'?'.api_get_cidreq()
+                            ."&action=auto_launch&status=1&lp_id=$id"
                         );
                     }
                 }
@@ -691,11 +699,10 @@ foreach ($categories as $item) {
                 $export_icon = Display::url(
                     Display::return_icon(
                         'pdf.png',
-                        get_lang('ExportToPDFOnlyHTMLAndImages'),
-                        '',
-                        ICON_SIZE_SMALL
+                        get_lang('ExportToPDFOnlyHTMLAndImages')
                     ),
-                    api_get_self().'?'.api_get_cidreq()."&action=export_to_pdf&lp_id=$id"
+                    api_get_self().'?'.api_get_cidreq()
+                    ."&action=export_to_pdf&lp_id=$id"
                 );
 
                 /* Delete */
@@ -703,19 +710,19 @@ foreach ($categories as $item) {
                     $dsp_delete = Display::url(
                         Display::return_icon(
                             'delete.png',
-                            get_lang('LearnpathDeleteLearnpath'),
-                            '',
-                            ICON_SIZE_SMALL
+                            get_lang('LearnpathDeleteLearnpath')
                         ),
-                        'lp_controller.php?'.api_get_cidreq()."&action=delete&lp_id=$id",
-                        ['onclick' => "javascript: return confirmation('".addslashes($name)."');"]
+                        'lp_controller.php?'.api_get_cidreq()
+                        ."&action=delete&lp_id=$id",
+                        [
+                            'onclick' => "javascript: return confirmation('"
+                                .addslashes($name)."');"
+                        ]
                     );
                 } else {
                     $dsp_delete = Display::return_icon(
                         'delete_na.png',
-                        get_lang('LearnpathDeleteLearnpath'),
-                        '',
-                        ICON_SIZE_SMALL
+                        get_lang('LearnpathDeleteLearnpath')
                     );
                 }
 
@@ -724,24 +731,28 @@ foreach ($categories as $item) {
                 if ($current_session == 0) {
                     if ($details['lp_display_order'] == 1 && $max != 1) {
                         $dsp_order .= Display::url(
-                            Display::return_icon('down.png', get_lang('MoveDown'), '', ICON_SIZE_SMALL),
-                            "lp_controller.php?".api_get_cidreq()."&action=move_lp_down&lp_id=$id&category_id=$categoryId"
+                            Display::return_icon('down.png', get_lang('MoveDown')),
+                            "lp_controller.php?".api_get_cidreq()
+                                ."&action=move_lp_down&lp_id=$id&category_id=$categoryId"
                         );
                     } elseif ($current == $max - 1 && $max != 1) {
                         $dsp_order .= Display::url(
-                            Display::return_icon('up.png', get_lang('MoveUp'), '', ICON_SIZE_SMALL),
-                            "lp_controller.php?".api_get_cidreq()."&action=move_lp_up&lp_id=$id&category_id=$categoryId"
+                            Display::return_icon('up.png', get_lang('MoveUp')),
+                            "lp_controller.php?".api_get_cidreq()
+                                ."&action=move_lp_up&lp_id=$id&category_id=$categoryId"
                         );
                     } elseif ($max == 1) {
                         $dsp_order = '';
                     } else {
                         $dsp_order .= Display::url(
-                            Display::return_icon('down.png', get_lang('MoveDown'), '', ICON_SIZE_SMALL),
-                            "lp_controller.php?".api_get_cidreq()."&action=move_lp_down&lp_id=$id&category_id=$categoryId"
+                            Display::return_icon('down.png', get_lang('MoveDown')),
+                            "lp_controller.php?".api_get_cidreq()
+                                ."&action=move_lp_down&lp_id=$id&category_id=$categoryId"
                         );
                         $dsp_order .= Display::url(
-                            Display::return_icon('up.png', get_lang('MoveUp'), '', ICON_SIZE_SMALL),
-                            "lp_controller.php?".api_get_cidreq()."&action=move_lp_up&lp_id=$id&category_id=$categoryId"
+                            Display::return_icon('up.png', get_lang('MoveUp')),
+                            "lp_controller.php?".api_get_cidreq()
+                                ."&action=move_lp_up&lp_id=$id&category_id=$categoryId"
                         );
                     }
                 }
@@ -757,7 +768,8 @@ foreach ($categories as $item) {
                     if ($details['seriousgame_mode'] == 0) {
                         $actionSeriousGame = Display::toolbarButton(
                             null,
-                            api_get_self().'?'.api_get_cidreq()."&lp_id=$id&action=toggle_seriousgame",
+                            api_get_self().'?'.api_get_cidreq()
+                                ."&lp_id=$id&action=toggle_seriousgame",
                             'trophy',
                             'default',
                             [
@@ -768,7 +780,8 @@ foreach ($categories as $item) {
                     } else {
                         $actionSeriousGame = Display::toolbarButton(
                             null,
-                            api_get_self().'?'.api_get_cidreq()."&lp_id=$id&action=toggle_seriousgame",
+                            api_get_self().'?'.api_get_cidreq()
+                                ."&lp_id=$id&action=toggle_seriousgame",
                             'trophy',
                             'warning',
                             [
@@ -781,8 +794,9 @@ foreach ($categories as $item) {
             } else {
                 // Student
                 $export_icon = Display::url(
-                    Display::return_icon('pdf.png', get_lang('ExportToPDF'), '', ICON_SIZE_SMALL),
-                    api_get_self().'?'.api_get_cidreq()."&action=export_to_pdf&lp_id=$id"
+                    Display::return_icon('pdf.png', get_lang('ExportToPDF')),
+                    api_get_self().'?'.api_get_cidreq()
+                        ."&action=export_to_pdf&lp_id=$id"
                 );
             }
 
@@ -843,6 +857,10 @@ foreach ($categories as $item) {
             $item->getId(),
             $current_session
         ),
+        'category_is_published' => learnpath::categoryIsPusblished(
+            $item,
+            $courseInfo['real_id']
+        ),
         'lp_list' => $listData
     ];
 }
@@ -856,6 +874,7 @@ $template->assign('message', $message);
 $template->assign('introduction_section', $introductionSection);
 $template->assign('data', $data);
 $template->assign('lp_is_shown', $lpIsShown);
+$template->assign('filtered_category', $filteredCategoryId);
 $templateName = $template->get_template('learnpath/list.tpl');
 $content = $template->fetch($templateName);
 $template->assign('content', $content);

+ 1 - 1
main/lp/lp_subscribe_users_to_category.php

@@ -36,7 +36,7 @@ $interbreadcrumb[] = array(
     'url' => 'lp_controller.php?action=list&'.api_get_cidreq(),
     'name' => get_lang('LearningPaths')
 );
-$interbreadcrumb[] = array('url' => '#', 'name' => $category->getName());
+$interbreadcrumb[] = array('url' => '#', 'name' => strip_tags($category->getName()));
 
 // Find course.
 $course = $em->getRepository('ChamiloCoreBundle:Course')->find($courseId);

+ 5 - 4
main/lp/lp_upload.php

@@ -32,12 +32,10 @@ if (isset($_POST) && $is_error) {
     );
     return false;
     unset($_FILES['user_file']);
-} else if ($_SERVER['REQUEST_METHOD'] == 'POST' && count($_FILES) > 0 && !empty($_FILES['user_file']['name'])) {
-
+} elseif ($_SERVER['REQUEST_METHOD'] == 'POST' && count($_FILES) > 0 && !empty($_FILES['user_file']['name'])) {
     // A file upload has been detected, now deal with the file...
     // Directory creation.
     $stopping_error = false;
-
     $s = $_FILES['user_file']['name'];
 
     // Get name of the zip file without the extension.
@@ -47,7 +45,10 @@ if (isset($_POST) && $is_error) {
     $file_base_name = str_replace('.'.$extension, '', $filename);
 
     $new_dir = api_replace_dangerous_char(trim($file_base_name));
-    $type = learnpath::get_package_type($_FILES['user_file']['tmp_name'], $_FILES['user_file']['name']);
+    $type = learnpath::get_package_type(
+        $_FILES['user_file']['tmp_name'],
+        $_FILES['user_file']['name']
+    );
 
     $proximity = 'local';
     if (!empty($_REQUEST['content_proximity'])) {

+ 5 - 0
main/template/default/layout/show_header.tpl

@@ -34,6 +34,11 @@
     </div>
 {% endif %}
 {% include template ~ "/layout/page_header.tpl" %}
+{% if show_course_shortcut is not null %}
+    <div class="nav-tools">
+        {{ show_course_shortcut }}
+    </div>
+{% endif %}
 <section id="content-section">
     <div class="container">
         {% block breadcrumb %}

+ 129 - 109
main/template/default/learnpath/list.tpl

@@ -11,140 +11,160 @@
 {{ introduction_section }}
 
 {% for lp_data in data %}
-    {% if categories|length > 1 and lp_data.category.id %}
-        {% if is_allowed_to_edit %}
-            <h3 class="page-header">
-                {{ lp_data.category.getName() }}
+    {% set show_category = true %}
 
-                {% if lp_data.category.getId() > 0 %}
-                    {% if not _c.session_id %}
-                        <a href="{{ 'lp_controller.php?' ~ _p.web_cid_query ~ '&action=add_lp_category&id=' ~ lp_data.category.getId() }}" title="{{ "Edit"|get_lang }}">
-                            <img src="{{ "edit.png"|icon }}" alt="{{ "Edit"|get_lang }}">
-                        </a>
+    {% if filtered_category and filtered_category != lp_data.category.id %}
+        {% set show_category = false %}
+    {% endif %}
 
-                        <a href="{{ 'lp_controller.php?' ~ _p.web_cid_query ~ '&action=add_users_to_category&id=' ~ lp_data.category.getId() }}" title="{{ "AddUser"|get_lang }}">
-                            <img src="{{ "user.png"|icon }}" alt="{{ "AddUser"|get_lang }}">
-                        </a>
+    {% if show_category %}
+        {% if categories|length > 1 and lp_data.category.id %}
+            {% if is_allowed_to_edit %}
+                <h3 class="page-header">
+                    {{ lp_data.category.getName() }}
 
-                        {% if loop.index0 == 1 %}
-                            <a href="#">
-                                <img src="{{ "up_na.png"|icon }}" alt="{{ "Move"|get_lang }}">
+                    {% if lp_data.category.getId() > 0 %}
+                        {% if not _c.session_id %}
+                            <a href="{{ 'lp_controller.php?' ~ _p.web_cid_query ~ '&action=add_lp_category&id=' ~ lp_data.category.getId() }}" title="{{ "Edit"|get_lang }}">
+                                <img src="{{ "edit.png"|icon }}" alt="{{ "Edit"|get_lang }}">
                             </a>
-                        {% else %}
-                            <a href="{{ 'lp_controller.php?' ~ _p.web_cid_query ~ '&action=move_up_category&id=' ~ lp_data.category.getId() }}" title="{{ "Move"|get_lang }}">
-                                <img src="{{ "up.png"|icon }}" alt="{{ "Move"|get_lang }}">
+
+                            <a href="{{ 'lp_controller.php?' ~ _p.web_cid_query ~ '&action=add_users_to_category&id=' ~ lp_data.category.getId() }}" title="{{ "AddUser"|get_lang }}">
+                                <img src="{{ "user.png"|icon }}" alt="{{ "AddUser"|get_lang }}">
                             </a>
+
+                            {% if loop.index0 == 1 %}
+                                <a href="#">
+                                    <img src="{{ "up_na.png"|icon }}" alt="{{ "Move"|get_lang }}">
+                                </a>
+                            {% else %}
+                                <a href="{{ 'lp_controller.php?' ~ _p.web_cid_query ~ '&action=move_up_category&id=' ~ lp_data.category.getId() }}" title="{{ "Move"|get_lang }}">
+                                    <img src="{{ "up.png"|icon }}" alt="{{ "Move"|get_lang }}">
+                                </a>
+                            {% endif %}
+
+                            {% if (data|length - 1) == loop.index0 %}
+                                <a href="#">
+                                    <img src="{{ "down_na.png"|icon }}" alt="{{ "Move"|get_lang }}">
+                                </a>
+                            {% else %}
+                                <a href="{{ 'lp_controller.php?' ~ _p.web_cid_query ~ '&action=move_down_category&id=' ~ lp_data.category.getId() }}" title="{{ "Move"|get_lang }}">
+                                    <img src="{{ "down.png"|icon }}" alt="{{ "Move"|get_lang }}">
+                                </a>
+                            {% endif %}
                         {% endif %}
 
-                        {% if (data|length - 1) == loop.index0 %}
-                            <a href="#">
-                                <img src="{{ "down_na.png"|icon }}" alt="{{ "Move"|get_lang }}">
+                        {% if lp_data.category_visibility == 0 %}
+                            <a href="lp_controller.php?{{ _p.web_cid_query ~ '&' ~ {'action':'toggle_category_visibility', 'id':lp_data.category.id, 'new_status':1}|url_encode }}"
+                               title="{{ 'Show'|get_lang }}">
+                                <img src="{{ 'invisible.png'|icon }}" alt="{{ 'Show'|get_lang }}">
                             </a>
                         {% else %}
-                            <a href="{{ 'lp_controller.php?' ~ _p.web_cid_query ~ '&action=move_down_category&id=' ~ lp_data.category.getId() }}" title="{{ "Move"|get_lang }}">
-                                <img src="{{ "down.png"|icon }}" alt="{{ "Move"|get_lang }}">
+                            <a href="lp_controller.php?{{ _p.web_cid_query ~ '&' ~ {'action':'toggle_category_visibility', 'id':lp_data.category.id, 'new_status':0}|url_encode }}"
+                               title="{{ 'Hide'|get_lang }}">
+                                <img src="{{ 'visible.png'|icon }}" alt="{{ 'Hide'|get_lang }}">
                             </a>
                         {% endif %}
-                    {% endif %}
 
-                    {% if lp_data.category_visibility == 0 %}
-                        <a href="lp_controller.php?{{ _p.web_cid_query ~ '&' ~ {'action':'toggle_category_visibility', 'id':lp_data.category.id, 'new_status':1}|url_encode }}"
-                           title="{{ 'Show'|get_lang }}">
-                            <img src="{{ 'invisible.png'|icon }}" alt="{{ 'Show'|get_lang }}">
-                        </a>
-                    {% else %}
-                        <a href="lp_controller.php?{{ _p.web_cid_query ~ '&' ~ {'action':'toggle_category_visibility', 'id':lp_data.category.id, 'new_status':0}|url_encode }}"
-                           title="{{ 'Hide'|get_lang }}">
-                            <img src="{{ 'visible.png'|icon }}" alt="{{ 'Hide'|get_lang }}">
-                        </a>
-                    {% endif %}
+                        {% if lp_data.category_is_published == 0 %}
+                            <a href="lp_controller.php?{{ _p.web_cid_query ~ '&' ~ {'action':'toggle_category_publish', 'id':lp_data.category.id, 'new_status':1}|url_encode }}"
+                               title="{{ 'LearnpathPublish'|get_lang }}">
+                                <img src="{{ 'lp_publish_na.png'|icon }}" alt="{{ 'LearnpathPublish'|get_lang }}">
+                            </a>
+                        {% else %}
+                            <a href="lp_controller.php?{{ _p.web_cid_query ~ '&' ~ {'action':'toggle_category_publish', 'id':lp_data.category.id, 'new_status':0}|url_encode }}"
+                               title="{{ 'LearnpathDoNotPublish'|get_lang }}">
+                                <img src="{{ 'lp_publish.png'|icon }}" alt="{{ 'Hide'|get_lang }}">
+                            </a>
+                        {% endif %}
 
-                    {% if not _c.session_id %}
-                        <a href="{{ 'lp_controller.php?' ~ _p.web_cid_query  ~ '&action=delete_lp_category&id=' ~ lp_data.category.getId() }}" title="{{ "Delete"|get_lang }}">
-                            <img src="{{ "delete.png"|icon }}" alt="{{ "Delete"|get_lang }}">
-                        </a>
+                        {% if not _c.session_id %}
+                            <a href="{{ 'lp_controller.php?' ~ _p.web_cid_query  ~ '&action=delete_lp_category&id=' ~ lp_data.category.getId() }}" title="{{ "Delete"|get_lang }}">
+                                <img src="{{ "delete.png"|icon }}" alt="{{ "Delete"|get_lang }}">
+                            </a>
+                        {% endif %}
                     {% endif %}
-                {% endif %}
-            </h3>
-        {% elseif lp_data.lp_list is not empty %}
-            <h3 class="page-header">{{ lp_data.category.getName() }}</h3>
+                </h3>
+            {% elseif lp_data.lp_list is not empty %}
+                <h3 class="page-header">{{ lp_data.category.getName() }}</h3>
+            {% endif %}
         {% endif %}
-    {% endif %}
-
-    {% if lp_data.lp_list %}
-        <div class="table-responsive">
-            <table class="table table-hover table-striped">
-                <thead>
-                    <tr>
-                        <th>{{ "Title"|get_lang }}</th>
-                        {% if is_allowed_to_edit %}
-                            <th>{{ "PublicationDate"|get_lang }}</th>
-                            <th>{{ "ExpirationDate"|get_lang }}</th>
-                            <th>{{ "Progress"|get_lang }}</th>
-                            <th>{{ "AuthoringOptions"|get_lang }}</th>
-                        {% else %}
-                            {% if not is_invitee %}
-                                <th>{{ "Progress"|get_lang }}</th>
-                            {% endif %}
 
-                            <th>{{ "Actions"|get_lang }}</th>
-                        {% endif %}
-                    </tr>
-                </thead>
-                <tbody>
-                    {% for row in lp_data.lp_list %}
+        {% if lp_data.lp_list %}
+            <div class="table-responsive">
+                <table class="table table-hover table-striped">
+                    <thead>
                         <tr>
-                            <td>
-                                {{ row.learnpath_icon }}
-                                <a href="{{ row.url_start }}">
-                                    {{ row.title }}
-                                    {{ row.session_image }}
-                                    {{ row.extra }}
-                                </a>
-                            </td>
+                            <th>{{ "Title"|get_lang }}</th>
                             {% if is_allowed_to_edit %}
-                                <td>
-                                    {% if row.start_time %}
-                                        <span class="small">{{ row.start_time }}</span>
-                                    {% endif %}
-                                </td>
-                                <td>
-                                    <span class="small">{{ row.end_time }}</span>
-                                </td>
-                                <td>
-                                    {{ row.dsp_progress }}
-                                </td>
+                                <th>{{ "PublicationDate"|get_lang }}</th>
+                                <th>{{ "ExpirationDate"|get_lang }}</th>
+                                <th>{{ "Progress"|get_lang }}</th>
+                                <th>{{ "AuthoringOptions"|get_lang }}</th>
                             {% else %}
                                 {% if not is_invitee %}
+                                    <th>{{ "Progress"|get_lang }}</th>
+                                {% endif %}
+
+                                <th>{{ "Actions"|get_lang }}</th>
+                            {% endif %}
+                        </tr>
+                    </thead>
+                    <tbody>
+                        {% for row in lp_data.lp_list %}
+                            <tr>
+                                <td>
+                                    {{ row.learnpath_icon }}
+                                    <a href="{{ row.url_start }}">
+                                        {{ row.title }}
+                                        {{ row.session_image }}
+                                        {{ row.extra }}
+                                    </a>
+                                </td>
+                                {% if is_allowed_to_edit %}
+                                    <td>
+                                        {% if row.start_time %}
+                                            <span class="small">{{ row.start_time }}</span>
+                                        {% endif %}
+                                    </td>
+                                    <td>
+                                        <span class="small">{{ row.end_time }}</span>
+                                    </td>
                                     <td>
                                         {{ row.dsp_progress }}
                                     </td>
+                                {% else %}
+                                    {% if not is_invitee %}
+                                        <td>
+                                            {{ row.dsp_progress }}
+                                        </td>
+                                    {% endif %}
                                 {% endif %}
-                            {% endif %}
 
-                            <td>
-                                {{ row.action_build }}
-                                {{ row.action_edit }}
-                                {{ row.action_visible }}
-                                {{ row.action_tracking }}
-                                {{ row.action_publish }}
-                                {{ row.action_subscribe_users }}
-                                {{ row.action_serious_game }}
-                                {{ row.action_reinit }}
-                                {{ row.action_default_view }}
-                                {{ row.action_debug }}
-                                {{ row.action_export }}
-                                {{ row.action_copy }}
-                                {{ row.action_auto_launch }}
-                                {{ row.action_pdf }}
-                                {{ row.action_delete }}
-                                {{ row.action_order }}
-                            </td>
-                        </tr>
-                    {% endfor %}
-                </tbody>
-            </table>
-        </div>
+                                <td>
+                                    {{ row.action_build }}
+                                    {{ row.action_edit }}
+                                    {{ row.action_visible }}
+                                    {{ row.action_tracking }}
+                                    {{ row.action_publish }}
+                                    {{ row.action_subscribe_users }}
+                                    {{ row.action_serious_game }}
+                                    {{ row.action_reinit }}
+                                    {{ row.action_default_view }}
+                                    {{ row.action_debug }}
+                                    {{ row.action_export }}
+                                    {{ row.action_copy }}
+                                    {{ row.action_auto_launch }}
+                                    {{ row.action_pdf }}
+                                    {{ row.action_delete }}
+                                    {{ row.action_order }}
+                                </td>
+                            </tr>
+                        {% endfor %}
+                    </tbody>
+                </table>
+            </div>
+        {% endif %}
     {% endif %}
 {% endfor %}
 

+ 0 - 60
plugin/sepe/src/accion-formativa.php

@@ -1,60 +0,0 @@
-<?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 - 41
plugin/sepe/src/configuracion.php

@@ -1,41 +0,0 @@
-<?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 - 37
plugin/sepe/src/datos-identificativos.php

@@ -1,37 +0,0 @@
-<?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 - 112
plugin/sepe/src/editar-accion-formativa.php

@@ -1,112 +0,0 @@
-<?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 - 67
plugin/sepe/src/editar-datos-identificativos.php

@@ -1,67 +0,0 @@
-<?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 - 145
plugin/sepe/src/editar-especialidad-accion.php

@@ -1,145 +0,0 @@
-<?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 - 123
plugin/sepe/src/editar-especialidad-classroom.php

@@ -1,123 +0,0 @@
-<?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 - 170
plugin/sepe/src/editar-especialidad-participante.php

@@ -1,170 +0,0 @@
-<?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 - 146
plugin/sepe/src/editar-especialidad-tutor.php

@@ -1,146 +0,0 @@
-<?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 - 112
plugin/sepe/src/editar-especialidad-tutorials.php

@@ -1,112 +0,0 @@
-<?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 - 171
plugin/sepe/src/editar-participante-accion.php

@@ -1,171 +0,0 @@
-<?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 - 53
plugin/sepe/src/listado-acciones-formativas.php

@@ -1,53 +0,0 @@
-<?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 - 59
plugin/sepe/src/menu_sepe_administracion.php

@@ -1,59 +0,0 @@
-<?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 - 267
plugin/sepe/view/accion_formativa.tpl

@@ -1,267 +0,0 @@
-<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 - 40
plugin/sepe/view/configuracion.tpl

@@ -1,40 +0,0 @@
-<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 - 95
plugin/sepe/view/datos_identificativos.tpl

@@ -1,95 +0,0 @@
-<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 - 357
plugin/sepe/view/editar_accion_formativa.tpl

@@ -1,357 +0,0 @@
-<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 - 89
plugin/sepe/view/editar_datos_identificativos.tpl

@@ -1,89 +0,0 @@
-<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 - 435
plugin/sepe/view/editar_especialidad_accion.tpl

@@ -1,435 +0,0 @@
-<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 - 95
plugin/sepe/view/editar_especialidad_classroom.tpl

@@ -1,95 +0,0 @@
-<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 - 480
plugin/sepe/view/editar_especialidad_participante.tpl

@@ -1,480 +0,0 @@
-<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 - 299
plugin/sepe/view/editar_especialidad_tutor.tpl

@@ -1,299 +0,0 @@
-<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 - 199
plugin/sepe/view/editar_especialidad_tutorials.tpl

@@ -1,199 +0,0 @@
-<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 - 410
plugin/sepe/view/editar_participante_accion.tpl

@@ -1,410 +0,0 @@
-<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 - 72
plugin/sepe/view/listado_acciones_formativas.tpl

@@ -1,72 +0,0 @@
-<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 - 5
plugin/sepe/view/menu_sepe_administracion.tpl

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

+ 2 - 0
plugin/studentfollowup/lang/english.php

@@ -5,4 +5,6 @@ $strings['plugin_comment'] = "Care system (Zorgdossier) [CS]
     Career follow system (Structuurschema) [CFS]
     Competence based evaluation system (Competentie evaluatie systeem) [CBES]";
 $strings['tool_enable'] = 'Enable plugin';
+$strings['CareDetailView'] = 'Care detail view';
+
 

+ 17 - 4
plugin/studentfollowup/post.php

@@ -35,27 +35,37 @@ if ($showPrivate == false) {
 
 $criteria->andWhere(Criteria::expr()->eq('id', $postId));
 $qb
-    ->select('p')
+    ->select('distinct p')
     ->from('ChamiloPluginBundle:StudentFollowUp\CarePost', 'p')
     ->addCriteria($criteria)
     ->setMaxResults(1)
 ;
 $query = $qb->getQuery();
+
 /** @var CarePost $post */
 $post = $query->getOneOrNullResult();
 
 // Get related posts (post with same parent)
 $relatedPosts = [];
-if ($post && !empty($post->getParent())) {
+if ($post) {
     $qb = $em->createQueryBuilder();
     $criteria = Criteria::create();
+
+    if (!empty($post->getParent())) {
+        $criteria->where(Criteria::expr()->in('parent', [$post->getParent()->getId(), $post->getId()]));
+    } else {
+        $criteria->where(Criteria::expr()->eq('parent', $post->getId()));
+    }
+
     if ($showPrivate == false) {
         $criteria->andWhere(Criteria::expr()->eq('private', false));
     }
-    $criteria->andWhere(Criteria::expr()->eq('parent', $post->getParent()));
-    $criteria->andWhere(Criteria::expr()->neq('id', $post->getId()));
+
+    $criteria->orWhere(Criteria::expr()->eq('id', $post->getId()));
+
     $qb
         ->select('p')
+        ->distinct()
         ->from('ChamiloPluginBundle:StudentFollowUp\CarePost', 'p')
         ->addCriteria($criteria)
         ->orderBy('p.createdAt', 'desc')
@@ -63,6 +73,7 @@ if ($post && !empty($post->getParent())) {
     $query = $qb->getQuery();
     $relatedPosts = $query->getResult();
 }
+//var_dump($post->getTitle());
 
 $tpl = new Template($plugin->get_lang('plugin_title'));
 $tpl->assign('post', $post);
@@ -77,6 +88,8 @@ $tpl->assign(
     )
 );
 $tpl->assign('information_icon', Display::return_icon('info.png'));
+$tpl->assign('student_info', api_get_user_info($studentId));
+$tpl->assign('care_title', $plugin->get_lang('CareDetailView'));
 
 $content = $tpl->fetch('/'.$plugin->get_name().'/view/post.html.twig');
 // Assign into content

+ 4 - 1
plugin/studentfollowup/posts.php

@@ -36,6 +36,7 @@ $pageSize = 2;
 
 $qb
     ->select('p')
+    ->distinct()
     ->from('ChamiloPluginBundle:StudentFollowUp\CarePost', 'p')
     ->addCriteria($criteria)
     ->setFirstResult($pageSize * ($currentPage - 1))
@@ -48,6 +49,7 @@ $posts = new Paginator($query, $fetchJoinCollection = true);
 
 $totalItems = count($posts);
 $pagesCount = ceil($totalItems / $pageSize);
+
 $pagination = '';
 $url = api_get_self().'?student_id='.$studentId;
 if ($totalItems > 1) {
@@ -70,8 +72,9 @@ $tpl->assign('current_url', $url);
 $url = api_get_path(WEB_PLUGIN_PATH).'studentfollowup/post.php?student_id='.$studentId;
 $tpl->assign('post_url', $url);
 $tpl->assign('information_icon', Display::return_icon('info.png'));
-
+$tpl->assign('student_info', api_get_user_info($studentId));
 $tpl->assign('pagination', $pagination);
+$tpl->assign('care_title', $plugin->get_lang('CareDetailView'));
 $content = $tpl->fetch('/'.$plugin->get_name().'/view/posts.html.twig');
 // Assign into content
 $tpl->assign('content', $content);

+ 33 - 31
plugin/studentfollowup/view/post.html.twig

@@ -14,31 +14,24 @@
                         {% if countElements > 1 %}
                             {{ information_icon }} + {{ countElements }}
                         {% else %}
-                            {{ information_icon }}
+                            {{ information_icon }} + 1
                         {% endif %}
                         </a>
                     {% endif %}
-
-                    {% if post.parent %}
-                        <h3>Parent</h3>
-                        <a href="{{ post_url }}&post_id={{ post.parent.id }}">
-                            {{ post.parent.title }}
-                        </a>
-                    {% endif %}
                 {% endif %}
 
-                {% if type == 'all' %}
-                    {% if related_posts %}
-                        <h3>Related</h3>
-                         {% for post in related_posts %}
-                            <p>
-                                <a href="{{ post_url }}&post_id={{ post.id }}">
-                                {{ post.title }}
-                                </a>
-                            </p>
-                        {% endfor %}
-                    {% endif %}
-                {% endif %}
+                {#{% if type == 'all' %}#}
+                    {#{% if related_posts %}#}
+                        {#<h3>Related</h3>#}
+                         {#{% for post in related_posts %}#}
+                            {#<p>#}
+                                {#<a href="{{ post_url }}&post_id={{ post.id }}">#}
+                                {#{{ post.title }}#}
+                                {#</a>#}
+                            {#</p>#}
+                        {#{% endfor %}#}
+                    {#{% endif %}#}
+                {#{% endif %}#}
             </div>
 
             <div class="col-md-4">
@@ -60,15 +53,15 @@
             </div>
         </div>
     </div>
-    {% if post.children.count %}
-        {% for child in post.children %}
-            {{ _self.post_template('all', child) }}
-
-                {#<a href="{{ post_url }}&post_id={{ child.id }}">#}
-                {#{{ child.title }}#}
-                {#</a>#}
-        {% endfor %}
-    {% endif %}
+    {#{% if type == 'all' %}#}
+        {#{% if post.children.count %}#}
+            {#{% for child in post.children %}#}
+                {#{% if child.id != post.id %}#}
+                    {#{{ _self.post_template('all', child) }}#}
+                {#{% endif %}#}
+            {#{% endfor %}#}
+        {#{% endif %}#}
+    {#{% endif %}#}
 {% endif %}
 {% endmacro %}
 
@@ -78,6 +71,15 @@
     {{ back_link }}
 </div>
 
-<h2 class="text-center">Care detail view</h2>
+<h2 class="text-center">
+    {{ care_title }} - {{ student_info.complete_name }} - {{ post.title }}
+    {% if post.parent %}
+        {{ post.parent.title }}
+    {% endif %}
+</h2>
+
+{% for post in related_posts %}
+    {{ template.post_template('all', post, information_icon, post_url, current_url) }}
+{% endfor %}
 
-{{ template.post_template('all', post, information_icon, post_url, current_url, related_posts) }}
+{#{{ template.post_template('all', post, information_icon, post_url, current_url, related_posts) }}#}

+ 1 - 1
plugin/studentfollowup/view/posts.html.twig

@@ -1,6 +1,6 @@
 {% import 'studentfollowup/view/post.html.twig' as template %}
 
-<h2 class="text-center">Care detail view</h2>
+<h2 class="text-center">{{ care_title }} - {{ student_info.complete_name }}</h2>
 {% if posts %}
     {% for post in posts %}
         {{ template.post_template('simple', post, information_icon, post_url, current_url) }}

+ 6 - 6
src/Chamilo/CourseBundle/Component/CourseCopy/CourseRestorer.php

@@ -1759,8 +1759,8 @@ class CourseRestorer
                         'c_id' => $this->destination_course_id,
                         'title' => self::DBUTF8($quiz->title),
                         'description' => ($quiz->description === false ? '' : self::DBUTF8($quiz->description)),
-                        'type' => isset($quiz->quiz_type) ? $quiz->quiz_type : $quiz->type,
-                        'random' => $quiz->random,
+                        'type' => isset($quiz->quiz_type) ? (int) $quiz->quiz_type : $quiz->type,
+                        'random' => (int) $quiz->random,
                         'active' => $quiz->active,
                         'sound' => self::DBUTF8($doc),
                         'max_attempt' => (int) $quiz->max_attempt,
@@ -1769,10 +1769,10 @@ class CourseRestorer
                         'pass_percentage' => $quiz->pass_percentage,
                         'feedback_type' => (int) $quiz->feedback_type,
                         'random_answers' => (int) $quiz->random_answers,
-                        'random_by_category' => $quiz->random_by_category,
-                        'review_answers' => $quiz->review_answers,
-                        'propagate_neg' => $quiz->propagate_neg,
-                        'text_when_finished' => $quiz->text_when_finished,
+                        'random_by_category' => (int) $quiz->random_by_category,
+                        'review_answers' => (int) $quiz->review_answers,
+                        'propagate_neg' => (int) $quiz->propagate_neg,
+                        'text_when_finished' => (string) $quiz->text_when_finished,
                         'expired_time' => (int) $quiz->expired_time,
                         'start_time' => $quiz->start_time,
                         'end_time' => $quiz->end_time,

+ 2 - 1
src/Chamilo/CourseBundle/Entity/CTool.php

@@ -96,7 +96,8 @@ class CTool
      *
      * @ORM\Column(name="target", type="string", length=20, nullable=false)
      */
-    private $target;
+    private
+        $target;
 
     /**
      * @var string