Merge branch '1.11.x' of github.com:chamilo/chamilo-lms into 1.11.x

pull/3285/head
Yannick Warnier 6 years ago
commit 49ca5a5638
  1. 9
      main/inc/lib/banner.lib.php
  2. 2
      main/inc/lib/formvalidator/FormValidator.class.php
  3. 2
      main/inc/lib/statistics.lib.php
  4. 6
      main/install/configuration.dist.php
  5. 1
      main/messages/new_message.php
  6. 2
      main/work/work.lib.php
  7. 2
      plugin/bbb/listing.php
  8. 26
      tests/behat/features/toolExercise.feature

@ -165,7 +165,7 @@ function getCustomTabs()
$isStudent = api_is_student();
$cacheAvailable = api_get_configuration_value('apc');
if ($cacheAvailable === true) {
$apcVar = api_get_configuration_value('apc_prefix').'custom_tabs_url_'.$urlId.'_student_'.($isStudent?'1':'0');
$apcVar = api_get_configuration_value('apc_prefix').'custom_tabs_url_'.$urlId.'_student_'.($isStudent ? '1' : '0');
if (apcu_exists($apcVar)) {
return apcu_fetch($apcVar);
}
@ -190,9 +190,10 @@ function getCustomTabs()
}
}
if ($cacheAvailable === true) {
$apcVar = api_get_configuration_value('apc_prefix').'custom_tabs_url_'.$urlId.'_student_'.($isStudent?'1':'0');
$apcVar = api_get_configuration_value('apc_prefix').'custom_tabs_url_'.$urlId.'_student_'.($isStudent ? '1' : '0');
apcu_store($apcVar, $customTabs, 15);
}
return $customTabs;
}
@ -879,7 +880,9 @@ function return_breadcrumb($interbreadcrumb, $language_file, $nameTools)
/**
* Helper function to get the number of users online, using cache if available.
* @param integer $minutes Number of minutes (how many users were active in those last X minutes?)
*
* @param int $minutes Number of minutes (how many users were active in those last X minutes?)
*
* @return int The number of users currently online
*/
function getOnlineUsersCount($minutes = null)

@ -873,7 +873,7 @@ EOT;
/**
* @param string $name
* @param mixed $label String, or array if form element with a comment
* @param mixed $label String, or array if form element with a comment
* @param array $options
* @param array $attributes
*

@ -799,6 +799,7 @@ class Statistics
* Show some stats about the accesses to the different course tools.
*
* @param array $result If defined, this serves as data. Otherwise, will get the data from getToolsStats()
*
* @return string HTML table
*/
public static function printToolStats($result = null)
@ -806,6 +807,7 @@ class Statistics
if (empty($result)) {
$result = self::getToolsStats();
}
return self::printStats(get_lang('PlatformToolAccess'), $result, true);
}

@ -1534,6 +1534,9 @@ $_configuration['auth_password_links'] = [
// Disable clean results for teachers
// $_configuration['disable_clean_exercise_results_for_teachers'] = true;
//Allows to add increment in minutes to the date range component timepicker, example: 5,10,30 minutes
//$_configuration['timepicker_increment'] = 5;
// KEEP THIS AT THE END
// -------- Custom DB changes
// Add user activation by confirmation email
@ -1541,6 +1544,3 @@ $_configuration['auth_password_links'] = [
// You need add a new option called "confirmation" to the registration settings
//INSERT INTO settings_options (variable, value, display_text) VALUES ('allow_registration', 'confirmation', 'MailConfirmation');
// ------ (End) Custom DB changes
//Allows to add increment in minutes to the date range component timepicker, example: 5,10,30 minutes
//$_configuration['timepicker_increment'] = 5;

@ -1,7 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
/**
* This script shows a compose area (wysiwyg editor if supported, otherwise
* a simple textarea) where the user can type a message.

@ -4483,7 +4483,7 @@ function deleteAllWorkPerUser($userId, $courseInfo)
}
/**
* @param int $item_id
* @param int $item_id
* @param array $courseInfo course info
*
* @return bool

@ -140,7 +140,7 @@ if ($conferenceManager) {
$result = $bbb->regenerateRecording($result['id']);
if ($result) {
Display::addFlash(Display::return_message(get_lang('Success')));
} else {
} else {
Display::addFlash(Display::return_message(get_lang('Error'), 'error'));
}
}

@ -262,13 +262,12 @@ Feature: Exercise tool
# Question 1
Then I should see "Multiple choice"
And I check the "Answer true" radio button
And wait for the page to be loaded
Then I press "Next question"
# Question 2
And wait for the page to be loaded
# Question 2
And I check the "Answer true" radio button
And wait for the page to be loaded
Then I press "Next question"
And wait for the page to be loaded
# Question 3
Then I fill in the following:
| choice_id_3_0 | Juliet |
@ -284,37 +283,41 @@ Feature: Exercise tool
| choice_id_3_10 | cherchent à |
| choice_id_3_11 | Übung |
Then I fill in select bootstrap static by text "#choice_id_3_12" select "Ärger"
And wait for the page to be loaded
Then I press "Next question"
And wait for the page to be loaded
# Question 4 - Matching
Then I select "A" from "choice_id_4_1"
Then I select "B" from "choice_id_4_2"
Then I press "Next question"
And wait for the page to be loaded
# Question 5 - Open question
Then wait for the page to be loaded
Then I fill the only ckeditor in the page with "Hello you"
Then wait for the page to be loaded
Then I press "Next question"
And wait for the page to be loaded
# Question 6 - Oral question
Then wait for the page to be loaded
Then I press "Next question"
And wait for the page to be loaded
# Question 7 - Exact answers combination
Then I check "Answer true"
Then I press "Next question"
Then wait for the page to be loaded
And wait for the page to be loaded
# Question 8 - Unique answer with unknown
And I check the "Answer true" radio button
Then I press "Next question"
Then wait for the page to be loaded
And wait for the page to be loaded
# Question 9 - Multiple answer true - false - dont know
#@todo
Then I press "Next question"
And wait for the page to be loaded
# Question 10 - Combination true - false - don't-know
#@todo
Then I press "Next question"
And wait for the page to be loaded
# Question 11 - Global multiple answer
Then I check "Answer true"
Then I press "End test"
And wait for the page to be loaded
Then I should see "Hello you"
Then I should see "Score for the test: 83 / 117"
@ -364,22 +367,28 @@ Feature: Exercise tool
And I follow "Start test"
When wait for the page to be loaded
And I press "Next question"
And wait for the page to be loaded
And I check "oligarchy"
And I check "oligopoly"
And I check "timocracy"
And I check "autocracy"
And I press "Next question"
And wait for the page to be loaded
And I check the "semantics" radio button
And I press "Next question"
And wait for the page to be loaded
And I check the "RNASL" radio button
And I press "Next question"
And wait for the page to be loaded
And I check the "10" radio button
And I press "Next question"
And wait for the page to be loaded
And fill in the following:
| choice_id_6_0 | words |
| choice_id_6_1 | fill |
| choice_id_6_2 | blanks |
And I press "Next question"
And wait for the page to be loaded
And I select "A" from "choice_id_7_1"
And I select "B" from "choice_id_7_2"
And I select "C" from "choice_id_7_3"
@ -389,6 +398,7 @@ Feature: Exercise tool
And I press "Next question"
And wait for the page to be loaded
And I press "End test"
And wait for the page to be loaded
Then I should see "Score for the test: 190 / 190"
And I should see the table "#category_results":
| Categories | Absolute score | Relative score |

Loading…
Cancel
Save