diff --git a/app/Migrations/Schema/V111/Version111.php b/app/Migrations/Schema/V111/Version111.php index c1f216f8ad..93a54e860e 100644 --- a/app/Migrations/Schema/V111/Version111.php +++ b/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')) { diff --git a/app/Resources/public/css/base.css b/app/Resources/public/css/base.css index 2c7c895294..bb59955fc7 100644 --- a/app/Resources/public/css/base.css +++ b/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; diff --git a/composer.json b/composer.json index e82f9f3dec..8fc177a67f 100755 --- a/composer.json +++ b/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" } } diff --git a/main/course_description/index.php b/main/course_description/index.php index a938003be6..eafd2f1e2c 100755 --- a/main/course_description/index.php +++ b/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; diff --git a/main/course_description/layout.php b/main/course_description/layout.php index 44c484a293..3a40124c1b 100755 --- a/main/course_description/layout.php +++ b/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(); diff --git a/main/course_description/listing.php b/main/course_description/listing.php index 07179cf60e..62146aeb79 100755 --- a/main/course_description/listing.php +++ b/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 '
'; - ksort($categories); - foreach ($categories as $id => $title) { - if ($i == ADD_BLOCK) { - echo ''. + $i = 1; + echo '
'; + ksort($categories); + foreach ($categories as $id => $title) { + if ($i == ADD_BLOCK) { + echo ''. Display::return_icon($default_description_icon[$id], $title, '', ICON_SIZE_MEDIUM).''; - break; - } else { - echo ''. + break; + } else { + echo ''. Display::return_icon($default_description_icon[$id], $title, '', ICON_SIZE_MEDIUM).''; - $i++; - } - } - echo '
'; + $i++; + } + } + echo '
'; } $history = isset($history) ? $history : null; // display course description list if ($history) { - echo '
+ echo '
@@ -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) { diff --git a/main/document/document_quota.php b/main/document/document_quota.php index 8087ab1645..39267aa45f 100755 --- a/main/document/document_quota.php +++ b/main/document/document_quota.php @@ -1,5 +1,6 @@ ['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']; diff --git a/main/inc/lib/course_home.lib.php b/main/inc/lib/course_home.lib.php index 8f986a4431..a4f06363f3 100755 --- a/main/inc/lib/course_home.lib.php +++ b/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 diff --git a/main/inc/lib/template.lib.php b/main/inc/lib/template.lib.php index aea15044f0..f2c5ebca88 100755 --- a/main/inc/lib/template.lib.php +++ b/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(); diff --git a/main/install/install.lib.php b/main/install/install.lib.php index 3cbe625deb..d0b2815e67 100755 --- a/main/install/install.lib.php +++ b/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 diff --git a/main/lp/learnpath.class.php b/main/lp/learnpath.class.php index 32aeb01b08..b1e71271ef 100755 --- a/main/lp/learnpath.class.php +++ b/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 diff --git a/main/lp/lp_add_category.php b/main/lp/lp_add_category.php index ab72405203..d683a7ada9 100644 --- a/main/lp/lp_add_category.php +++ b/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()); diff --git a/main/lp/lp_controller.php b/main/lp/lp_controller.php index b99f5f7b53..8cd585b93c 100755 --- a/main/lp/lp_controller.php +++ b/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) { diff --git a/main/lp/lp_edit_item_prereq.php b/main/lp/lp_edit_item_prereq.php index 9c8ebd3f45..84475b65c8 100755 --- a/main/lp/lp_edit_item_prereq.php +++ b/main/lp/lp_edit_item_prereq.php @@ -91,6 +91,7 @@ echo '
'; echo $lp->return_new_tree(); echo '
'; echo '
'; +echo '
'; $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 '
'; - +echo '
'; Display::display_footer(); diff --git a/main/lp/lp_list.php b/main/lp/lp_list.php index c04d5a26a9..cbd0aa825d 100755 --- a/main/lp/lp_list.php +++ b/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 + * @author Yannick Warnier */ $this_section = SECTION_COURSES; @@ -28,7 +28,8 @@ $baseWordDir = $courseDir; * Display initialisation and security checks */ // Extra javascript functions for in html head: -$htmlHeadXtra[] = " - - -
-
-
- -
-
-
- {% if message_info != "" %} -
- {{ message_info }} -
- {% endif %} - {% if message_error != "" %} -
- {{ message_error }} -
- {% endif %} -
-
-
- Acción Formativa: - {% if info != false %} -
- IDENTIFICADOR DE ACCIÓN (ID_ACCION): -
- -
- -
-
- -
- -
- -
-
-
-
- -
- -
-
- -
- IDENTIFICADOR DE ESPECIALIDAD PRINCIPAL -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
-
-
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
- - -
- -
- -
-
- -
- DESCRIPCION DE LA ACCION FORMATIVA -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
-
- {% else %} -
No hay información de la acción formativa
- {% endif %} -
- -
-
-
-
- Especialidades: - Crear especialidad - - {% for specialty in listSpecialty %} -
- -
-

'.get_lang('ThematicAdvanceHistory').'

- - - - -
{{ specialty.ORIGEN_ESPECIALIDAD }} {{ specialty.AREA_PROFESIONAL }} {{ specialty.CODIGO_ESPECIALIDAD }} - Borrar - Editar -
-
-
- {% endfor %} - - - - -
-
-
- Participantes: - Crear participante - - {% for participant in listParticipant %} -
- -
- - - - - - -
{{ participant.firstname }} {{ participant.lastname }} {{ participant.NUM_DOCUMENTO }} {{ participant.LETRA_NIF }} - Borrar - Editar -
-
-
- {% endfor %} -
-
-
- - diff --git a/plugin/sepe/view/configuracion.tpl b/plugin/sepe/view/configuracion.tpl deleted file mode 100644 index a22d4f4fc4..0000000000 --- a/plugin/sepe/view/configuracion.tpl +++ /dev/null @@ -1,40 +0,0 @@ - - - -
-
-
 
-
- {% if message_info != "" %} -
- {{ message_info }} -
- {% endif %} - {% if message_error != "" %} -
- {{ message_error }} -
- {% endif %} - -
- Usuario SEPE -
- -
- - -
-
- -
-
- -
- - - - -
-
 
-
-
diff --git a/plugin/sepe/view/datos_identificativos.tpl b/plugin/sepe/view/datos_identificativos.tpl deleted file mode 100644 index fed7056ddb..0000000000 --- a/plugin/sepe/view/datos_identificativos.tpl +++ /dev/null @@ -1,95 +0,0 @@ - - - -
-
- -
-
- {% if message_info != "" %} -
- {{ message_info }} -
- {% endif %} - {% if message_error != "" %} -
- {{ message_error }} -
- {% endif %} -
-
-
- Datos Identificativos del Centro - {% if info != false %} -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
- {% else %} -
No hay datos identificativos del centro
- {% endif %} -
-
-
-
-
diff --git a/plugin/sepe/view/editar_accion_formativa.tpl b/plugin/sepe/view/editar_accion_formativa.tpl deleted file mode 100644 index e587883a0f..0000000000 --- a/plugin/sepe/view/editar_accion_formativa.tpl +++ /dev/null @@ -1,357 +0,0 @@ - - -
-
-
-
- -
-
-
- {% if rmessage == "YES" %} -
- {{ responseMessage }} -
- {% endif %} -
-
- Acción Formativa -
- IDENTIFICADOR DE ACCIÓN (ID_ACCION): -
- -
- -
-
- -
- -
- -
-
-
- -
- -
- -
-
- -
- IDENTIFICADOR DE ESPECIALIDAD PRINCIPAL -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
-
- - -
- -
- -
-
- Número de horas de la acción formativa. -
-
- -
- -
- - / - - / - -
-
Fecha de inicio de la acción formativa.
-
- -
- -
- - / - - / - -
-
Fecha de finalización de la acción formativa.
-
- -
- -
- -
-
Indica si la acción formativa se imparte de forma completa.
-
- -
- -
- -
-
Procedencia de la dotación económica. - -
-
- -
- -
- -
-
Número de plazas ofertadas. -
-
- - -
- DESCRIPCION DE LA ACCION FORMATIVA -
- -
- -
Nombre o descripción breve de la acción formativa.
-
-
- -
- -
- -
Breve texto descriptivo de los objetivos, contenidos y estructura de la acción formativa.
-
-
- -
- -
- -
Breve texto que señala el período temporal durante el que se desarrolla la acción formativa.
-
-
- -
- -
- -
Breve texto que especifica los requisitos de acceso a la formación.
-
-
- -
- -
- -
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.
-
-
-
- -
- - - -
-
-
-
diff --git a/plugin/sepe/view/editar_datos_identificativos.tpl b/plugin/sepe/view/editar_datos_identificativos.tpl deleted file mode 100644 index b99670f08b..0000000000 --- a/plugin/sepe/view/editar_datos_identificativos.tpl +++ /dev/null @@ -1,89 +0,0 @@ - - -
-
-
-
- -
-
-
- {% if message_info != "" %} -
- {{ message_info }} -
- {% endif %} - {% if message_error != "" %} -
- {{ message_error }} -
- {% endif %} -
-
- Datos Identificativos del Centro - -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
-
- - - -
-
-
-
diff --git a/plugin/sepe/view/editar_especialidad_accion.tpl b/plugin/sepe/view/editar_especialidad_accion.tpl deleted file mode 100644 index e84c642f94..0000000000 --- a/plugin/sepe/view/editar_especialidad_accion.tpl +++ /dev/null @@ -1,435 +0,0 @@ - - - -
-
-
-
- -
-
-
- {% if message_info != "" %} -
- {{ message_info }} -
- {% endif %} - {% if message_error != "" %} -
- {{ message_error }} -
- {% endif %} -
-
- Especialidad Acción Formativa -
- IDENTIFICADOR DE ESPECIALIDAD: -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
-
- -
- CENTRO DE IMPARTICIÓN: -
- -
- -
-
- -
- -
- -
-
-
- -
- -
- - / - - / - -
-
Fecha de inicio de la especialidad formativa.
-
- -
- -
- - / - - / - -
-
Fecha de finalización de especialidad formativa.
-
- -
- -
- - Modo de impartición de la especialidad formativa de la acción. -
-
- -
- DATOS DE DURACIÓN: -
- -
- -
-
Número de horas realizadas de forma presencial.
-
- -
- -
- -
-
Número de horas realizadas a través de teleformación.
-
-
- -
- {% if new_action == "SI" %} - CENTROS DE SESIONES PRESENCIALES: -
Debe guardar los cambios antes de crear un centro presencial
- {% else %} - CENTROS DE SESIONES PRESENCIALES: - Crear centro presencial - - {% for classroom in listClassroom %} -
- -
- -
-
- {% endfor %} - - {% endif %} -
- -
- {% if new_action == "SI" %} - TUTORES-FORMADORES: -
Debe guardar los cambios antes de crear un centro presencial
- {% else %} - TUTORES-FORMADORES: - Crear tutor-formador - - {% for tutor in listTutors %} -
- -
- -
-
- {% endfor %} - - {% endif %} - -
- - -
- USO DEL CONTENIDO -
- HORARIO MAÑANA -
Se considerará el período temporal comprendido entre las 7:00 y las 15:00 horas.
-
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
-
-
- -
- HORARIO TARDE -
Se considerará el período temporal comprendido entre las 15:00 horas y las 23:00 horas.
-
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
-
-
- - -
- HORARIO NOCHE -
Se considerará el período temporal comprendido entre las 23:00 horas y las 7:00 horas.
-
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
-
-
- -
- SEGUIMIENTO Y EVALUACIÓN -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
-
-
- - -
- -
- - - -
-
-
-
diff --git a/plugin/sepe/view/editar_especialidad_classroom.tpl b/plugin/sepe/view/editar_especialidad_classroom.tpl deleted file mode 100644 index 284ebedfff..0000000000 --- a/plugin/sepe/view/editar_especialidad_classroom.tpl +++ /dev/null @@ -1,95 +0,0 @@ - - - -
-
-
-
- -
-
-
- {% if message_info != "" %} -
- {{ message_info }} -
- {% endif %} - {% if message_error != "" %} -
- {{ message_error }} -
- {% endif %} - - - {% if new_classroom == "SI" %} -
-
- -
- -
-
-
- -
-
- Listado de centros -
- -
- -
-
-
-
- - -
diff --git a/plugin/sepe/view/editar_especialidad_participante.tpl b/plugin/sepe/view/editar_especialidad_participante.tpl deleted file mode 100644 index d9b773c8ad..0000000000 --- a/plugin/sepe/view/editar_especialidad_participante.tpl +++ /dev/null @@ -1,480 +0,0 @@ - - - -
-
-
-
- -
-
-
- {% if message_info != "" %} -
- {{ message_info }} -
- {% endif %} - {% if message_error != "" %} -
- {{ message_error }} -
- {% endif %} -
-
- ESPECIALIDADES DEL PARTICIPANTE -
- IDENTIFICADOR DE ESPECIALIDAD: -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
-
- -
- -
- - / - - / - -
-
Alta para acceder a la especialidad de la acción formativa. -
-
- -
- -
- - / - - / - -
-
Baja para acceder a la especialidad de la acción formativa. -
-
- - -
- {% if new_specialty == "SI" %} - TUTORÍAS PRESENCIALES: -
Debe guardar los cambios antes de crear un centro de tutorias presenciales
- {% else %} - TUTORÍAS PRESENCIALES: - Crear tutoria presencial - - {% for tutorial in listSpecialtyTutorials %} -
- -
- -
-
- {% endfor %} - - {% endif %} -
- - -
- EVALUACIÓN FINAL: -
- CENTRO PRESENCIAL DE EVALUACIÓN FINAL -
- -
- -
-
- -
- -
- -
-
-
- -
- -
- - / - - / - -
-
Fecha de inicio de la evaluación final. -
-
- -
- -
- - / - - / - -
-
Fecha de finalización de la evaluación final. -
-
- -
- -
- RESULTADOS: -
- -
- -
Valor que indica la situación del participante y el resultado logrado por el participante en la especialidad de la acción formativa.
- Puede tomar los valores de:
-
    -
  • 0 – Iniciado
  • -
  • 1 – Abandona por colocación
  • -
  • 2 – Abandona por otras causas
  • -
  • 3 – Termina con evaluación positiva
  • -
  • 4 – Termina con evaluación negativa
  • -
  • 5 – Termina sin evaluar
  • -
  • 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).
  • -
  • 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).
  • -
