Integer underflow in Solar System activity
Closed, ResolvedPublic

Description

There is a minor occurance of an integer underflow in the Solar System activity in https://gcompris.net/download/qt/linux/beta/gcompris-qt-1.0-beta-Linux64.sh.

Steps to reproduce:

  1. Open the Solar System activity
  2. Click on an object in the solar system (the sun or a planet)
  3. Observe that the current level is 1
  4. Click the left button

Expected behavior:
In every other activity I have played, there is a fixed number of levels per activity. Suppose that number is n. Then clicking the left button while at level 1 goes to level n.

Actual behavior:
Here is what actually happens after step 4 when clicking on the sun in step 2.

At this point, clicking left or right does not change the level number.

Further observations:
I am unsure that the intended behavior is suppose to be for these left and right buttons in this activity. There doesn't seem to be a maximum "level" number for this activity. Instead, there seems to be a fixed number of questions (for the selected solar system object) and clicking left or right selects one of the questions uniformly at random. In particular, it is possible to be looking at some question Q, click right, and be presented with question Q again.

Also, sometimes clicking left or right causes the buttons to "bounce up" from a single point below the bottom of the screen like then do after step 2. And sometimes they don't. I don't understand why this behavior differs. I expected that the only time the buttons would do this bouncing move is after step 2 and never after clicking the left or right buttons.

jjazeix claimed this task.Sep 16 2020, 4:24 PM
jjazeix added a subscriber: jjazeix.

Thank you

Bouncing is due to the fact that we add/remove the "Hint" for some questions. It is clearly not the best, maybe we can have some exception for the bouncing (only have it on some cases)

Are there logs in the console? I'm trying to reproduce but can't for now

Nothing is printed to the console because of step 4. What happens when you do step 4?

Ok, I just managed to reproduce. Configuration file needs to be empty!

Nothing is printed to the console because of step 4. What happens when you do step 4?

It was going to level 2

jjazeix moved this task from Backlog to Done on the GCompris: Bugs board.Sep 16 2020, 4:58 PM
jjazeix closed this task as Resolved.

It's fixed: https://invent.kde.org/education/gcompris/-/commit/e2a4dfde847dbf587f86bc0ae45c223857a090c4

It was an initialisation issue of the variable when we run for the first time the activity and never save its configuration.

Thank you!

Thank you for fixing it! :)

When I see a new version, I will test.

I am unsure that the intended behavior is suppose to be for these left and right buttons in this activity.
There doesn't seem to be a maximum "level" number for this activity. Instead, there seems to be a fixed number of questions (for the selected solar system object) and clicking left or right selects one of the questions uniformly at random. In particular, it is possible to be looking at some question Q, click right, and be presented with question Q again.

I missed the question... Regarding the levels, there are 2 modes: learning mode and assessment mode.
In learning mode, there are 2 levels, each containing 5 sublevels (different questions about the planet). Questions are the same, but in one case we display the planet image, in the other one, we don't.
@echarruau was there a reason to have twice the questions? Maybe to repeat the process? I may have missed something.

In assessment mode, we can't change the level. The aim is to answer all the questions. If you give a bad answer, we add it back to the end of the list of questions to ask and we add a new one (there is a limit)

Thanks for that explanation. I will test that activity to double check that behavior after a version with your fix is released.

Hi,
Level1 (with image):
We have twice the questions because some pupils have a visual memory and can, from the image proposed, remember where the planet is located in the planets row.
From this location, pupils that have understood that furthur you are from the sun longer is a year, colder it is, the one that have in mind that except for mars the size of the planets follows a regular increase and decrease size can deduct some of the answers from the facts known about earth (365 days, -30 to 50 degrees, 24 hours etc...).
I would say that the image level is the deduction level.
Image 2 (without image):
Here pupils test what they memorised.

Problem:
I see what you mean, this seems very redondant.

Solution:
What would make sens would be to have a different way of working in this second phase (level 2). If the answer is wrong, clearly saying that it is wrong before the next question and once the 7 questions are given, do a quick recap, if wrong, of what was answered and what should have been the answer.

String freeze:
As we are in string freeze I would simply propose for the time being to get rid of the second level (too redondant), but I would open a ticket to improve solar system this way.

Reload button:
I agree with Williams on soal system, a reload button would be cool :)

Bouncing is due to the fact that we add/remove the "Hint" for some questions. It is clearly not the best, maybe we can have some exception for the bouncing (only have it on some cases)

I don't think it's really a problem to have the bouncing here, as it gives a clear visual feedback that the bar has changed/has the hint button in it.

Reload button:
I agree with Williams on soal system, a reload button would be cool :)

Like I explained in T13632 , I prefer that we only add reload/restart button when it is really necessary/useful to use the activity.

Here I think it would be a bit redundant as it's already easy to restart a part of the activity in learning mode... (going back to the planets list and click a planet). And in assessment mode, I am not sure it would be relevant to have it.

String freeze:
As we are in string freeze I would simply propose for the time being to get rid of the second level (too redondant), but I would open a ticket to improve solar system this way.

For this I agree, we can probably just remove the second level for now, and work on it later for next release to add what you suggested.

The left and right level buttons now work correctly. I also understand the bouncy behavior of the buttons and how the activity works as a whole.

Thanks for the explanations and good work on this fix.