Score Model only shows colors but not text
Dears,
I enabled Score model from "configuration.php" and used it for one of my courses.

As you can see in the picture below it worked but the color doesn't have the text/name along with it.
Current behavior: it shows only colored boxes as in the picture below:

Expected behavior: it shows the colored box with the title/name inside of it as in the picture below:

Funny you mention that: the implementation was made for a school that required us not to show a term but only to show colors, which explains why you don't see anything. I'm marking this as a feature request and I agree with the concept, but it will have to wait for the next major version because we're mostly focused on bug-fixing for now.
@christianbeeznest This has to be an option somewhere at the level of 'name' => 'ThisIsMyModel'. Something like this:
$_configuration['score_grade_model'] = [
'models' => [
[
'id' => 1,
'name' => 'ThisIsMyModel', // Value will be translated using get_lang
'display_score_name' => 0,
'score_list' => [
[
'name' => 'VeryBad', // Value will be translated using get_lang
'css_class' => 'btn-danger',
'min' => 0,
'max' => 20,
'score_to_qualify' => 0
],
Only if 'display_score_name' => 1, should we show the text for the score.
It is checked and improved with this commit https://github.com/chamilo/chamilo-lms/pull/7024/commits/89153597d5b9fd8b12daa0a246d8ea066faadeec
Execute this migration php bin/console doctrine:migrations:execute Chamilo\CoreBundle\Migrations\Schema\V200\Version20250708115900
Works well for me. @christianbeeznest please update the template for this setting to use terms that can be translated directly (not the 1.11.x syntax) in SettingsValueTemplateFixtures.php (this would require a migration also):
- ThisIsMyModel -> My score grading model
- VeryBad -> Very bad
- VeryGood -> Very good
Works well for me. @christianbeeznest please update the template for this setting to use terms that can be translated directly (not the 1.11.x syntax) in SettingsValueTemplateFixtures.php (this would require a migration also):
- ThisIsMyModel -> My score grading model
- VeryBad -> Very bad
- VeryGood -> Very good
It is checked with this commit https://github.com/chamilo/chamilo-lms/pull/7199/commits/044248307f86a8ae4fd7b05a4b22ab6ef88b0b8a
Thanks for confirmation.
Thanks. Works for me.