No links in Navigation Block - Grid Format

No links in Navigation Block - Grid Format

by Greg Barber -
Number of replies: 9
Hello, I am currently using the Grid Format course format in Moodle 2.2.7 and there are no links in the Navigation Block. The course structure is there with all the topics and subtopics and the tree expands and contracts correctly, but clicking on a topic does not take you to that topic. I notice in the source code of the page that there are no links in the nested 's. Any ideas why this is happening. Have I missed a config option somewhere?
Average of ratings: -
In reply to Greg Barber

Re: No links in Navigation Block - Grid Format

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

Hi Greg,

Moodle 2.2 is now ancient history.  Even M2.3 is only supported for security updates.  Therefore I've removed M2.2 from my development suite.  So would take me time to put M2.2 back and investigate the issue with that old version.  Are you able to update to a supported Moodle 2.5?  If so and the same issue is there then I can easily look into it and will fix it if it is a problem.  If not then please let me know if you want me to spend time on it back in M2.2 and I'll see what I can do - but no promises though.

Gareth

In reply to Gareth J Barnard

Re: No links in Navigation Block - Grid Format

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

Hi Greg,

Additional, I looked in the M2.5 version and the same functionality exists.  Looking deeper though that is standard behaviour for the section names when the course is in 'Show all sections on one page' mode for the Topics format etc.  In 'Show one section per page' mode there are links that take you to the sections.  Therefore any change would be an enhancement beyond what currently happens with the navigation block.

Gareth

In reply to Gareth J Barnard

Re: No links in Navigation Block - Grid Format

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

And looking at it further would not be trivial as I would need to add a class / id to the 'a' tag within the navigation block.  Currently I only have control over the contents of the URL in 'lib.php' -> 'get_view_url()'.

It would mean somehow altering the code within 'load_generic_course_sections' of '/lib/navigationlib.php' in M2.5 is around line 1885 being:

$url = course_get_url($course, $section->section, array('navigation' => true));

By extending 'extend_course_navigation' in '/course/format/lib.php' - again, not trivial.

Cheers,

Gareth

In reply to Gareth J Barnard

Re: No links in Navigation Block - Grid Format

by Greg Barber -

Hi Gareth,

Thanks for your time on this so far. I am waiting for my host provider to give me MySQL5.1 so I can upgrade to M2.5.  They assure me it's in the pipeline for this month but as they provide my organisation with services free of charge I'm hardly in a position to push them too hard.

However since this is normal behaviour even in M2.5 I'm not sure how much it will help in this instance.

I'm intrigued by what you mean by "Show all sections in one page" mode.  Is this something that happens with certain course formats, or can I use the Grid Format in another mode?

I would understand if there were no links in the navigation block when all topics were on one page (the main page of the course) but even when you are looking at a single topic/section you cannot easily navigate from one section to another.  You need to go back to the main course page all the time and find the section you are looking for.

Or am I missing the point completely?

Thanks again for your help.

Greg

In reply to Greg Barber

Re: No links in Navigation Block - Grid Format

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

Hi Greg,

The "show all sections on one page" and "show one section per page" are described on Course_settings#Course_layout where the former is the initial default for most course formats.  The latter "show one section per page" is described on Course_formats#.22Show_only_one_section.22 where I put the "Jump to" menu back in M2.5 where you can easily navigate between the sections using both that and the navigation block so it is easy to navigate between sections.

With "show all sections on one page" in the Grid format (and in other formats) even though the sections are not clickable on the navigation block and only via the grid, you can still expand each section on the menu and get links to the items contained within....

I hope this helps,

Gareth

Attachment gfnav.jpg
In reply to Gareth J Barnard

Re: No links in Navigation Block - Grid Format

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

Grid format in "show one section per page" showing jump to menu and navigation links....

Attachment gfnav2.jpg
In reply to Gareth J Barnard

Re: No links in Navigation Block - Grid Format

by sameer sharma -

Hi Gareth,

The grid format is awesome. However i was wondering that is there any way to show the POP-UP by clicking on any other page. Suppose i have a different page which also contains my modules. Can i show the POP-UP there???

In reply to sameer sharma

Re: No links in Navigation Block - Grid Format

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

The only way for that to happen would be to identify the 'renderer' for that page and use parts of the grid format to create your own plugin somehow, probably as a part of a theme that overrode a layout or something.  The Grid format itself is specific to courses only being a 'course format'.

In reply to Greg Barber

Re: No links in Navigation Block - Grid Format

by Randy Thornton -
Picture of Documentation writers

 

In 2.5 you have the option to set what shows up in the Navigation links: just course links or more. You can set this by turning on editing, going into the Navigation block configuration, and adjusting the "Generate navigation for the followig" pulldown. You include course structures and/or course activities.

Attachment screenshot_759.png