-
-
-
- -
- -
- -
- 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.
-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). -
-
-
- -
- -
- - -
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.
-Se registra con cuatro dígitos para dar cabida a las puntuaciones decimales (por ejemplo, la puntuación 8,3 debe registrarse como 830).
-
-
-
- -
-
-
-
-
diff --git a/plugin/sepe/view/editar_especialidad_tutor.tpl b/plugin/sepe/view/editar_especialidad_tutor.tpl deleted file mode 100644 index fae86f92ef..0000000000 --- a/plugin/sepe/view/editar_especialidad_tutor.tpl +++ /dev/null @@ -1,299 +0,0 @@ - - - - -
-
-
-
- -
-
-
- {% if message_info != "" %} -
- {{ message_info }} -
- {% endif %} - {% if message_error != "" %} -
- {{ message_error }} -
- {% endif %} - - {% if new_tutor == "SI" %} -
-
- -
- -
-
-
- -
-
- Listado de tutores -
- -
- - -
-
-
-
- diff --git a/plugin/sepe/view/editar_especialidad_tutorials.tpl b/plugin/sepe/view/editar_especialidad_tutorials.tpl deleted file mode 100644 index 27c5486724..0000000000 --- a/plugin/sepe/view/editar_especialidad_tutorials.tpl +++ /dev/null @@ -1,199 +0,0 @@ - - - -
-
-
-
- -
-
-
- {% if message_info != "" %} -
- {{ message_info }} -
- {% endif %} - {% if message_error != "" %} -
- {{ message_error }} -
- {% endif %} -
-
- CENTRO PRESENCIAL -
- -
- -
-
- -
- -
- -
-
-
- -
- -
- - / - - / - -
-
Fecha de inicio de la tutoría presencial.
-
- -
- -
- - / - - / - -
-
Fecha de finalización de la tutoría presencial.
-
- -
- -
-
- -
diff --git a/plugin/sepe/view/editar_participante_accion.tpl b/plugin/sepe/view/editar_participante_accion.tpl deleted file mode 100644 index 2843f4ac7b..0000000000 --- a/plugin/sepe/view/editar_participante_accion.tpl +++ /dev/null @@ -1,410 +0,0 @@ - - - - -
-
-
-
- -
-
-
- {% if message_info != "" %} -
- {{ message_info }} -
- {% endif %} - {% if message_error != "" %} -
- {{ message_error }} -
- {% endif %} -
-
- Participante Acción Formativa -
- LISTADO DE USUARIOS DEL CURSO CHAMILO: -
- -
- - -
-
-
- - -
- - IDENTIFICADOR PARTICIPANTE: -
- -
- - -
-
- -
- -
- -
-
- -
- -
- -
-
- -
- El campo de "Número del documento" tiene una longitud de 10 caracteres alfanuméricos. - - - - - - - - -
TipoNúmeroCarácter de control NIF
DbbN8L
EbbXN7
bbYN7
bbZN7
L
L
L
UbbN8L
WbbN8L
GN10L
HbbN8L
-
- -
- -
- -
- -
-
-
- CONTRATO FORMACION: -
- -
- - Dato alfanumérico de 14 posiciones formado por la concatenación de:
-
    -
  • 1 posición alfabética que indica el organismo que asignó identificador al contrato. En la actualidad siempre “E” estatal.
  • -
  • 2 posiciones numéricas con el código de la provincia.
  • -
  • 4 posiciones numéricas con el año del contrato.
  • -
  • 7 posiciones numéricas con el número secuencial asignado al contrato en la provincia y año.
