Not able to hide "All Courses" link

Not able to hide "All Courses" link

by Aditya Dubay -
Number of replies: 25

Hi,

 

I am using Moodle 3.4

I want to HIDE "All Courses" link from site home page.

What I did is, I went to Site Administrator>Plugins>Blocks>Courses and select Hide all courses link.

But when I login as student or teacher I found "All courses" on site home page.

Please help I do not what to show all courses to any user of my moodle.

Screenshot attached for reference.

Thanks in Advance.

Attachment removeAllcourses.png
Average of ratings: -
In reply to Aditya Dubay

Re: Not able to hide "All Courses" link

by S. kavita -
Picture of Testers

Hi,

On Front page setting have selected "Enrolled courses"

In reply to S. kavita

Re: Not able to hide "All Courses" link

by Aditya Dubay -

Hi Kavita,

Thanks for reply.

Yes Enrolled Courses for logged in users.

In Dashboard it shows "Enrolled Courses" but in Site Home it shows link to"All Course" with My Courses.

I wish to remove that "All Courses" link.

In reply to Aditya Dubay

Re: Not able to hide "All Courses" link

by Jenny McCann -

I've been trying to do this for ages but I've never found a way to do it.

I run a site where I would prefer the students can only see the courses they are enrolled on, because there are a few different versions of some courses as they have changed an evolved.

I don't want students to be able to see 'all courses' either.

In reply to Jenny McCann

Re: Not able to hide "All Courses" link

by C Behan -

You could hide it using custom CSS:


#frontpage-course-list > div > div.paging.paging-morelink {display:none}

Average of ratings: Useful (4)
In reply to C Behan

Re: Not able to hide "All Courses" link

by Aditya Dubay -

Hi Behan,

Thanks for reply.

Why we needed custom css if there is "Hide 'All courses' link".

This option should work I feel.

In reply to Aditya Dubay

Re: Not able to hide "All Courses" link

by C Behan -

Hi Aditya,


You are editing a block, but that block is not the same thing as the list of enrolled courses that displays on the "site home".


You might want to consider directing your users to their dashboard rather than the "site home" when they log in. This would mean that they see [yoursite]/my instead of [yoursite]/?redirect=0 when they log in/ (See https://docs.moodle.org/34/en/Dashboard#Default_home_page)


You can then configure that page to show whichever blocks you wish by default.



In reply to C Behan

Re: Not able to hide "All Courses" link

by Andreas R. -

Hi

When te user role is default = Default: Authenticated user on frontpage (frontpage) you configure the front page settings

Here as example = frontpage and frontpageloggedin you set "Announcement"

Then you configure the blocks in the admin section -> site administration -> plugins -> Blocks -> Courses and here you mark "block_course_list_hideallcourseslink"


That works for me!

Greets Andy

In reply to Andreas R.

Re: Not able to hide "All Courses" link

by Aditya Dubay -

Hi Andreas,

Thanks for reply.

Sorry but I did not get your solution.

Can you please elaborate.

In reply to Aditya Dubay

Re: Not able to hide "All Courses" link

by Andreas R. -

Ok step by step

1. What role for frontpage you have?

1.1. Can you set - Default: Authenticated user on frontpage (frontpage)?


If yes do it and come back for the next step.

Andy

In reply to Andreas R.

Re: Not able to hide "All Courses" link

by Aditya Dubay -

Hi Andreas,

Thanks for reply.

Yes it is Default: Authenticated user on frontpage (frontpage) on front page settings.

In reply to Aditya Dubay

Re: Not able to hide "All Courses" link

by Andreas R. -

Moin

Next step = Then you configure the blocks in the admin section -> site administration -> plugins -> Blocks -> Courses and here you mark "block_course_list_hideallcourseslink"

Can you do this?

If yes, did you have a normal user account, not admin and check if this option is hide?

Come back with your answer wink


Greets Andy

In reply to Andreas R.

Re: Not able to hide "All Courses" link

by Aditya Dubay -

Hi Andreas,

Thanks for reply.

Yes I did it before but it wont hide "All Courses" link of "Site Home", neither for student nor for teacher.

Technically it should but it did not.

That is the problem.

In reply to Aditya Dubay

Re: Not able to hide "All Courses" link

by Andreas R. -

Ok

Next step, = frontpage and frontpageloggedin you set as example "Announcement". Normally "All courses" link should go away!

Yes or not?

If yes, thats the solution, if not you should check the roles!

Greets Andy

In reply to Andreas R.

Re: Not able to hide "All Courses" link

by Aditya Dubay -

Hi Andreas,

Thanks for reply.

Nope it doesnt help me and "All Courses" is still there.

 

In reply to Aditya Dubay

Re: Not able to hide "All Courses" link

by Andreas R. -

Hi Aditya

I cannot believe, in this case i have no idea what happend? Something with the role permission, did you clear the cache files? Can you check once again the roles?

Good luck!

Greets Andy

In reply to Andreas R.

Re: Not able to hide "All Courses" link

by Rachel Martin -

I believe this is separate from the block.  It seems this is part of the frontpage renderer and it calls the list of courses.  I was trying to hunt down a setting for this as well, but so far I haven't found one and so far I haven't found any permission check to hide it from students either.

Right now, the simplest option might be the custom CSS.

In reply to Rachel Martin

Re: Not able to hide "All Courses" link

by T K -

I had this same problem with my Moodle 3.4, finally i added the below CSS and it works in hiding the 'all courses'.

It is funny that a direct setting takes no effect to make it work.

Average of ratings: Useful (1)
In reply to T K

Re: Not able to hide "All Courses" link

by Patrice Eugene -
I have the same issues. I'm still trying to find the way to make it works!
In reply to Andreas R.

Re: Not able to hide "All Courses" link

by Vicent Vu -

You are right, Andreas R.

That works for me too.

Now I can hide all courses I had created in the system. People only see and access courses which they are enrolled.

Thanks!

In reply to C Behan

Re: Not able to hide "All Courses" link

by T K -

This CSS method worked for me but there is a problem, I want the Admin to be able to see the all courses link but now its hidden for everyone including the admin. Is there a solution to this?

In reply to T K

Re: Not able to hide "All Courses" link

by Javier Virues-Ortega -

Has anybody found a solution to this problem? Could you provide more detailed instructions as to how to implement the CSS code. Thanks

In reply to Javier Virues-Ortega

Re: Not able to hide "All Courses" link

by Aga Prabowo -

1.go to :

yoursite/mod/book/styles.css

2.add this at the end of the line:

.paging.paging-morelink {display:none;}

Average of ratings: Useful (1)
In reply to Aga Prabowo

Re: Not able to hide "All Courses" link

by Patrice Eugene -
This solution worked for me. (Just had to wait for the cronjob). Thanks!
In reply to Aditya Dubay

Re: Not able to hide "All Courses" link

by Jai Bararia -
You can change it from here http://ip/moodle_directory_name/admin/upgradesettings.php
In reply to Jai Bararia

Re: Not able to hide "All Courses" link

by Yasir Siddique -

Dear no one Understood your question 

he is asking about this link on site home 

All Subjects

Dear go to site administration search for "all courses"

Find Courses  Heading

Hide 'All courses' link

block_course_list_
hideallcourseslink
 Default: No

Remove the 'All courses' link under the list of courses. (This setting does not affect the admin view.)