Hi, I'm trying to create a link that links to a collapsible topic and opens that topic, that is, collapses it.
My URL ends with course/view.php?id=91#section-1 but it stays uncollapsed until the user clicks on topic. How to fix this?
From Moodle 4.2 onwards you can add the expandsection=x param to force the section x to show expanded, where x is the section number which you want to show expanded, see MDL-75542. It work for topics and weeks format, other course formats however maybe have not implemented this (yet), if they have their own logic of when to show a section collapsed and when not.