numerical question in lesson - decimal fractions problem

numerical question in lesson - decimal fractions problem

ដោយ Przemyslaw Stencel នៅ
ចំនួនតប៖ 10

I'm having a problem with decimal fractions in a numerical question in the lesson module. In Poland, we write fractions with commas, rather than dots. So, instead of 0.5 we write 0,5. However, fractions written with commas are not interpreted as fractions. Is there a way to "tell" Moodle that it should treat 0,5 as a fraction?

មធ្យមភាគនៃរង្វាយតម្លៃ: -
ឆ្លើយតបទៅកាន់ Przemyslaw Stencel

Re: numerical question in lesson - decimal fractions problem

ដោយ Tim Hunt នៅ
រូបភាព Core developers រូបភាព Documentation writers រូបភាព Particularly helpful Moodlers រូបភាព Peer reviewers រូបភាព Plugin developers

This should just work, and if it does not, it is a bug because UK/US/Aus developers did not consider it. The some of the corresponding bugs in the quiz only got fixed recently.

មធ្យមភាគនៃរង្វាយតម្លៃ: -
ឆ្លើយតបទៅកាន់ Przemyslaw Stencel

Re: numerical question in lesson - decimal fractions problem

ដោយ Joseph Rézeau នៅ
រូបភាព Core developers រូបភាព Particularly helpful Moodlers រូបភាព Plugin developers រូបភាព Testers រូបភាព Translators

Please post here the complete text and answers of your numerical question.

Which version of Moodle?

Joseph

មធ្យមភាគនៃរង្វាយតម្លៃ: -
ឆ្លើយតបទៅកាន់ Joseph Rézeau

Re: numerical question in lesson - decimal fractions problem

ដោយ Przemyslaw Stencel នៅ

I'm attaching a screenshot with the text of the question and answer.

Moodle version is 2.3.2 (Build: 20120910)

ឯកសារភ្ជាប់ 2012-09-30_234943.png
មធ្យមភាគនៃរង្វាយតម្លៃ: -
ឆ្លើយតបទៅកាន់ Przemyslaw Stencel

Re: numerical question in lesson - decimal fractions problem

ដោយ Joseph Rézeau នៅ
រូបភាព Core developers រូបភាព Particularly helpful Moodlers រូបភាព Plugin developers រូបភាព Testers រូបភាព Translators

Thanks for the screenshot, but ... in order for me to copy-paste your questions text and answers on my own moodle test site to check it out I need text, not a picture.

Joseph

មធ្យមភាគនៃរង្វាយតម្លៃ: -
ឆ្លើយតបទៅកាន់ Joseph Rézeau

Re: numerical question in lesson - decimal fractions problem

ដោយ Przemyslaw Stencel នៅ

Sorry, I should've known better មុខក្រហម

Page Title: Pytanie 1

Page contents: Przeciętne miesięczne wynagrodzenie w Polsce w 2000 roku wynosiło 1 923,81 zł, a w 2011 roku 3399,52 zł. Oblicz wskaźnik zmiany przeciętnego wynagrodzenia w Polsce w latach 2000-2011? (wynik podaj z dokładnością do 2 miejsc po przecinku)

Answer: 176,71

Feedback: To jest poprawna odpowiedź ញញឹម

The course author's intention is to only accept a precise answer (176,71), with no tolerance. However, apart from the correct answer, some other answers are accepted as well, e.g.:

  • 176
  • 176,2
  • 176,999

The feedback is always displayed like this:

Your answer : 176
To jest poprawna odpowiedź

It seems as if Moodle is ignoring anything that comes after a comma.

មធ្យមភាគនៃរង្វាយតម្លៃ: -
ឆ្លើយតបទៅកាន់ Przemyslaw Stencel

Re: numerical question in lesson - decimal fractions problem

ដោយ Joseph Rézeau នៅ
រូបភាព Core developers រូបភាព Particularly helpful Moodlers រូបភាព Plugin developers រូបភាព Testers រូបភាព Translators

OK, Przemyslaw, I could reproduce the bug.

Indeed, unlike the Quiz numerical question, the Lesson numerical question does not take into account the various countries' way of displaying the decimal separator.

I will enquire and report here.

Joseph

មធ្យមភាគនៃរង្វាយតម្លៃ: -
ឆ្លើយតបទៅកាន់ Joseph Rézeau

Re: numerical question in lesson - decimal fractions problem

ដោយ Joseph Rézeau នៅ
រូបភាព Core developers រូបភាព Particularly helpful Moodlers រូបភាព Plugin developers រូបភាព Testers រូបភាព Translators

Can you try the attached patch (against moodle 2.3, but should be the same on 2.2) on a test site?

It seems to do the trick. If reports are favourable, I'll open a bug report.

Joseph

មធ្យមភាគនៃរង្វាយតម្លៃ: -
ឆ្លើយតបទៅកាន់ Joseph Rézeau

Re: numerical question in lesson - decimal fractions problem

ដោយ Przemyslaw Stencel នៅ

Thank you. I'll test it and get back here.

Przemek

មធ្យមភាគនៃរង្វាយតម្លៃ: -
ឆ្លើយតបទៅកាន់ Joseph Rézeau

Re: numerical question in lesson - decimal fractions problem

ដោយ Patrick Juhl នៅ

Hello Joseph,

We have the same issue with our moodle installation (version 2.4.1+). Could you please tell me if you intend to introduce this patch in future versions of moodle ?

Thanks,

 

Patrick

មធ្យមភាគនៃរង្វាយតម្លៃ: -
ឆ្លើយតបទៅកាន់ Patrick Juhl

Re: numerical question in lesson - decimal fractions problem

ដោយ Joseph Rézeau នៅ
រូបភាព Core developers រូបភាព Particularly helpful Moodlers រូបភាព Plugin developers រូបភាព Testers រូបភាព Translators

@Patrick,

I was waiting for the OP to confirm that it worked... but he never replied.

I have now reported this (with a fix) as MDL-40227 for which you can vote. However, please note that I am not in a position to make changes to the Moodle core distributions, so we'll have to wait for a Moodle HQ developer to do it.

Joseph

មធ្យមភាគនៃរង្វាយតម្លៃ: -