Why no return to course button?

Why no return to course button?

by roobarb & custard -
Number of replies: 6

Hi there all,

Not sure if this is the right place to put this question, but I figured this is where all the cool designers hang out so I'll give it a try here.

I really would like to have a button at the bottom of every page which says 'return to course' or something similar, as once someone has linked off to a page/assignment/forum etc they can get stuck finding a way back again.

I know its easy for us to say... just click on the breadcrumbs or click on 'my home' - but my adult students are sometimes struggling.

I've found a quick fix by dropping in a ...input type=button value="Back" onClick="history.go(-1)"... button, but this just goes back to the last page, so doesn;t work on things like forums.

Has anyone any ideas of what I can use? or is there some reason why this is majorly complicated and thats why its not been done before.

Hope that I've explained that OK... thanks in advance for any help.

:0)

Average of ratings: -
In reply to roobarb & custard

Re: Why no return to course button?

by Justin Reeve -

Something like this would accomplish the same thing, and work with forums.

<?php echo '<a href="' . $CFG->wwwroot . '/course/view.php?id=' . $COURSE->id . '">Back to Course</a>'"; ?>

In reply to Justin Reeve

Re: Why no return to course button?

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Thanks Justin,

Yes...and if you enclose it in <button></button> psudo tags it will look like a button too! smile

Mary

In reply to Mary Evans

Re: Why no return to course button?

by roobarb & custard -

Thanks so much guys - I'll give that a go and let you know how it all works out!

In reply to roobarb &amp; custard

Re: Why no return to course button?

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi,

If you add this...

<button><?php echo '<a href="' . $CFG->wwwroot . '/course/view.php?id=' . $COURSE->id . '">Back to Course</a>'"; ?></button>

to the footer area of your themes layout/frontpage.php and general.php it will show up on every page.

FOR EXAMPLE:

<!-- START OF FOOTER -->
    <div id="page-footer">
        <p class="helplink">
        <?php echo page_doc_link(get_string('moodledocslink')) ?>

       <button><?php echo '<a href="' . $CFG->wwwroot . '/course/view.php?id=' . $COURSE->id . '">Back to Course</a>'"; ?></button>

        </p>

        <?php
        echo $OUTPUT->login_info();
        echo $OUTPUT->home_link();
        echo $OUTPUT->standard_footer_html();
        ?>
    </div>
</div>
<?php echo $OUTPUT->standard_end_of_body_html() ?>
</body>
</html>

Hope this helps?

Mary

In reply to Mary Evans

Re: Why no return to course button?

by Isabelle Langeveld -

Wouldn't it be great if you could have a Back to course button as default in Moodle? Why should I have to fiddle in the theme, if it's such a logical thing to have?

For instance in the Choice. A user clicks on one of the options and nothing seems to happen. Only a button Remove appears.


Average of ratings: Useful (1)
In reply to Isabelle Langeveld

Re: Why no return to course button?

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

This is not the place to ask for improvements, but Moodle Tracker is. I suggest you go rewrite what you said here...over there. smile

Then create a new discussion in this forum and post the number of the tracker ticket so we can all vote for it! Yeah!

Cheers

Mary