Problem with Collapsed Topics in Moodle 3.2 with Boost based theme

Problem with Collapsed Topics in Moodle 3.2 with Boost based theme

'mei a Jim Judges - 'aho
Number of replies: 9

Hi,

We have noticed that with the latest collapsed topics plugin. We have installed the latest 3.2. collapsed topic plugin (3.2.1.1) but in our Boost based theme (in Moodle 3.2.2) we can't see the shortcuts folder structure in the nav tray on the left. Please see screenshot below of collapsed topic course with missing navigation and second screenshot of what we might expect and how it looks in a topic format course.

We will not be able to upgrade to 3.3 or 3.4 until next summer so a solution for 3.2 would be appreciated.

Any help or suggestions welcome.

BTW It would be great if this was an option and you could turn this navigation on or off at course level in course settings - but one step at a time!

Thanks,

Jim

pic 1 missing nav

pic with NAV



Average of ratings: -
In reply to Jim Judges

Re: Problem with Collapsed Topics in Moodle 3.2 with Boost based theme

'mei a Rick Jerz - 'aho
Picture of Particularly helpful Moodlers Picture of Testers

Jim, I was going to direct you to discussions on this other forum, but I see that you are already aware of this.

Yep, I too would like to see a switch.  The simple switch might be show/don't show.  However, if Gareth were to take this approach, I would like to see a little more flexible approach, such as "show topics when in single (target) display mode," or something like that.  This is how my moodle currently is working with Gareth's code fix.  If a student is showing all the topics, I don't see any use showing the same topics in the Nav Drawer.  But I do see it when a student has zoomed into only one topic.

I don't know if you saw my post to Gareth that his code fix is no longer working with the latest version of Moodle.  We anticipated this, as Gareth was concerned with "code fixes" that may not work in the future.

I know Gareth is a very busy person, so I hope that we can encourage him to provide a few more features to his excellent Collapsed Topics add-in.  I wish this add-in would become part of core because it provides many needed features that are not in core moodle.

Average of ratings: Useful (1)
In reply to Rick Jerz

Re: Problem with Collapsed Topics in Moodle 3.2 with Boost based theme

'mei a Gareth J Barnard - 'aho
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Thank you for your really helpful reply Rick Malimali.

What I find odd though Jim is that the M3.2 version still has:

                global $CFG;
                if (empty($CFG->linkcoursesections) && !empty($options['navigation'])) {
                    return null;
                }

and I only removed it in the M3.3 version.

I've tested M3.2 (Moodle 3.2.4+ (Build: 20170901)) with CT 3.2.1.1 and the section navigation links are there.  Are you sure you're running the M3.2 version?

In reply to Gareth J Barnard

Re: Problem with Collapsed Topics in Moodle 3.2 with Boost based theme

'mei a Rick Jerz - 'aho
Picture of Particularly helpful Moodlers Picture of Testers

Gareth, I think that your response to Jim is correct.  This is what I recall.


Here is what I can tell you about my current problem with putting that code back into Collapsed Topics.


On my production site, I have CT 3.3.1.0 and Moodle 3.3.1+ (Build: 20170810), and everything is working as expected (i.e., in single topic toggle (click on target), topics show in the Nav Drawer, and when I show all topics in the center, no topics show in the Nav Drawer. Beautiful!)

On my experimental site, I have CT 3.3.1.0 and Moodle 3.3.2 (Build: 20170911), and the added code to Collapsed Topics no longer works.  Topics are always showing in the Nav Drawer.

I can experiment more if you wish.  Hope this is helpful.  (I might try the latest Moodle, just to confirm that this CT fix doesn't work.)

In reply to Rick Jerz

Re: Problem with Collapsed Topics in Moodle 3.2 with Boost based theme

'mei a Gareth J Barnard - 'aho
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Thanks Rick,

This is quite complex as there are a few combinations!  Therefore need a clear head when I look at this.

In reply to Rick Jerz

Re: Problem with Collapsed Topics in Moodle 3.2 with Boost based theme

'mei a Gareth J Barnard - 'aho
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi Rick,

Looking at the differences in code between the two versions of Moodle you state it looks like the code I removed from CT in M3.3 (and that you now put back in) has been put back in MDL-57412 into the Topics and Weeks formats.  That being the 'return null;' logic in:

            } else {
                if (empty($CFG->linkcoursesections) && !empty($options['navigation'])) {
                    return null;
                }
                $url->set_anchor('section-'.$sectionno);
            }

therefore that is what I need to do in CT for M3.3.  I have noticed that the default for the core setting 'linkcoursesections' is 'Yes' therefore with that code then the links will show on the main course page.  So, I believe that with that patched code in CT for M3.3 that all you need to do is change 'linkcoursesections' to be unticked and CT will no longer show the links on the main course page.  Therefore for Jim in M3.2 I suspect that you need to change 'linkcoursesections' to ticked in order to get the links to show.

G

Average of ratings: Useful (1)
In reply to Gareth J Barnard

Re: Problem with Collapsed Topics in Moodle 3.2 with Boost based theme

'mei a Rick Jerz - 'aho
Picture of Particularly helpful Moodlers Picture of Testers

Okay Gareth, I will give this a try over the next day.

Thanks.

In reply to Gareth J Barnard

Re: Problem with Collapsed Topics in Moodle 3.2 with Boost based theme

'mei a Rick Jerz - 'aho
Picture of Particularly helpful Moodlers Picture of Testers

Gareth, I want to let you know that all is well! (Both my experimental and production moodles are now current.)

Yes, flipping the switch on "linkcoursesections" fixed the problem.  I think that I saw that the default in moodle core went from normally off to normally on.  I turned it off as you suggested - worked!

I still add your suggested code to my lib.php within Collapsed Topics.

I still hope that eventually you find the time and place to add this code change to your CT code.  If you add a new switch, maybe it should be called "Only show NavDrawer topics in View Only Topic mode" with the default being "No" in order to match Moodle's default behavior.

Yep, I know this is complex coding because one needs to consider those using various core themes, like boost or more, and your own themes.  Let me know if you ever want me to test any of this.  I know what you mean about needing a clear head, really complex "combinations."

Jim, hope that some of this makes sense to you.

In reply to Rick Jerz

Re: Problem with Collapsed Topics in Moodle 3.2 with Boost based theme

'mei a Gareth J Barnard - 'aho
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Thanks Rick,

I do intend to put the code back at some point, but given the 'linkcoresections' settings I think any additional setting I would add maybe confusing.

In reply to Gareth J Barnard

Re: Problem with Collapsed Topics in Moodle 3.2 with Boost based theme

'mei a Rick Jerz - 'aho
Picture of Particularly helpful Moodlers Picture of Testers

Yes, I understand.  When I find time, I am going to have to see what a generic Moodle 3.x looks like with and without this setting.  The Nav Drawer adds a level of complexity, and it also adds a level of opportunities!

Thanks.