-
-
- -
- -
- -
-
- -
- ID TUTOR EMPRESA: -
- -
- -
-
- - - -
- - -
- ID TUTOR FORMACIÓN: -
- -
- -
-
- - - -
-
- - -
- {% if new_participant == "SI" %} - ESPECIALIDADES DEL PARTICIPANTE: -
Debe guardar los cambios antes de crear una especialidad al participante.
- {% else %} - ESPECIALIDADES DEL PARTICIPANTE: - Crear especialidad - - {% for specialty in listParticipantSpecialty %} -
- -
- -
-
- {% endfor %} - - {% endif %} -
- -
-
-
-
-
diff --git a/plugin/sepe/view/listado_acciones_formativas.tpl b/plugin/sepe/view/listado_acciones_formativas.tpl deleted file mode 100644 index b39c08e8b3..0000000000 --- a/plugin/sepe/view/listado_acciones_formativas.tpl +++ /dev/null @@ -1,72 +0,0 @@ - - - -
-
- {% if message_info != "" %} -
- {{ message_info }} -
- {% endif %} - {% if message_error != "" %} -
- {{ message_error }} -
- {% endif %} - - -
- {% if lista_curso_acciones|length > 0 %} - - {% for lista in lista_curso_acciones %} - - - - - {% endfor %} -
Curso: {{ lista.title }} -> ID ACCION: {{ lista.ORIGEN_ACCION }} {{ lista.CODIGO_ACCION }} - Borrar - Desvincular - Ver / Editar - -
- {% else %} -
- No hay acciones formativas asociadas a un curso. -
- {% endif %} -
- -
- - - -
- - {% for lista in lista_curso_libre_acciones %} - - - - - - {% endfor %} -
Curso: {{ lista.title }} - - - Asignar acción - Crear acción -
-
-
-
diff --git a/plugin/sepe/view/menu_sepe_administracion.tpl b/plugin/sepe/view/menu_sepe_administracion.tpl deleted file mode 100644 index ab2ef1f0b2..0000000000 --- a/plugin/sepe/view/menu_sepe_administracion.tpl +++ /dev/null @@ -1,5 +0,0 @@ -
-
- {{ html_text }} -
-
diff --git a/plugin/studentfollowup/lang/english.php b/plugin/studentfollowup/lang/english.php index 56daa91589..ec282c344b 100644 --- a/plugin/studentfollowup/lang/english.php +++ b/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'; + diff --git a/plugin/studentfollowup/post.php b/plugin/studentfollowup/post.php index dfe4842c77..85987efd61 100644 --- a/plugin/studentfollowup/post.php +++ b/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 diff --git a/plugin/studentfollowup/posts.php b/plugin/studentfollowup/posts.php index e931da313f..896830c8cf 100644 --- a/plugin/studentfollowup/posts.php +++ b/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); diff --git a/plugin/studentfollowup/view/post.html.twig b/plugin/studentfollowup/view/post.html.twig index 62a5d3b1d4..19182badc3 100644 --- a/plugin/studentfollowup/view/post.html.twig +++ b/plugin/studentfollowup/view/post.html.twig @@ -14,31 +14,24 @@ {% if countElements > 1 %} {{ information_icon }} + {{ countElements }} {% else %} - {{ information_icon }} + {{ information_icon }} + 1 {% endif %} {% endif %} - - {% if post.parent %} -

