From 9be1fe6059fe4fbd66f8de5ac4bc7f6193085d01 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Wed, 20 Mar 2019 08:22:54 +0100 Subject: [PATCH 01/15] Hide protected folders from student BT#15437 --- .../Component/Editor/Driver/CourseDriver.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Chamilo/CoreBundle/Component/Editor/Driver/CourseDriver.php b/src/Chamilo/CoreBundle/Component/Editor/Driver/CourseDriver.php index 1cc3f0cb4b..2c5db0ccf3 100644 --- a/src/Chamilo/CoreBundle/Component/Editor/Driver/CourseDriver.php +++ b/src/Chamilo/CoreBundle/Component/Editor/Driver/CourseDriver.php @@ -127,6 +127,17 @@ class CourseDriver extends Driver implements DriverInterface unset($defaultDisabled['mkdir']); $defaultDisabled = array_flip($defaultDisabled); $config['disabled'] = $defaultDisabled; + } else { + $protectedFolders = \DocumentManager::getProtectedFolderFromStudent(); + foreach ($protectedFolders as $folder) { + $config['attributes'][] = [ + 'pattern' => $folder.'/', + 'read' => false, + 'write' => false, + 'hidden' => true, + 'locked' => false, + ]; + } } $foldersToHide = \DocumentManager::get_all_document_folders( From 457e2fe725ad84304d932acecbc0dd11e9053958 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Wed, 20 Mar 2019 09:57:18 +0100 Subject: [PATCH 02/15] Use bccomp to compare floats instead of '>=' fixes BT#15438 --- composer.json | 1 + main/inc/lib/exercise.lib.php | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index df87607540..63094109bb 100755 --- a/composer.json +++ b/composer.json @@ -45,6 +45,7 @@ "ext-libxml": "*", "ext-dom": "*", "ext-fileinfo": "*", + "ext-bcmath": "*", "twig/twig": "1.*", "twig/extensions": "~1.0", "doctrine/orm": "~2.4", diff --git a/main/inc/lib/exercise.lib.php b/main/inc/lib/exercise.lib.php index 264a8f3ca2..427664493b 100644 --- a/main/inc/lib/exercise.lib.php +++ b/main/inc/lib/exercise.lib.php @@ -4654,14 +4654,16 @@ EOT; $score = []; if ($show_results) { + $compareResult = bccomp($my_total_score, $my_total_weight, 3); + $scorePassed = $compareResult === 1 || $compareResult === 0; + $score = [ 'result' => self::show_score( $my_total_score, $my_total_weight, - false, - true + false ), - 'pass' => $my_total_score >= $my_total_weight ? true : false, + 'pass' => $scorePassed, 'score' => $my_total_score, 'weight' => $my_total_weight, 'comments' => $comnt, @@ -4683,7 +4685,6 @@ EOT; $question_content = ''; if ($show_results) { $question_content = '
'; - if ($showQuestionScore == false) { $score = []; } From 002f32f723ce527edcd53d1bc73eac5546e9f1cf Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Wed, 20 Mar 2019 09:57:29 +0100 Subject: [PATCH 03/15] Minor - flint fixes --- main/inc/lib/chat.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/inc/lib/chat.lib.php b/main/inc/lib/chat.lib.php index 7c4f5e959d..75525540aa 100755 --- a/main/inc/lib/chat.lib.php +++ b/main/inc/lib/chat.lib.php @@ -323,7 +323,7 @@ class Chat extends Model $_SESSION['openChatBoxes'][$fromUserId] = api_strtotime($chat['sent'], 'UTC'); } - $chatHistory[$fromUserId] = [ + $chatHistory[$fromUserId] = [ 'window_user_info' => $userInfo, 'total_messages' => $count, 'items' => $chatItems, From 30a15f33b6ebeaa6f55c804eb74fffbfc346f72a Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Wed, 20 Mar 2019 10:04:38 +0100 Subject: [PATCH 04/15] Check if bccomp function exists BT#15438 --- main/inc/lib/exercise.lib.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/main/inc/lib/exercise.lib.php b/main/inc/lib/exercise.lib.php index 427664493b..cafc89adad 100644 --- a/main/inc/lib/exercise.lib.php +++ b/main/inc/lib/exercise.lib.php @@ -4654,9 +4654,11 @@ EOT; $score = []; if ($show_results) { - $compareResult = bccomp($my_total_score, $my_total_weight, 3); - $scorePassed = $compareResult === 1 || $compareResult === 0; - + $scorePassed = $my_total_score >= $my_total_weight; + if (function_exists('bccomp')) { + $compareResult = bccomp($my_total_score, $my_total_weight, 3); + $scorePassed = $compareResult === 1 || $compareResult === 0; + } $score = [ 'result' => self::show_score( $my_total_score, From 0a1ba00c355e5e431330639eef64db0f48d670dc Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Wed, 20 Mar 2019 10:09:40 +0100 Subject: [PATCH 05/15] Remove bcmath requirement --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index 63094109bb..df87607540 100755 --- a/composer.json +++ b/composer.json @@ -45,7 +45,6 @@ "ext-libxml": "*", "ext-dom": "*", "ext-fileinfo": "*", - "ext-bcmath": "*", "twig/twig": "1.*", "twig/extensions": "~1.0", "doctrine/orm": "~2.4", From 80d80a53a696026950beaeb36ca104808cada2e3 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Wed, 20 Mar 2019 10:30:45 +0100 Subject: [PATCH 06/15] Fix missing column in matching answer list --- main/exercise/matching.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/main/exercise/matching.class.php b/main/exercise/matching.class.php index 232485fc74..5284704352 100755 --- a/main/exercise/matching.class.php +++ b/main/exercise/matching.class.php @@ -291,6 +291,7 @@ class Matching extends Question $header .= ''.get_lang('ExpectedChoice').''; $header .= ''.get_lang('Status').''; } else { + $header .= ''.get_lang('YourChoice').''; $header .= ''.get_lang('CorrespondsTo').''; } $header .= ''; From e3f1130cbf9b156ac1b8ee996ad800bbd879e7c2 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Wed, 20 Mar 2019 11:09:53 +0100 Subject: [PATCH 07/15] When adding groups with category respect the category max limit see BT#15417 --- main/inc/lib/groupmanager.lib.php | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/main/inc/lib/groupmanager.lib.php b/main/inc/lib/groupmanager.lib.php index 7cb9280e13..4e34088fd6 100755 --- a/main/inc/lib/groupmanager.lib.php +++ b/main/inc/lib/groupmanager.lib.php @@ -387,27 +387,31 @@ class GroupManager /** * Create a group for every class subscribed to the current course. * - * @param int $category_id The category in which the groups should be created + * @param int $categoryId The category in which the groups should be created * * @return array */ - public static function create_class_groups($category_id) + public static function create_class_groups($categoryId) { - $options['where'] = [" usergroup.course_id = ? " => api_get_course_int_id()]; + $options['where'] = [' usergroup.course_id = ? ' => api_get_course_int_id()]; $obj = new UserGroup(); $classes = $obj->getUserGroupInCourse($options); $group_ids = []; + foreach ($classes as $class) { - $users_ids = $obj->get_users_by_usergroup($class['id']); - $group_id = self::create_group( + $userList = $obj->get_users_by_usergroup($class['id']); + $groupId = self::create_group( $class['name'], - $category_id, + $categoryId, 0, - count($users_ids) + null ); - $groupInfo = self::get_group_properties($group_id); - self::subscribe_users($users_ids, $groupInfo); - $group_ids[] = $group_id; + + if ($groupId) { + $groupInfo = self::get_group_properties($groupId); + self::subscribe_users($userList, $groupInfo); + $group_ids[] = $groupId; + } } return $group_ids; From 81e966cfb3fca251716703860c43af12c89a02b3 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Wed, 20 Mar 2019 11:31:21 +0100 Subject: [PATCH 08/15] Minor - add phpdoc, use int casting improve group creation --- main/group/group_creation.php | 60 ++++++++++++++++++------------- main/inc/lib/groupmanager.lib.php | 35 ++++++++++-------- 2 files changed, 56 insertions(+), 39 deletions(-) diff --git a/main/group/group_creation.php b/main/group/group_creation.php index 53cf67430c..08e0487f25 100755 --- a/main/group/group_creation.php +++ b/main/group/group_creation.php @@ -254,31 +254,43 @@ EOT; /* * Show form to generate subgroups */ - if (api_get_setting('allow_group_categories') === 'true' && count(GroupManager :: get_group_list()) > 0) { - $base_group_options = []; - $groups = GroupManager :: get_group_list(); - foreach ($groups as $index => $group) { - $number_of_students = GroupManager :: number_of_students($group['id']); - if ($number_of_students > 0) { - $base_group_options[$group['id']] = $group['name'].' ('.$number_of_students.' '.get_lang('Users').')'; + if (api_get_setting('allow_group_categories') === 'true') { + $groups = GroupManager::get_group_list(); + if (!empty($groups)) { + $base_group_options = []; + foreach ($groups as $index => $group) { + $number_of_students = GroupManager::number_of_students($group['id']); + if ($number_of_students > 0) { + $base_group_options[$group['id']] = + $group['name'].' ('.$number_of_students.' '.get_lang('Users').')'; + } + } + if (count($base_group_options) > 0) { + $create_subgroups_form = new FormValidator( + 'create_subgroups', + 'post', + api_get_self().'?'.api_get_cidreq() + ); + $create_subgroups_form->addElement('header', get_lang('CreateSubgroups')); + $create_subgroups_form->addElement('html', get_lang('CreateSubgroupsInfo')); + $create_subgroups_form->addElement('hidden', 'action'); + $group_el = []; + $group_el[] = $create_subgroups_form->createElement( + 'static', + null, + null, + get_lang('CreateNumberOfGroups') + ); + $group_el[] = $create_subgroups_form->createElement('text', 'number_of_groups', null, ['size' => 3]); + $group_el[] = $create_subgroups_form->createElement('static', null, null, get_lang('WithUsersFrom')); + $group_el[] = $create_subgroups_form->createElement('select', 'base_group', null, $base_group_options); + $group_el[] = $create_subgroups_form->addButtonSave(get_lang('Ok'), 'submit', true); + $create_subgroups_form->addGroup($group_el, 'create_groups', null, null, false); + $defaults = []; + $defaults['action'] = 'create_subgroups'; + $create_subgroups_form->setDefaults($defaults); + $create_subgroups_form->display(); } - } - if (count($base_group_options) > 0) { - $create_subgroups_form = new FormValidator('create_subgroups', 'post', api_get_self().'?'.api_get_cidreq()); - $create_subgroups_form->addElement('header', get_lang('CreateSubgroups')); - $create_subgroups_form->addElement('html', get_lang('CreateSubgroupsInfo')); - $create_subgroups_form->addElement('hidden', 'action'); - $group_el = []; - $group_el[] = $create_subgroups_form->createElement('static', null, null, get_lang('CreateNumberOfGroups')); - $group_el[] = $create_subgroups_form->createElement('text', 'number_of_groups', null, ['size' => 3]); - $group_el[] = $create_subgroups_form->createElement('static', null, null, get_lang('WithUsersFrom')); - $group_el[] = $create_subgroups_form->createElement('select', 'base_group', null, $base_group_options); - $group_el[] = $create_subgroups_form->addButtonSave(get_lang('Ok'), 'submit', true); - $create_subgroups_form->addGroup($group_el, 'create_groups', null, null, false); - $defaults = []; - $defaults['action'] = 'create_subgroups'; - $create_subgroups_form->setDefaults($defaults); - $create_subgroups_form->display(); } } diff --git a/main/inc/lib/groupmanager.lib.php b/main/inc/lib/groupmanager.lib.php index 4e34088fd6..4bb1b02fec 100755 --- a/main/inc/lib/groupmanager.lib.php +++ b/main/inc/lib/groupmanager.lib.php @@ -66,9 +66,11 @@ class GroupManager } /** + * @param int $courseId + * * @return array */ - public static function get_groups($courseId = null) + public static function get_groups($courseId = 0) { $table_group = Database::get_course_table(TABLE_GROUP); $courseId = !empty($courseId) ? (int) $courseId : api_get_course_int_id(); @@ -189,7 +191,7 @@ class GroupManager $course_id = $_course['real_id']; $currentCourseRepository = $_course['path']; $category = self::get_category($category_id); - $places = intval($places); + $places = (int) $places; // Default values $docState = self::TOOL_PRIVATE; @@ -247,7 +249,7 @@ class GroupManager self_registration_allowed = '".$selfRegAllowed."', self_unregistration_allowed = '".$selfUnregAllwoed."', $documentCondition - session_id='".intval($session_id)."'"; + session_id='".$session_id."'"; Database::query($sql); $lastId = Database::insert_id(); @@ -548,17 +550,19 @@ class GroupManager public static function get_group_properties($group_id, $useIid = false) { $course_id = api_get_course_int_id(); - if (empty($group_id) || !is_int(intval($group_id))) { + $group_id = (int) $group_id; + + if (empty($group_id)) { return null; } $table_group = Database::get_course_table(TABLE_GROUP); $sql = "SELECT * FROM $table_group - WHERE c_id = $course_id AND id = ".intval($group_id); + WHERE c_id = $course_id AND id = ".$group_id; if ($useIid) { $sql = "SELECT * FROM $table_group - WHERE c_id = $course_id AND iid = ".intval($group_id); + WHERE c_id = $course_id AND iid = ".$group_id; } $db_result = Database::query($sql); $db_object = Database::fetch_object($db_result); @@ -646,7 +650,7 @@ class GroupManager return []; } $name = Database::escape_string($name); - $courseId = intval($courseId); + $courseId = (int) $courseId; $table_group = Database::get_course_table(TABLE_GROUP); $sql = "SELECT * FROM $table_group WHERE c_id = $courseId AND name LIKE '%$name%'"; @@ -702,8 +706,8 @@ class GroupManager ) { $table_group = Database::get_course_table(TABLE_GROUP); $table_forum = Database::get_course_table(TABLE_FORUM); - $categoryId = intval($categoryId); - $group_id = intval($group_id); + $categoryId = (int) $categoryId; + $group_id = (int) $group_id; $courseId = api_get_course_int_id(); $allowDocumentAccess = api_get_configuration_value('group_document_access'); @@ -727,7 +731,7 @@ class GroupManager self_registration_allowed = '".Database::escape_string($selfRegistrationAllowed)."', self_unregistration_allowed = '".Database::escape_string($selfUnRegistrationAllowed)."', $documentCondition - category_id = ".intval($categoryId)." + category_id = ".$categoryId." WHERE c_id = $courseId AND id=".$group_id; $result = Database::query($sql); @@ -1055,7 +1059,7 @@ class GroupManager $documentAccess ) { $table = Database::get_course_table(TABLE_GROUP_CATEGORY); - $id = intval($id); + $id = (int) $id; $courseId = api_get_course_int_id(); @@ -1548,9 +1552,10 @@ class GroupManager public static function is_self_registration_allowed($user_id, $groupInfo) { $course_id = api_get_course_int_id(); - if (!$user_id > 0) { + if (empty($user_id)) { return false; } + $groupIid = $groupInfo['iid']; $table = Database::get_course_table(TABLE_GROUP); if (isset($groupIid)) { @@ -1580,7 +1585,7 @@ class GroupManager */ public static function is_self_unregistration_allowed($user_id, $groupInfo) { - if (!$user_id > 0 || empty($groupInfo)) { + if (empty($user_id) || empty($groupInfo)) { return false; } $groupIid = $groupInfo['iid']; @@ -1921,7 +1926,7 @@ class GroupManager return false; } - if (!empty($groupId) > 0) { + if (!empty($groupId)) { $table_group_tutor = Database::get_course_table(TABLE_GROUP_TUTOR); $sql = "DELETE FROM $table_group_tutor WHERE group_id = $groupId AND c_id = $courseId"; @@ -3133,7 +3138,7 @@ class GroupManager case self::DOCUMENT_MODE_SHARE: // Default chamilo behaviour // Student can upload his own content, cannot modify another content. - $isMember = GroupManager::is_subscribed($userId, $groupInfo); + $isMember = self::is_subscribed($userId, $groupInfo); if ($isMember) { // No document to check, allow access to document feature. if (empty($documentInfoToBeCheck)) { From 6e36fbcd2ca533e18053e8bfb1fc21290ae9ba17 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Wed, 20 Mar 2019 12:41:22 +0100 Subject: [PATCH 09/15] Use bccomp to compare float requires php-bcmath extension BT#15438 --- main/exercise/exercise_show.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/main/exercise/exercise_show.php b/main/exercise/exercise_show.php index da02bc94d6..b2bb7b7179 100755 --- a/main/exercise/exercise_show.php +++ b/main/exercise/exercise_show.php @@ -910,13 +910,18 @@ foreach ($questionList as $questionId) { $score = []; if ($show_results) { + $scorePassed = $my_total_score >= $my_total_weight; + if (function_exists('bccomp')) { + $compareResult = bccomp($my_total_score, $my_total_weight, 3); + $scorePassed = $compareResult === 1 || $compareResult === 0; + } $score['result'] = ExerciseLib::show_score( $my_total_score, $my_total_weight, false, false ); - $score['pass'] = $my_total_score >= $my_total_weight ? true : false; + $score['pass'] = $scorePassed; $score['type'] = $answerType; $score['score'] = $my_total_score; $score['weight'] = $my_total_weight; From 57f18d1613fd1aedd32d2efff7e7808c5d0c0718 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Wed, 20 Mar 2019 12:56:58 +0100 Subject: [PATCH 10/15] Minor - Fix missing $hideGeoLocalizationDetails variable --- main/inc/lib/extra_field.lib.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main/inc/lib/extra_field.lib.php b/main/inc/lib/extra_field.lib.php index d83ee253fe..b4303ececc 100755 --- a/main/inc/lib/extra_field.lib.php +++ b/main/inc/lib/extra_field.lib.php @@ -1771,7 +1771,8 @@ class ExtraField extends Model $form->addGeoLocationMapField( 'extra_'.$field_details['variable'], $field_details['display_text'], - $dataValue + $dataValue, + $hideGeoLocalizationDetails ); /*$form->addElement( From 7c93e972321d371541382a3adbc342f9faff8a48 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Wed, 20 Mar 2019 14:33:26 +0100 Subject: [PATCH 11/15] Add new "result disable" option in exercises "Show only correct answer" BT#15233 --- main/exercise/exercise.class.php | 69 +++---- main/exercise/fill_blanks.class.php | 6 + main/exercise/hotspot_answers.as.php | 30 ++- main/exercise/overview.php | 9 +- main/exercise/question.class.php | 14 +- main/inc/lib/exercise.lib.php | 4 + main/inc/lib/exercise_show_functions.lib.php | 176 +++++++++--------- main/inc/lib/javascript/hotspot/js/hotspot.js | 8 +- 8 files changed, 165 insertions(+), 151 deletions(-) diff --git a/main/exercise/exercise.class.php b/main/exercise/exercise.class.php index 5222010650..d496bde466 100755 --- a/main/exercise/exercise.class.php +++ b/main/exercise/exercise.class.php @@ -3537,8 +3537,10 @@ class Exercise if (!empty($studentChoice)) { if ($studentChoice == $answerCorrect) { // correct answer and student is Unsure or PrettySur - if ($quiz_question_options[$studentChoiceDegree]['position'] >= 3 - && $quiz_question_options[$studentChoiceDegree]['position'] < 9) { + if (isset($quiz_question_options[$studentChoiceDegree]) && + $quiz_question_options[$studentChoiceDegree]['position'] >= 3 && + $quiz_question_options[$studentChoiceDegree]['position'] < 9 + ) { $questionScore += $true_score; } else { // student ignore correct answer @@ -3629,21 +3631,15 @@ class Exercise } $studentChoice = isset($choice[$answerAutoId]) ? $choice[$answerAutoId] : ''; + $real_answers[$answerId] = false; if ($answerCorrect == $studentChoice) { - //$answerCorrect = 1; $real_answers[$answerId] = true; - } else { - //$answerCorrect = 0; - $real_answers[$answerId] = false; } } else { $studentChoice = isset($choice[$answerAutoId]) ? $choice[$answerAutoId] : ''; + $real_answers[$answerId] = false; if ($answerCorrect == $studentChoice) { - //$answerCorrect = 1; $real_answers[$answerId] = true; - } else { - //$answerCorrect = 0; - $real_answers[$answerId] = false; } } break; @@ -3659,31 +3655,27 @@ class Exercise $studentChoice = isset($choice[$answerAutoId]) ? $choice[$answerAutoId] : null; if ($answerCorrect == 1) { + $real_answers[$answerId] = false; if ($studentChoice) { $real_answers[$answerId] = true; - } else { - $real_answers[$answerId] = false; } } else { + $real_answers[$answerId] = true; if ($studentChoice) { $real_answers[$answerId] = false; - } else { - $real_answers[$answerId] = true; } } } else { $studentChoice = isset($choice[$answerAutoId]) ? $choice[$answerAutoId] : null; if ($answerCorrect == 1) { + $real_answers[$answerId] = false; if ($studentChoice) { $real_answers[$answerId] = true; - } else { - $real_answers[$answerId] = false; } } else { + $real_answers[$answerId] = true; if ($studentChoice) { $real_answers[$answerId] = false; - } else { - $real_answers[$answerId] = true; } } } @@ -4283,6 +4275,12 @@ class Exercise } } + if ($results_disabled == RESULT_DISABLE_SHOW_ONLY_IN_CORRECT_ANSWER) { + if ($s_user_answer != $i_answer_correct_answer) { + continue; + } + } + if ($show_result) { if ($this->showExpectedChoice() == false && $showTotalScoreAndUserChoicesInLastAttempt === false @@ -4901,6 +4899,7 @@ class Exercise if ($debug) { error_log('Showing questions $from '.$from); } + switch ($answerType) { case UNIQUE_ANSWER: case UNIQUE_ANSWER_IMAGE: @@ -5097,26 +5096,6 @@ class Exercise case HOT_SPOT_DELINEATION: $user_answer = $user_array; if ($next) { - //$tbl_track_e_hotspot = Database::get_main_table(TABLE_STATISTIC_TRACK_E_HOTSPOT); - // Save into db - /* $sql = "INSERT INTO $tbl_track_e_hotspot ( - * hotspot_user_id, - * hotspot_course_code, - * hotspot_exe_id, - * hotspot_question_id, - * hotspot_answer_id, - * hotspot_correct, - * hotspot_coordinate - * ) - VALUES ( - * '".Database::escape_string($_user['user_id'])."', - * '".Database::escape_string($_course['id'])."', - * '".Database::escape_string($exeId)."', '".Database::escape_string($questionId)."', - * '".Database::escape_string($answerId)."', - * '".Database::escape_string($studentChoice)."', - * '".Database::escape_string($user_array)."')"; - $result = Database::query($sql,__FILE__,__LINE__); - */ $user_answer = $user_array; // we compare only the delineation not the other points $answer_question = $_SESSION['hotspot_coord'][1]; @@ -5266,7 +5245,6 @@ class Exercise ) ); echo ''; - break; case ANNOTATION: ExerciseShowFunctions::displayAnnotationAnswer( @@ -5578,16 +5556,17 @@ class Exercise ) { if ($choice != 0) { $reply = array_keys($choice); - for ($i = 0; $i < sizeof($reply); $i++) { + $countReply = count($reply); + for ($i = 0; $i < $countReply; $i++) { $chosenAnswer = $reply[$i]; if ($answerType == MULTIPLE_ANSWER_TRUE_FALSE_DEGREE_CERTAINTY) { if ($choiceDegreeCertainty != 0) { $replyDegreeCertainty = array_keys($choiceDegreeCertainty); - $answerDegreeCertainty = $replyDegreeCertainty[$i]; + $answerDegreeCertainty = isset($replyDegreeCertainty[$i]) ? $replyDegreeCertainty[$i] : ''; + $answerValue = isset($choiceDegreeCertainty[$answerDegreeCertainty]) ? $choiceDegreeCertainty[$answerDegreeCertainty] : ''; Event::saveQuestionAttempt( $questionScore, - $chosenAnswer.':'.$choice[$chosenAnswer].':'. - $choiceDegreeCertainty[$answerDegreeCertainty], + $chosenAnswer.':'.$choice[$chosenAnswer].':'.$answerValue, $quesId, $exeId, $i, @@ -8403,14 +8382,14 @@ class Exercise ['id' => 'result_disabled_6'] ); - /*$resultDisabledGroup[] = $form->createElement( + $resultDisabledGroup[] = $form->createElement( 'radio', 'results_disabled', null, get_lang('ExerciseShowOnlyCorrectAnswer'), '7', ['id' => 'result_disabled_7'] - );*/ + ); $group = $form->addGroup( $resultDisabledGroup, diff --git a/main/exercise/fill_blanks.class.php b/main/exercise/fill_blanks.class.php index a81fef5e38..4bbfa557db 100755 --- a/main/exercise/fill_blanks.class.php +++ b/main/exercise/fill_blanks.class.php @@ -1231,6 +1231,12 @@ class FillBlanks extends Question // rebuild the sentence with student answer inserted for ($i = 0; $i < count($listStudentAnswerInfo['common_words']); $i++) { + if ($resultsDisabled == RESULT_DISABLE_SHOW_ONLY_IN_CORRECT_ANSWER) { + if (isset($listStudentAnswerInfo['student_score'][$i]) && + $listStudentAnswerInfo['student_score'][$i] != 1) { + continue; + } + } $result .= isset($listStudentAnswerInfo['common_words'][$i]) ? $listStudentAnswerInfo['common_words'][$i] : ''; $result .= isset($listStudentAnswerInfo['student_answer'][$i]) ? $listStudentAnswerInfo['student_answer'][$i] : ''; } diff --git a/main/exercise/hotspot_answers.as.php b/main/exercise/hotspot_answers.as.php index 49fa3d761c..c9efc95b72 100755 --- a/main/exercise/hotspot_answers.as.php +++ b/main/exercise/hotspot_answers.as.php @@ -163,8 +163,36 @@ if (!$hideExpectedAnswer) { /** @var CQuizAnswer $hotSpotAnswer */ foreach ($result as $hotSpotAnswer) { + $hotSpotAnswerId = $hotSpotAnswer->getIid(); + + // Show only correct hotspots + if ($objExercise->selectResultsDisabled() == RESULT_DISABLE_SHOW_ONLY_IN_CORRECT_ANSWER) { + $TBL_TRACK_HOTSPOT = Database::get_main_table(TABLE_STATISTIC_TRACK_E_HOTSPOT); + // Check auto id + $sql = "SELECT hotspot_correct + FROM $TBL_TRACK_HOTSPOT + WHERE + hotspot_exe_id = $exeId AND + hotspot_question_id= $questionId AND + hotspot_answer_id = ".$hotSpotAnswerId." + ORDER BY hotspot_id ASC"; + $result = Database::query($sql); + $studentChoice = false; + if (Database::num_rows($result)) { + $studentChoice = Database::result( + $result, + 0, + 'hotspot_correct' + ); + } + + if (!$studentChoice) { + continue; + } + } + $hotSpot = []; - $hotSpot['id'] = $hotSpotAnswer->getIid(); + $hotSpot['id'] = $hotSpotAnswerId; $hotSpot['answer'] = $hotSpotAnswer->getAnswer(); switch ($hotSpotAnswer->getHotspotType()) { diff --git a/main/exercise/overview.php b/main/exercise/overview.php index 9c86dcc9ba..4028bf2c7b 100755 --- a/main/exercise/overview.php +++ b/main/exercise/overview.php @@ -52,7 +52,7 @@ $interbreadcrumb[] = [ 'url' => 'exercise.php?'.api_get_cidreq(), 'name' => get_lang('Exercises'), ]; -$interbreadcrumb[] = ["url" => "#", "name" => $objExercise->selectTitle(true)]; +$interbreadcrumb[] = ['url' => '#', 'name' => $objExercise->selectTitle(true)]; $time_control = false; $clock_expired_time = ExerciseLib::get_session_time_control_key($objExercise->id, $learnpath_id, $learnpath_item_id); @@ -210,10 +210,7 @@ if (in_array( if (!empty($attempts)) { $i = $counter; foreach ($attempts as $attempt_result) { - $score = ExerciseLib::show_score( - $attempt_result['exe_result'], - $attempt_result['exe_weighting'] - ); + $score = ExerciseLib::show_score($attempt_result['exe_result'], $attempt_result['exe_weighting']); $attempt_url = api_get_path(WEB_CODE_PATH).'exercise/result.php?'; $attempt_url .= api_get_cidreq().'&show_headers=1&'; $attempt_url .= http_build_query([ @@ -254,6 +251,7 @@ if (!empty($attempts)) { RESULT_DISABLE_SHOW_SCORE_ATTEMPT_SHOW_ANSWERS_LAST_ATTEMPT, RESULT_DISABLE_DONT_SHOW_SCORE_ONLY_IF_USER_FINISHES_ATTEMPTS_SHOW_ALWAYS_FEEDBACK, RESULT_DISABLE_RANKING, + RESULT_DISABLE_SHOW_ONLY_IN_CORRECT_ANSWER ] )) { $row['result'] = $score; @@ -267,6 +265,7 @@ if (!empty($attempts)) { RESULT_DISABLE_SHOW_SCORE_ATTEMPT_SHOW_ANSWERS_LAST_ATTEMPT, RESULT_DISABLE_DONT_SHOW_SCORE_ONLY_IF_USER_FINISHES_ATTEMPTS_SHOW_ALWAYS_FEEDBACK, RESULT_DISABLE_RANKING, + RESULT_DISABLE_SHOW_ONLY_IN_CORRECT_ANSWER ] ) || ( $objExercise->results_disabled == RESULT_DISABLE_SHOW_SCORE_ONLY && diff --git a/main/exercise/question.class.php b/main/exercise/question.class.php index 5ee0addd66..7780319d24 100755 --- a/main/exercise/question.class.php +++ b/main/exercise/question.class.php @@ -1980,20 +1980,20 @@ abstract class Question if (!empty($counter)) { $counterLabel = (int) $counter; } - $score_label = get_lang('Wrong'); + $scoreLabel = get_lang('Wrong'); $class = 'error'; if (isset($score['pass']) && $score['pass'] == true) { - $score_label = get_lang('Correct'); + $scoreLabel = get_lang('Correct'); $class = 'success'; } if (in_array($this->type, [FREE_ANSWER, ORAL_EXPRESSION, ANNOTATION])) { $score['revised'] = isset($score['revised']) ? $score['revised'] : false; if ($score['revised'] == true) { - $score_label = get_lang('Revised'); + $scoreLabel = get_lang('Revised'); $class = ''; } else { - $score_label = get_lang('NotRevised'); + $scoreLabel = get_lang('NotRevised'); $class = 'warning'; if (isset($score['weight'])) { $weight = float_format($score['weight'], 1); @@ -2029,7 +2029,10 @@ abstract class Question // dont display score for certainty degree questions if ($this->type != MULTIPLE_ANSWER_TRUE_FALSE_DEGREE_CERTAINTY) { if (isset($score['result'])) { - $header .= $exercise->getQuestionRibbon($class, $score_label, $score['result'], $scoreCurrent); + if ($exercise->results_disabled == RESULT_DISABLE_SHOW_ONLY_IN_CORRECT_ANSWER) { + $score['result'] = null; + } + $header .= $exercise->getQuestionRibbon($class, $scoreLabel, $score['result'], $scoreCurrent); } } @@ -2070,6 +2073,7 @@ abstract class Question } /** + * @deprecated * Create a question from a set of parameters. * * @param int Quiz ID diff --git a/main/inc/lib/exercise.lib.php b/main/inc/lib/exercise.lib.php index cafc89adad..dae9f9dab9 100644 --- a/main/inc/lib/exercise.lib.php +++ b/main/inc/lib/exercise.lib.php @@ -4429,6 +4429,10 @@ EOT; $show_results = true; } + if ($objExercise->results_disabled == RESULT_DISABLE_SHOW_ONLY_IN_CORRECT_ANSWER) { + $show_results = true; + } + if (in_array( $objExercise->results_disabled, [ diff --git a/main/inc/lib/exercise_show_functions.lib.php b/main/inc/lib/exercise_show_functions.lib.php index 2dbade118e..d31127fec4 100755 --- a/main/inc/lib/exercise_show_functions.lib.php +++ b/main/inc/lib/exercise_show_functions.lib.php @@ -57,11 +57,6 @@ class ExerciseShowFunctions echo ''; echo Security::remove_XSS($answerHTML, COURSEMANAGERLOWSECURITY); echo ''; - if (!api_is_allowed_to_edit(null, true) && $feedbackType != EXERCISE_FEEDBACK_TYPE_EXAM) { - echo ''; - $comm = Event::get_comments($id, $questionId); - echo ''; - } echo ''; } } @@ -103,11 +98,6 @@ class ExerciseShowFunctions echo ''; echo Security::remove_XSS($status); echo ''; - if (!api_is_allowed_to_edit(null, true) && $feedback_type != EXERCISE_FEEDBACK_TYPE_EXAM) { - echo ''; - $comm = Event::get_comments($id, $questionId); - echo ''; - } echo ''; } } else { @@ -116,11 +106,6 @@ class ExerciseShowFunctions } else { echo ''; echo Security::remove_XSS($answer); - if (!api_is_allowed_to_edit(null, true) && $feedback_type != EXERCISE_FEEDBACK_TYPE_EXAM) { - echo ''; - $comm = Event::get_comments($id, $questionId); - echo ''; - } echo ''; } } @@ -254,55 +239,62 @@ class ExerciseShowFunctions } $hotspot_colors = [ - "", // $i starts from 1 on next loop (ugly fix) - "#4271B5", - "#FE8E16", - "#45C7F0", - "#BCD631", - "#D63173", - "#D7D7D7", - "#90AFDD", - "#AF8640", - "#4F9242", - "#F4EB24", - "#ED2024", - "#3B3B3B", - "#F7BDE2", + '', // $i starts from 1 on next loop (ugly fix) + '#4271B5', + '#FE8E16', + '#45C7F0', + '#BCD631', + '#D63173', + '#D7D7D7', + '#90AFDD', + '#AF8640', + '#4F9242', + '#F4EB24', + '#ED2024', + '#3B3B3B', + '#F7BDE2', ]; - echo ''; - echo ''; + $content .= ''; - echo ''; - echo ''; + $content .= ''; + $content .= ''; + $content .= ''; if ($feedback_type != EXERCISE_FEEDBACK_TYPE_EXAM) { - echo ''; + $content .= ''; } else { - echo ''; + $content .= ''; } - echo ''; + $content .= ''; + + echo $content; } /** * Display the answers to a multiple choice question. * * @param Exercise $exercise - * @param int $feedback_type Feedback type + * @param int $feedbackType Feedback type * @param int $answerType Answer type * @param int $studentChoice Student choice * @param string $answer Textual answer @@ -317,7 +309,7 @@ class ExerciseShowFunctions */ public static function display_unique_or_multiple_answer( $exercise, - $feedback_type, + $feedbackType, $answerType, $studentChoice, $answer, @@ -342,15 +334,22 @@ class ExerciseShowFunctions $answer = str_replace($tags, '', $answer); } + $studentChoiceInt = (int) $studentChoice; + $answerCorrectChoice = (int) $answerCorrect; + $hide_expected_answer = false; switch ($resultsDisabled) { case RESULT_DISABLE_SHOW_ONLY_IN_CORRECT_ANSWER: + if ($studentChoiceInt !== $answerCorrectChoice) { + return ''; + } + if (!$answerCorrect) { - $hide_expected_answer = true; + return ''; } break; case RESULT_DISABLE_SHOW_SCORE_ONLY: - if ($feedback_type == 0) { + if ($feedbackType == 0) { $hide_expected_answer = true; } break; @@ -384,14 +383,8 @@ class ExerciseShowFunctions echo ''; if ($exercise->showExpectedChoice()) { - /*$status = Display::label(get_lang('Incorrect'), 'danger'); - if ($studentChoice && $answerCorrect) { - $status = Display::label(get_lang('Correct'), 'success'); - }*/ - $studentChoiceChoice = (int) $studentChoice; - $answerCorrectChoice = (int) $answerCorrect; $status = Display::label(get_lang('Incorrect'), 'danger'); - if ($studentChoiceChoice === $answerCorrectChoice) { + if ($studentChoiceInt === $answerCorrectChoice) { $status = Display::label(get_lang('Correct'), 'success'); } echo ''; } - if ($feedback_type != EXERCISE_FEEDBACK_TYPE_EXAM) { + if ($feedbackType != EXERCISE_FEEDBACK_TYPE_EXAM) { echo ''; + $content .= ''; if ($exercise->showExpectedChoice()) { $status = Display::label(get_lang('Incorrect'), 'danger'); if (isset($new_options[$studentChoice])) { @@ -501,31 +495,35 @@ class ExerciseShowFunctions $status = Display::label(get_lang('Correct'), 'success'); } } - echo ''; + $content .= ''; } - if ($feedback_type != EXERCISE_FEEDBACK_TYPE_EXAM) { - echo ''; - if ($ans == 1) { - $comm = Event::get_comments($id, $questionId); + $content .= ''.nl2br($answerComment).''; } + $content .= ''; } else { - echo ''; + $content .= ''; } - echo ''; + $content .= ''; + + echo $content; } /** @@ -582,7 +580,9 @@ class ExerciseShowFunctions echo ''; $degreeInfo = $question->getResponseDegreeInfo( @@ -628,7 +628,7 @@ class ExerciseShowFunctions */ public static function display_multiple_answer_combination_true_false( $exercise, - $feedback_type, + $feedbackType, $answerType, $studentChoice, $answer, @@ -643,7 +643,7 @@ class ExerciseShowFunctions $hide_expected_answer = false; switch ($resultsDisabled) { case RESULT_DISABLE_SHOW_SCORE_ONLY: - if ($feedback_type == 0) { + if ($feedbackType == 0) { $hide_expected_answer = true; } break; @@ -694,7 +694,7 @@ class ExerciseShowFunctions echo ''; } - if ($feedback_type != EXERCISE_FEEDBACK_TYPE_EXAM) { + if ($feedbackType != EXERCISE_FEEDBACK_TYPE_EXAM) { echo '
'; - echo '
'; + $content .= ''; - echo ''; - echo "$answerId - $answer"; - echo ''; + $content .= ''; + $content .= "$answerId - $answer"; + $content .= ''; if (!$hide_expected_answer) { $status = Display::label(get_lang('Incorrect'), 'danger'); if ($studentChoice) { $status = Display::label(get_lang('Correct'), 'success'); + } else { + if ($resultsDisabled == RESULT_DISABLE_SHOW_ONLY_IN_CORRECT_ANSWER) { + return ''; + } } - echo $status; + $content .= $status; } - echo ''; + $content .= ''; if ($studentChoice) { - echo ''.nl2br($answerComment).''; + $content .= ''.nl2br($answerComment).''; } - echo '  
'; @@ -399,7 +392,7 @@ class ExerciseShowFunctions echo ''; if ($studentChoice) { $color = 'black'; @@ -444,7 +437,7 @@ class ExerciseShowFunctions */ public static function display_multiple_answer_true_false( $exercise, - $feedback_type, + $feedbackType, $answerType, $studentChoice, $answer, @@ -459,7 +452,7 @@ class ExerciseShowFunctions $hide_expected_answer = false; switch ($resultsDisabled) { case RESULT_DISABLE_SHOW_SCORE_ONLY: - if ($feedback_type == 0) { + if ($feedbackType == 0) { $hide_expected_answer = true; } break; @@ -471,29 +464,30 @@ class ExerciseShowFunctions } break; } - echo '
'; + + $content = '
'; $course_id = api_get_course_int_id(); $new_options = Question::readQuestionOption($questionId, $course_id); // Your choice if (isset($new_options[$studentChoice])) { - echo get_lang($new_options[$studentChoice]['name']); + $content .= get_lang($new_options[$studentChoice]['name']); } else { - echo '-'; + $content .= '-'; } echo ''; // Expected choice if (!$hide_expected_answer) { if (isset($new_options[$answerCorrect])) { - echo get_lang($new_options[$answerCorrect]['name']); + $content .= get_lang($new_options[$answerCorrect]['name']); } else { - echo '-'; + $content .= '-'; } } else { - echo '-'; + $content .= '-'; } - echo ''; - echo $answer; - echo ''; + $content .= $answer; + $content .= ''; - echo $status; - echo ''; + $content .= $status; + $content .= ''; - $color = "black"; + if ($feedbackType != EXERCISE_FEEDBACK_TYPE_EXAM) { + if ($resultsDisabled == RESULT_DISABLE_SHOW_ONLY_IN_CORRECT_ANSWER) { + if ($studentChoice != $answerCorrect) { + return ''; + } + } + $content .= ''; + $color = 'black'; if (isset($new_options[$studentChoice])) { if ($studentChoice == $answerCorrect) { - $color = "green"; + $color = 'green'; } if ($hide_expected_answer) { $color = ''; } - echo ''.nl2br($answerComment).''; - } - echo '  
'; echo $answer; echo ''; - echo $newOptions[$studentChoiceDegree]['name']; + if (isset($newOptions[$studentChoiceDegree])) { + echo $newOptions[$studentChoiceDegree]['name']; + } echo ''; //@todo replace this harcoded value if ($studentChoice) { @@ -718,21 +718,21 @@ class ExerciseShowFunctions } /** - * @param $feedback_type + * @param $feedbackType * @param $exe_id * @param $questionId * @param null $questionScore * @param int $resultsDisabled */ public static function displayAnnotationAnswer( - $feedback_type, + $feedbackType, $exe_id, $questionId, $questionScore = null, $resultsDisabled = 0 ) { $comments = Event::get_comments($exe_id, $questionId); - if ($feedback_type != EXERCISE_FEEDBACK_TYPE_EXAM) { + if ($feedbackType != EXERCISE_FEEDBACK_TYPE_EXAM) { if ($questionScore <= 0 && empty($comments)) { echo '
'.ExerciseLib::getNotCorrectedYetText(); } diff --git a/main/inc/lib/javascript/hotspot/js/hotspot.js b/main/inc/lib/javascript/hotspot/js/hotspot.js index e64c80efc2..09d2e55312 100755 --- a/main/inc/lib/javascript/hotspot/js/hotspot.js +++ b/main/inc/lib/javascript/hotspot/js/hotspot.js @@ -764,11 +764,9 @@ window.HotspotQuestion = (function () { default: hotspot = SquareModel.decode(hotspotInfo); break; - case 'circle': hotspot = EllipseModel.decode(hotspotInfo); break; - case 'poly': hotspot = PolygonModel.decode(hotspotInfo); break; @@ -891,9 +889,7 @@ window.HotspotQuestion = (function () { }) .on('mousedown', 'circle, text', function (e) { e.preventDefault(); - isMoving = true; - if (e.target.tagName === 'circle') { //Hack to move correctly the hot spots if there are more than one HS question in same page answerIndex = $(e.target).next().html(); @@ -1141,16 +1137,14 @@ window.HotspotQuestion = (function () { modifyAnswers: parseInt(config.questionId) }); break; - case 'user': xhrQuestion = $.getJSON(config.relPath + 'exercise/hotspot_actionscript.as.php?' + _p.web_cid_query, { modifyAnswers: parseInt(config.questionId), exe_id: parseInt(config.exerciseId) }); break; - case 'solution': - //no break + //no break case 'preview': xhrQuestion = $.getJSON(config.relPath + 'exercise/hotspot_answers.as.php?' + _p.web_cid_query, { modifyAnswers: parseInt(config.questionId), From 53fa359966f655e0579795e9420a52b37d72c486 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Wed, 20 Mar 2019 15:59:59 +0100 Subject: [PATCH 12/15] Use responsive css class, fixes big images in social posts #2854 --- main/inc/lib/social.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/inc/lib/social.lib.php b/main/inc/lib/social.lib.php index 92baa58487..bef4f6c391 100755 --- a/main/inc/lib/social.lib.php +++ b/main/inc/lib/social.lib.php @@ -3172,7 +3172,7 @@ class SocialManager extends UserManager $html .= '
'.$date.'
'; $html .= ''; $html .= '
'; - $html .= '
'; + $html .= '
'; $html .= $postAttachment; $html .= '
'; $html .= '
'.Security::remove_XSS($message['content']).'
'; From 982038650261a1ab22fcf98513d672bc232920b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Arag=C3=B3n?= Date: Wed, 20 Mar 2019 10:07:26 -0500 Subject: [PATCH 13/15] add responsive css in img social post -rest #2854 --- app/Resources/public/css/base.css | 9 ++++++++- main/inc/lib/display.lib.php | 2 +- main/inc/lib/social.lib.php | 12 ++++++++---- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/app/Resources/public/css/base.css b/app/Resources/public/css/base.css index 183b3c17f3..b7eed4601e 100644 --- a/app/Resources/public/css/base.css +++ b/app/Resources/public/css/base.css @@ -8450,6 +8450,9 @@ ul#toolnavbox-two li a.btn { border-color: #dd853d; color: #ffffff; } +.btn-post{ + margin-top: 10px; +} .checkbox input[type=checkbox], .checkbox-inline input[type=checkbox], .radio input[type=radio], @@ -9728,8 +9731,12 @@ ul.dropdown-menu.inner > li > a { .post-attachment { text-align: center; + margin-bottom: 10px; +} +.post-date{ + display: inline-block; + width: 100%; } - /* Fix grid with one row and multiples columns. Works for .col-sm-6.col-md-4.col-lg-3 */ .row.clear-rows-6-4-3 { diff --git a/main/inc/lib/display.lib.php b/main/inc/lib/display.lib.php index b5ba337cb2..44c75d2396 100755 --- a/main/inc/lib/display.lib.php +++ b/main/inc/lib/display.lib.php @@ -2786,7 +2786,7 @@ HTML; case 'jpeg': case 'gif': case 'png': - $content = ''; + $content = ''; break; default: //$html = self::url($data['basename'], $fileUrl); diff --git a/main/inc/lib/social.lib.php b/main/inc/lib/social.lib.php index 92baa58487..50bde44853 100755 --- a/main/inc/lib/social.lib.php +++ b/main/inc/lib/social.lib.php @@ -1826,13 +1826,17 @@ class SocialManager extends UserManager $formattedList .= '
'; $formattedList .= '
'; - $formattedList .= '
+ $formattedList .= ' +
- - + +
+
'; $formattedList .= '
'; @@ -3169,7 +3173,7 @@ class SocialManager extends UserManager $html .= '
'; $html .= $iconStatus; $html .= '
'.$nameCompleteAuthor.''.$htmlReceiver.'
'; - $html .= '
'.$date.'
'; + $html .= ''; $html .= '
'; $html .= '
'; $html .= '
'; From bc97795e833789986522340228a7ca8ba41b74cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Arag=C3=B3n?= Date: Wed, 20 Mar 2019 10:29:41 -0500 Subject: [PATCH 14/15] update css btn geolocazation - refs BT#15312 --- app/Resources/public/css/base.css | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/Resources/public/css/base.css b/app/Resources/public/css/base.css index b7eed4601e..3c5c49c69c 100644 --- a/app/Resources/public/css/base.css +++ b/app/Resources/public/css/base.css @@ -9719,14 +9719,15 @@ ul.dropdown-menu.inner > li > a { .btn-maps { border-radius: 5px; - border-color: #6d9b00; - background-color: #f8ffdd; + border-color: #cccccc; + background-color: #ffffff; + color: #7a7a7a; } .btn-maps:hover { - background-color: #d4e9ff !important; - color: #0b3e6f; - border-color: #75a9e0; + background-color: #f5f6f7 !important; + color: #7a7a7a; + border-color: #bababa; } .post-attachment { From fe1f86ed49839b90d27fb7ab6f1011db06006dc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Arag=C3=B3n?= Date: Wed, 20 Mar 2019 12:01:08 -0500 Subject: [PATCH 15/15] fix rtl --- app/Resources/public/css/base.css | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Resources/public/css/base.css b/app/Resources/public/css/base.css index 3c5c49c69c..e7a68af3dd 100644 --- a/app/Resources/public/css/base.css +++ b/app/Resources/public/css/base.css @@ -8453,10 +8453,10 @@ ul#toolnavbox-two li a.btn { .btn-post{ margin-top: 10px; } -.checkbox input[type=checkbox], -.checkbox-inline input[type=checkbox], -.radio input[type=radio], -.radio-inline input[type=radio]{ +main[dir="rtl"] .checkbox input[type=checkbox], +main[dir="rtl"] .checkbox-inline input[type=checkbox], +main[dir="rtl"] .radio input[type=radio], +main[dir="rtl"] .radio-inline input[type=radio]{ position: relative; margin-left: 10px; }