Chamilo-lms: erreurs utf-8

Created on 27 Jun 2017  ·  12Comments  ·  Source: chamilo/chamilo-lms

version chamilo 1.11.4
ubuntu 16.04
apache
php7

Lors de la création d'un exercice remplir les blancs j'ai utilisé le choix entre plusieurs réponses :
Je vais [a|à] la mer.
exercice a ou a

Quand l'étudiant passe l'exercice il voit cela :
a ou a
On voit que le caractère "à" ne s'affiche pas correctement et le champ est disproportionné.

De plus le score est faux :

score exercice

Ces erreurs n'étaient pas présentes sur la 1.11.2
(ça y est, j'ai retrouvé ma boussole)

Bug Requires testinvalidation

Most helpful comment

@AngelFQC can you check this one?

All 12 comments

Effectivement, je confirme l'erreur est aussi présente sur https://1.11.chamilo.org du 1juillet même sans la condition ou. Par contre les é ne présentent pas de problème.
Je ne comprend pas l'histoire de la boussole?

Je confirme l'erreur aussi.
Il est possible que l'erreur a été ajouté ici:

https://github.com/chamilo/chamilo-lms/commit/0143b2bc5e481dfd23ffcdb81fe15f6ade5fef47

@AngelFQC can you check this one?

Working on this

This happens because of this change by @AngelFQC

https://github.com/chamilo/chamilo-lms/commit/0143b2bc5e481dfd23ffcdb81fe15f6ade5fef47

I don't know why there's this trimOption there's no documentation about what it does.
There are many uses of that function. There' should be just:

trim($text);

But I'm worry if I change this probably something else won't work ... @AngelFQC ?

@jmontoyaa see https://task.beeznest.com/issues/12630 there was a bug with Fill In Blanks questions about white spaces than trim cannot clean, so trimOption clean this characters here https://github.com/chamilo/chamilo-lms/commit/0143b2bc5e481dfd23ffcdb81fe15f6ade5fef47#diff-f5bb73da6adebfabf20f5e27dd738477R564

@jmontoyaa I need you to do it. @AngelFQC is on holiday for 2 weeks.

The problem is that the "value" inside the select is a string.
It should be instead an integer, this generates other complications in the code.

selection_006

Indeed. Although if the page definition is in UTF-8, that should work... but in any case yes... we could move that to integers. Do you think you can do that this week or should I postpone to 1.11.8 (or 2.0)?

I just applied some changes. But this requires lot of tests. I tried with this text and it's working now:

Answer à [à|a|á]
Answer é [é|e|è]
Russian Ж [Ж]
Russian Ж1 [Ж1|Ж2|Ж3]
müssen [müssen]
müssen0 [müssen0|müssen1|müssen2]
Ärger [Ärger]
Ärger [Ärger|arger]

If you find an error please provide the "fill in blanks" text you're using as my example above.

Seems to be working very well for me.

test

test-correction

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ywarnier picture ywarnier  ·  3Comments

ywarnier picture ywarnier  ·  3Comments

baelmyhu picture baelmyhu  ·  3Comments

AldoAbdiel picture AldoAbdiel  ·  3Comments

bassuma picture bassuma  ·  3Comments