Parent

- - {{ post.parent.title }} - - {% endif %} {% endif %} - {% if type == 'all' %} - {% if related_posts %} -

Related

- {% for post in related_posts %} -

- - {{ post.title }} - -

- {% endfor %} - {% endif %} - {% endif %} + {#{% if type == 'all' %}#} + {#{% if related_posts %}#} + {#

Related

#} + {#{% for post in related_posts %}#} + {#

#} + {##} + {#{{ post.title }}#} + {##} + {#

#} + {#{% endfor %}#} + {#{% endif %}#} + {#{% endif %}#}
@@ -60,15 +53,15 @@
- {% if post.children.count %} - {% for child in post.children %} - {{ _self.post_template('all', child) }} - - {##} - {#{{ child.title }}#} - {##} - {% 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 }} -

Care detail view

+

+ {{ care_title }} - {{ student_info.complete_name }} - {{ post.title }} + {% if post.parent %} + {{ post.parent.title }} + {% endif %} +

+ +{% 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) }} \ No newline at end of file +{#{{ template.post_template('all', post, information_icon, post_url, current_url, related_posts) }}#} \ No newline at end of file diff --git a/plugin/studentfollowup/view/posts.html.twig b/plugin/studentfollowup/view/posts.html.twig index 1182e51905..39db3694cd 100644 --- a/plugin/studentfollowup/view/posts.html.twig +++ b/plugin/studentfollowup/view/posts.html.twig @@ -1,6 +1,6 @@ {% import 'studentfollowup/view/post.html.twig' as template %} -

Care detail view

+

{{ care_title }} - {{ student_info.complete_name }}

{% if posts %} {% for post in posts %} {{ template.post_template('simple', post, information_icon, post_url, current_url) }} diff --git a/src/Chamilo/CourseBundle/Component/CourseCopy/CourseRestorer.php b/src/Chamilo/CourseBundle/Component/CourseCopy/CourseRestorer.php index 19bc65d92f..a7ae02647e 100644 --- a/src/Chamilo/CourseBundle/Component/CourseCopy/CourseRestorer.php +++ b/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, diff --git a/src/Chamilo/CourseBundle/Entity/CTool.php b/src/Chamilo/CourseBundle/Entity/CTool.php index cc9cc9216b..fff5ba06ac 100644 --- a/src/Chamilo/CourseBundle/Entity/CTool.php +++ b/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