Is there any way to remove the All courses button when a user logs in

Is there any way to remove the All courses button when a user logs in

by Ket Kod -
Number of replies: 10
Hey Peeps,

I am a newbei in Moodle, and my question is that when a user logs in, there is the "All courses" button, which when pressed Users can see all the courses. Even tho they can only click on the Course that they are assigned to, I do not what them to see this button. Is there any way I can remove that button.

Thanks,
Ket
Average of ratings: -
In reply to Ket Kod

Re: Is there any way to remove the All courses button when a user logs in

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
Site administration>modules>blocks>courses> hide all courses link
In reply to Mary Cooch

Re: Is there any way to remove the All courses button when a user logs in

by Ket Kod -
Thanks for your reply. The problem is even though they cannot see any courses whey on pressing the All courses button they can see the categories of the courses. So say I there is two categories: 1. Sports and 2. Science. And user A is enrolled to course Football within the Sports category. When user A logs in and clicks on All courses they can still see the Science category, is there anyway i can hide the science category from the user or remove the All courses button..

Thanks,
Ket
In reply to Ket Kod

Re: Is there any way to remove the All courses button when a user logs in

by Ket Kod -
ooh just to add, i did tick the Hide All courses checkbox, but still the All courses button is displayed.. any ideas?
In reply to Ket Kod

Re: Is there any way to remove the All courses button when a user logs in

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
Do you mean you only want them to see their own courses and not others? Have you tried the MyMoodle option in site admin? Once they log in they are taken to personalised page that only gives them their own courses.
In reply to Ket Kod

Re: Is there any way to remove the All courses button when a user logs in

by Tom Adair -
I've the same problem.

I did the following:

To the /theme/standard/styles_layout.css (adapt if you're using a modified/selfmade theme that way it won't be overwritten with updates)

I added the following to the "ourtheme"_layout.css:

.coursesearchbox{
display:none
}

Did the trick for the searchbox.

Thought to do the same for the button with :

.singlebutton{
display:none;
}

But that's linked to many places on the site, with different text and function each time.

Found some more info that might be helpful here: http://moodle.org/mod/forum/discuss.php?d=61336

Maybe it will help you (and me smile ) with finding the right solution.

Best of luck!
In reply to Tom Adair

Re: Is there any way to remove the All courses button when a user logs in

by Devesh M -
Guys,

There is no need to waste your time. Its a very simple thing. You just have to comment a single line in course/lib.php

line no: 2183
Code: print_single_button("$CFG->wwwroot/course/index.php", NULL, get_string("fulllistofcourses"), "get");

Comment this line.

If you'll play with css then it will reflect the same changes at different-2 places and creates lot of issues for you.

Apart from that, there is no need to change in the multiple files. Its just a single click process.

Cheers!
Devesh M
In reply to Devesh M

Re: Is there any way to remove the All courses button when a user logs in

by Burt Polesitter -

Thanks Devesh! This solution works perfectly! It has saved me from hours of coding css to try and remove this.

In reply to Devesh M

Re: Is there any way to remove the All courses button when a user logs in

by Burt Polesitter -

Thanks Devesh! This solution works perfectly! It has saved me from hours of coding css to try and remove this.

In reply to Devesh M

Re: Is there any way to remove the All courses button when a user logs in

by Toby Smith -

This worked in 2.4 like a champ!

Removed the All courses button.

Thank you very much.

In reply to Devesh M

Re: Is there any way to remove the All courses button when a user logs in

by Michael Weston -

I'm not seeing this line of code in Moodle version 2.5.2.

Any ideas?