Selections correct, shows as False

Hi Alex, noticed a strange occurrence. Though selections are correct, App displays otherwise. Take a look at the pictures (setup on Moodle & display on Oppia).


Kindly let me know what I should be doing please.
Thank you.
Isaac

Hi @isaacwilliams ,

I’m pretty sure this to do with a rounding error when (especially 1/3s, eg 33.3%) the scores for each question and response are getting converted back and forth in the code, so I’ll need to dig deeper into exactly when/where this is occurring in the code.

However, for now, I realised that for now, if in Moodle you update the max mark per question to be 100 (instead of the 33.3 that it was before), they the question gets marked as correct when the correct answers are selected.

For the Moodle part, it’s on the quiz edit page:

Screenshot from 2021-07-27 19-42-43

Then in the app, I can now get the answer correct (note I did change the answer options on my local server, as was much easier than me trying to the Oromo!):

Note that you should change the scoring from 33.3 to 100 for all the questions, otherwise this last question will get weighted more heavily if they are split at 33.3 / 33.3 / 100.

I’ll add a tech dev task to get this fixed up properly,
Cheers,
Alex

Hi Alex, a crazy question, but do we apply this “100” rule in all Quizzes? Or does it apply just to the Quizzes that are non-English. Kindly confirm.
Isaac

Hi @isaacwilliams
For sure, it’s nothing to do with the language!
It;s more to with where there are these types of issues with the rounding and not showing the feedback/result as expected, but it should only be occurring with multiple select questions where 2 options from 3 are correct (but I’d need to check more on this)

Cheers,
Alex

Hi Alex, the issue is back. I’ve set the score to a 100, but it still shows -ve. Please see attached pics.


Kindly let me know what should be done.
Thank you
Isaac

Hi @isaacwilliams

I just had a look at this and think I know what the problem is.

It looks like the question and responses are encoded for different languages. When I look at the HTML for the question and question response options, some will use the default language “en” and some have a specific language span element for “EN-US”, see:

and:

So I think this should be solved if the (redundant) span elements are removed from the HTML.

I’ll also add a tech dev issue for this, since if there’s only one language, then it ought to default to this for the marking.

If you can give that a try and let me know if that solves the issue or not,

Cheers,
Alex

Hi Alex, Yes, you got that one!. So removing the HTML tags resolved the issue. Thanks once again.
Warm Regards.
Isaac

1 Like

So @alex, what do you think is the best approach to solve this issue: trying to catch these misplaced language <span> elements in the Moodle export block, or taking care of it during the quiz marking process in the app?
I guess the second one is more robust, as it can handle the problem and also works without the need to export the courses with these kind of issues again.

Thanks @jjoseba , yes I think best to fix in the quiz marking in the app

I’ve created a quiz with this scenario of language tags not matching the content, but I couldn’t reproduce the error… @isaacwilliams, do you still have the version of the course that was causing this issue? Could you send it to me?

Thanks!

@jjoseba looking back at the thread here, it looks like Isaac managed to solve the issue. But @isaacwilliams please let us know if this is/isn’t the case. Thanks!

Hi @alex, yes based on your advice given to remove “EN” tags, well, that resolved the issue.

But, @jjoseba, (sorry for the delayed response). If you’d like me to reproduce the issue for your testing, I’ll create one for you. Do let me know.

Isaac