marinaglancy / moodle-format_flexsections

25 stars 25 forks source link

Strange behaviour course index #80

Open pjonker opened 9 months ago

pjonker commented 9 months ago

Hello Marina, we are unsing your format with great pleasure. My colleague Marcel created a video with some strange behaviour of the course index. He is talking Dutch in the video but that basically does not add any information. You can see he is moving around in the course with some strange behaviour of the focus in the Course index. Could you look at the video and let us know if you can reproduce this and subsequently fix the issue? Thanks in advance, Peter

https://github.com/marinaglancy/moodle-format_flexsections/assets/855826/d4afb04c-4c1e-4da9-8656-7eb3ee7a328b

marinaglancy commented 8 months ago

Thank you for the report. I can see why it is happening. I assume you have the 'accordion' effect enabled (so when one section is expanded others get collapsed).

When you click on the section in the course index, the section you just clicked on expands in the main view but all others collapse. The expanded section is scrolled into view. However the course is not that long and the sections in the bottom are not very big either and the section you clicked on is no longer the first section on the screen.

For example, you click on the "Aanmelden midstake", all other sections collapse and because the course and the section is not that long, the top visible section in the course view becomes "Inleverpunt low-stake".

Course index automatically highlights the top visible section on the screen. The same happens in the topics format. I just created a course with 13 empty sections and when I click on the section 13 the section number 3 is highlighted.

I guess in case of the flexsections with accordion setting, it looks more random because it looks like course index first highlights the section that was clicked, then the 'accordion effect' collapses the top sections and the course index "jumps" to seemingly random section. It is not completely random though, you can see that it is always the top most section on the screen.

In fact, I just found that it was already reported in Moodle tracker - https://tracker.moodle.org/browse/MDL-80445

pjonker commented 8 months ago

Hi Marina, thanks for your update and I also read the tracker. We will wait for any fixes.