Add new score format "exercise_score_format" see BT#15958

pull/2970/head
Julio Montoya 7 years ago
parent 54116c5c89
commit de0f6024e1
  1. 7
      main/inc/lib/exercise.lib.php
  2. 6
      main/install/configuration.dist.php

@ -2885,6 +2885,13 @@ HOTSPOT;
$html = $scoreBasedInModel;
}
// Ignore other formats and use the configuratio['exercise_score_format'] value
// But also keep the round values settings.
$format = api_get_configuration_value('exercise_score_format');
if (!empty($format)) {
$html = ScoreDisplay::instance()->display_score([ $score, $weight]);
}
$html = Display::span($html, ['class' => 'score_exercise']);
return $html;

@ -1280,6 +1280,12 @@ requires extension "php-soap" sudo apt-get install php-soap
// Allow user to enter a LP item if it was validated in another session.
// $_configuration['validate_lp_prerequisite_from_other_session'] = false;
// 1 = SCORE_AVERAGE (5 / 10)
// 2 = SCORE_PERCENT (50%)
// 3 = SCORE_DIV_PERCENT (5 / 10 (50%))
// 5 = SCORE_DECIMAL (0.5 (50%))
// $_configuration['exercise_score_format'] = 0;
// KEEP THIS AT THE END
// -------- Custom DB changes
// Add user activation by confirmation email

Loading…
Cancel
Save