Back to Course button only works on some pages

Back to Course button only works on some pages

by D Barnhart -
Number of replies: 4

Not sure if I am posting this question in the right forum. I am using Moodle 2.3.

I inserted a Back to Course button on one of my pages and it works when I have the button link to a page that is NOT within the course (such as back to the front page).  But it doesn't work when I have the button link to a page that is within the course and I am not sure what I need to change to make this work.

Here is my html for the button:

<form method="link" action="http://autodealeredu.com/">

<input type="submit" value="Back to Home">

</form>

This makes the button that is exactly like the buttons in moodle.  Why can I not make the action link to a page that is within a course, but I can make the action link to a page that is not inside the course? And what do I need to add/change to make the button work with a page that is inside of the course?

Thank you for the help.

Average of ratings: -
In reply to D Barnhart

Re: Back to Course button only works on some pages

by D Barnhart -

What's weird is that I can create a link without the button around it and that works.  It just doesn't work when I try to create a button around the link.

I just think it looks better with the button look.  Any ideas?

In reply to D Barnhart

Re: Back to Course button only works on some pages

by D Barnhart -

Ok I figured it out.  For anyone else that might like a button here's what I did:

<a href="URL that your redirecting to"><button>Text of Button</button></a>

That works for redirecting to a page within my course.  Still not sure why the other code didn't work.....

In reply to D Barnhart

Re: Back to Course button only works on some pages

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

Hi,

Do you mean that the code:

<form method="link" action="http://autodealeredu.com/">

<input type="submit" value="Back to Home">

</form>

When on a page on the front page that links to a page within a course does not work?

Cheers,

Gareth