Possible to duplicate the "relative links" at the bottom of Moodle pages?

Possible to duplicate the "relative links" at the bottom of Moodle pages?

by Pat McDenn -
Number of replies: 6

TL;DR

Is there a way to create a second button on a Moodle Page/Lesson/Book which duplicates the 'function' of the NEXT button in the lower right? Note we are looking for the function and not the absolute link (see below). 


The links at the bottom of the page, which help to sequence the lessons, do not seem to technically be relative, but they have been generated automatically and in a relative order. In the image below, clicking on the right link at the bottom of the page will bring me to the next activity, no matter how much I rearrange the activities in the course, that link will always change what it is pointing to, based on what's next in sequence, and I don't have to update this link. Moodle does this on its own.

So, these are created relatively (or however we need to call them) but they are coded in absolute. I assume that's just the way this needs to be. Clearly, I can't copy the link in the lower right and paste it on another page and have it bring me to the NEXT page, it would just bring me to what was the next page where I copied the link because it's absolute.

What we are trying to do it duplicate this button somewhere else on the page. However, we need to duplicate the function of this button, not the link. An instructor is requesting a 2 part page where the student, in one click, can move to the next lesson or ignore it and continue learning, to the bottom of the page. They would rather not simply direct the student (either through text, a jump link to the bottom, or otherwise) to just head to the bottom of the page. They are hoping to make it a bit more seamless and be able to use the same template on every page. 

Is there a way to either duplicate this button or to create a button on the page that essentially activates this button in the lower right?

Thank you



Average of ratings: -
In reply to Pat McDenn

Re: Possible to duplicate the "relative links" at the bottom of Moodle pages?

by Colin Fraser -
Without hacking core code, I don't see how this can be done. What you see as an absolute link is actually constructed in php, usually a two or three part process depending on the requirement of the link, so mess with that and you're likely to wreck it altogether.
This concerns me "...An instructor is requesting a 2 part page where the student, in one click, can move to the next lesson or ignore it and continue learning,..." as it suggests the task constructed is overly complex, or the topic to which the task is related is very large and complex and too much ground is trying to be covered in one assignment or task, or the task itself is not that important so can safely be ignored. Moodle was designed and built to be a step by step tool using constructionist principles, and reflects that in these sorts of methods to build understanding and ultimately, mastery of topics.
While this "... They are hoping to make it a bit more seamless and be able to use the same template on every page..." doesn't make a lot of sense to me. You can use the same template on any Moodle page. If you're talking about redesigning the existing page templates then that can be done using a Theme, so have a look at them find one that suits or is close and modify it to suit your need. Moodle is open source.
Sorry if this doesn't seem very encouraging but a lot of these kinds of issues are often resolved not by trying to change Moodle, but allowing Moodle to influence the way in which your courses are designed, how your Teachers construct and integrate resources and activities. It's working with a tool, not trying to bend the tool out of shape and becoming unhappy the tool doesn't allow it. Good luck.
In reply to Colin Fraser

Re: Possible to duplicate the "relative links" at the bottom of Moodle pages?

by Pat McDenn -
Thank you much for your help Colin. I understand everything you are saying but, sometimes it is not the person burdened with the responsibility of finding the solution who is pulling the strings. Your comments add to an already really long list of reasons that I have already put forth.

Essentially, they are attempting to create a branching scenario outside of lessons (as lessons have been a headache in their limitations) and also without using h5p or an external tool. Again, there are many comments about this and why or why not to go this route, but I was simply seeing if there was a solution to duplicate the link. I can see that is likely not the case.

This has all stemmed from a main issue with Lessons (as has been documented in many forums posts), where the double navigation bars at the bottom of the page cause confusion. This, which cannot be changed, is much more of a concern to me as it essentially breaks the flow of lessons when students need to guess which "next" button they are supposed to press. The only solution to this has been to disable the navigation bars in CSS but, while they are redundant in lessons, they are not so in other activities which don't have built in navigation.

So, in conclusion, people are trying to find ways around the some of the limitations inherent in lessons.

I do appreciate the input though and I sometimes screenshot forum posts and send them to the person requesting the help :D
In reply to Pat McDenn

Re: Possible to duplicate the "relative links" at the bottom of Moodle pages?

by Colin Fraser -
Hi Pat, I am going to assume you have connected with the lead maintainer of Lesson module? Or rather, there are a number of Lesson related plugins and third party tools that have been developed that add functionality or vary the Lesson module. One of them may be closer to what you need, or not. Alternatively, one of them may be taking you in a different direction that may be more advantageous that is the current set up. Or perhaps an outline of the main issue in Tracker? Or all three? 

I think I have a better understanding of what you mean now, and apart from getting done by the Dev team, I'm not sure that too much will change. 
In reply to Colin Fraser

Re: Possible to duplicate the "relative links" at the bottom of Moodle pages?

by Pat McDenn -
I didn't connect directly. I saw only that comments were made that the ability to disable the bar ambiguity at the bottom of the lesson module was not possible:
Here is one such forum post discussing the frustration of the ambiguity, but I saw many others when I was searching if there was a solution:
https://moodle.org/mod/forum/discuss.php?d=362242

Of course, this is not to say that I don't appreciate any help, or your time. It is definitely much appreciated that you replied. Have a great week smile
In reply to Pat McDenn

Re: Possible to duplicate the "relative links" at the bottom of Moodle pages?

by Steven A -

The only solution to this has been to disable the navigation bars in CSS but, while they are redundant in lessons, they are not so in other activities which don't have built in navigation.

Have you tried targeting the <body> of the lesson activity with your CSS? Doing so might prevent your CSS from affecting everything. The <body> of each activity and resource has a unique "id" generally as follows:

<body id="page-mod-forum-view">

<body id="page-mod-lesson-view">

In reply to Steven A

Re: Possible to duplicate the "relative links" at the bottom of Moodle pages?

by Pat McDenn -
I did see that you could target individual courses, but I didn't see individual lessons. This adds a new route for sure. It will be rather CSS change heavy as we develop new courses but beggars can't be choosers :D

Thanks for your time Steven!