chamilo-lms icon indicating copy to clipboard operation
chamilo-lms copied to clipboard

erreurs utf-8

Open alexiye opened this issue 9 years ago • 12 comments

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)

alexiye avatar Jun 27 '17 03:06 alexiye

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?

andreboivin avatar Jul 01 '17 13:07 andreboivin

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

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

jmontoyaa avatar Jul 07 '17 08:07 jmontoyaa

@AngelFQC can you check this one?

jmontoyaa avatar Jul 07 '17 08:07 jmontoyaa

Working on this

AngelFQC avatar Jul 17 '17 22:07 AngelFQC

To be able to ckeck rapidly if it works, I just added a test case here : https://11.chamilo.org/main/exercise/exercise_submit.php?cidReq=NICODU&id_session=0&gidReq=0&gradebook=0&origin=&exerciseId=707&learnpath_id=&learnpath_item_id=&learnpath_item_view_id=&preview=1

And for the moment it still doesn't work.

NicoDucou avatar Oct 12 '17 10:10 NicoDucou

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 avatar Dec 19 '17 12:12 jmontoyaa

@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

AngelFQC avatar Dec 19 '17 20:12 AngelFQC

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

ywarnier avatar Dec 20 '17 14:12 ywarnier

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

jmontoyaa avatar Dec 21 '17 14:12 jmontoyaa

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)?

ywarnier avatar Dec 21 '17 21:12 ywarnier

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.

jmontoyaa avatar Dec 22 '17 12:12 jmontoyaa

Seems to be working very well for me.

test

test-correction

ywarnier avatar Dec 24 '17 21:12 ywarnier