Essential Theme "This Course" Drop-down shows hidden resources

Essential Theme "This Course" Drop-down shows hidden resources

by Peter Gehbauer -
Number of replies: 8

Hi,

I've set up a hidden section at the end of a course where I hide resources that I do not want to show elsewhere in the navigation except in explicit links that I create in, for example, an HTML block or poster.

The problem is that the hidden content is being shown in the "This Course..." drop-down menu. 

Any suggestions on how I might stop the display of hidden resources? Of course I can "hide" them but then students cannot access them through the hyperlinks elsewhere in the course site. If I restrict access to the section to "teacher only" then the contents is also restricted -- so that I doubt works either.

Thank you. This really is a very nice theme and look forward to the next release for Moodle 2.9.

Cheers, PG

Average of ratings: -
In reply to Peter Gehbauer

Re: Essential Theme "This Course" Drop-down shows hidden resources

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi Peter,

Interesting issue.  Ok, I understand where you are coming from.  I don't have a solution, but the code is here: https://github.com/gjb2048/moodle-theme_essential/blob/master/classes/core_renderer.php#L374-L403 and perhaps there is an attribute of $cm that states if the parent section is hidden.  Also the code came from the BCU theme, so will be a bug in it too.

I'll need to add this and the FitVids issue to the M2.9 milestone delaying the stable release.

Cheers,

Gareth

P.S. Strange this: https://github.com/gjb2048/moodle-theme_essential/blob/master/classes/core_renderer.php#L383-L385 doesn't help!

In reply to Gareth J Barnard

Re: Essential Theme "This Course" Drop-down shows hidden resources

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi Peter,

Thinking about this a bit more, do you mean 'Stealth sections'?  Like: https://github.com/moodle/moodle/blob/master/course/format/renderer.php#L792-L802

Cheers,

Gareth

In reply to Gareth J Barnard

Re: Essential Theme "This Course" Drop-down shows hidden resources

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

https://github.com/gjb2048/moodle-theme_essential/issues/537 raised and assuming that it is the 'stealth section' as any with hidden section the activities / resources would also be hidden from the user and thus not show when you clicked on them.  In any event the latter is virtually impossible to fix as each course format can make its own decisions over visibility of sections, but the former is possible to solve.

In reply to Gareth J Barnard

Re: Essential Theme "This Course" Drop-down shows hidden resources

by Peter Gehbauer -

If what you mean by stealth section -- course has 6 sections but in section 7 (stealth section) there is content referred to in hyperlinks; want hyperlinks active and working but section not visible. Seems reasonable to not show these resources (and other content types) in the "this course" drop down.

I believe your interpretation of this is correct and am happy that you are optimistic on this smile.

Cheers and many thanks for the great work.

PG

In reply to Peter Gehbauer

Re: Essential Theme "This Course" Drop-down shows hidden resources

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi Peter,

To clarify, 'stealth' sections are when you put activities and resources in the last section of the course and then reduce the number of sections by one, as in the attached screen shot.  They are not hidden but just don't get shown by the course format when not editing.

Cheers,

Gareth

Attachment 2015-09-16 15_57_24-Course_ Code.jpg
In reply to Gareth J Barnard

Re: Essential Theme "This Course" Drop-down shows hidden resources

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Ok, additional... looking into this further the URL is a core one outside of the control of the theme code.  I'll see if my theme code change idea makes any difference, but I don't think it will when there are resources in and out of the stealth section.  Therefore this needs (if not already) a Moodle Tracker issue and a lot of luck.

Attachment 2015-09-16 16_04_58-CD_ Resources.jpg
In reply to Gareth J Barnard

Re: Essential Theme "This Course" Drop-down shows hidden resources

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi Peter,

I can only get so far with this and have implemented a fix that will help in situations where there are only modules of a given type in the 'stealth section' and not elsewhere.  The rest is down to MDL-51465.

Cheers,

Gareth

In reply to Gareth J Barnard

Re: Essential Theme "This Course" Drop-down shows hidden resources

by Peter Gehbauer -

Thank you. Your quite correct and replicated the issue accurately. Cheers, and looking forward to a solution from our fellow Moodle enthusiasts.

Peter