General help

Moodle 2.6.2 - How to hide Available courses on frontpage without hiding Enrolled Courses

 
 
Picture of SJ K
Moodle 2.6.2 - How to hide Available courses on frontpage without hiding Enrolled Courses
 

Hi

Settings of Front Page:

Front page items when logged in - set to Enrolled Courses only and all others set to None.

- Front page - I've set all options to None.

If a user is enrolled in a course then the user will see all the courses they are enrolled in which is good titled  "My Courses" on the Front page.

But if the users are not enrolled any courses then they will see All available courses "Available Courses" on the Front Page.

Is it possible to not show the user these "Available courses" if they are not enrolled in any of the courses.

Any ideas is appreciated? Thanks.

 
Average of ratings: -
Picture of SJ K
Re: Moodle 2.6.2 - How to hide Available courses on frontpage without hiding Enrolled Courses
 

Can someone please help me out here?

 
Average of ratings: -
Picture of Przemek Kaszubski
Re: Moodle 2.6.2 - How to hide Available courses on frontpage without hiding Enrolled Courses
Group Particularly helpful Moodlers

FYI - I tried a CSS hack with display:none set to div with id frontpage-course-list , but this is too intrusive. Will stop all users from seeing course lists on the front page. I hope someone can come up with a solution..

 
Average of ratings: -
Picture of Robert Brenstein
Re: Moodle 2.6.2 - How to hide Available courses on frontpage without hiding Enrolled Courses
Group Particularly helpful Moodlers
The behavior you see, SJ, has been in Moodle for ages. Your solution is to go into the PHP code and find the line that displays the full list of courses of user is not enrolled and adjust the code accordingly. Thing to watch is that admin or other roles are not stopped from seeing all courses.
 
Average of ratings: -
Picture of Adriana Mikey
Re: Moodle 2.6.2 - How to hide Available courses on frontpage without hiding Enrolled Courses
 

I am facing the same problem.I could not find the php file that contain those code..or maybe I miss seen it..I try to hide previous course that display in student page.I just want to display current course/subject for current semester in student page..kindly help me..For example I just want to display course/subject for semester April 2014 only..

 

 
Average of ratings: -
Picture of jason everling
Re: Moodle 2.6.2 - How to hide Available courses on frontpage without hiding Enrolled Courses
Group Particularly helpful Moodlers

What about forcing all users to "My Home" then under the navigation settings set "Show All Courses" no. There is another setting labeled "Course Limit" under navigation which (Limits the number of courses shown to the user when they are either not logged in or are not enrolled in any courses), set that to 0 . This will remove all courses and categories from the navigation and also force the users to My Home.

JASON

 
Average of ratings: -
Picture of Torsten Händler
Re: Moodle 2.6.2 - How to hide Available courses on frontpage without hiding Enrolled Courses
Group Particularly helpful Moodlers

go in the course/renderer.php  

search for function frontpage_my_courses()

there ist 

if (count($courses) > $CFG->frontpagecourselimit) {
// There are more enrolled courses than we can display, display link to 'My courses'.
$totalcount = count($courses);
$courses = array_slice($courses, 0, $CFG->frontpagecourselimit, true);
$chelper->set_courses_display_options(array(
'viewmoreurl' => new moodle_url('/my/'),
'viewmoretext' => new lang_string('mycourses')
));
} else {
 // All enrolled courses are displayed, display link to 'All courses' if there are more courses in system.
$chelper->set_courses_display_options(array(
'viewmoreurl' => new moodle_url('/course/index.php'),
'viewmoretext' => new lang_string('fulllistofcourses')
));
$totalcount = $DB->count_records('course') - 1;
}

uncomment or delete the else-part then the button "all course" is hide on the frontpage

 

 
Average of ratings:Useful (1)
Miguel Rubio
Re: Moodle 2.6.2 - How to hide Available courses on frontpage without hiding Enrolled Courses
 

Thank you very much, Torsten!

It worked perfect!

Miguel

 
Average of ratings: -
Picture of Mark Hardwick
Re: Moodle 2.6.2 - How to hide Available courses on frontpage without hiding Enrolled Courses
 

This is a work-a-round at best but here is what we did.

Set up a course without any content called "Sorry but you are not enrolled in a course at this time" and enroll them in this course when their other courses expire.  When they login they will see this course and nothing else.  It's a bit of a hassle to keep the timing right but it works.

Mark 

 
Average of ratings: -
Picture of Mark Hardwick
Re: Moodle 2.6.2 - How to hide Available courses on frontpage without hiding Enrolled Courses
 

I stumbled across another idea i like the sounds of.  Build a course that is a "Getting to know you" where it has basic user instructions and leave them enrolled permanently.  Then you don't have to enroll - unenroll them and mess with timing.   

 
Average of ratings: -
Picture of Bobby White
Re: Moodle 2.6.2 - How to hide Available courses on frontpage without hiding Enrolled Courses
 

Hello,

I've spent hours and hours on this too. I don't have access to the php at this point. I'm a lonely Instructional Designer trying to administer Moodle simply by using the configuration settings. 

Surely there is a simple way to show people *only* the courses they are enrolled in and nothing more. We will be automagically enrolling students and teachers unto the system via an enrollment plugin and so I suppose those folks will be OK. But others can login with their campus credentials and should not see any courses until they are participating. I feel like I have tried everything. 

I don't want to force everyone into a welcome or fake course. I want them to land on the Front page where there is useful news and a helpful navigation block which shows their courses OR NOT. 

Please? Are they other thoughts on this? 

Thanks so much,

Bobby

 
Average of ratings: -
Picture of Ken Task
Re: Moodle 2.6.2 - How to hide Available courses on frontpage without hiding Enrolled Courses
Group Particularly helpful Moodlers

Maybe?

http://docs.moodle.org/26/en/My_home

'spirit of sharing', Ken

 
Average of ratings: -
Picture of Bobby White
Re: Moodle 2.6.2 - How to hide Available courses on frontpage without hiding Enrolled Courses
 

Hi Ken,

I appreciate your link. Yes, I have tried messing with this option. I don't prefer using Home as default because I plan on really utilizing the front page for my announcements, outages, news, etc. Plus, the My Home seems to put everything - like Navigation - on the right and does not let me place it on the left. I find it jarring (and weird) that it skips to the right when it's on the left almost everywhere else. I'm sure this is a theme issue, but we have to go super simple. I have no one to do CSS and no one to do PHP. I just want courses to show that are relevant for people and nothing else. Any other thoughts? 

And another question - I noticed that the Course Overview doc (http://docs.moodle.org/26/en/Course_overview_block) says, "The Course overview block is visible on a user's My home page and shows a list of all courses in which a user is enrolled/has an assigned role."

That would imply that one only has to have an assigned role to see their courses. I have Managers assigned at the category level. Why would their category courses not show on this page? That maybe needs to be another posted question. 

Thanks again,

Bobby

 

 
Average of ratings: -
Picture of Torsten Händler
Re: Moodle 2.6.2 - How to hide Available courses on frontpage without hiding Enrolled Courses
Group Particularly helpful Moodlers

Have you try to add custom css in the theme settings to hide this ?

 
Average of ratings: -
Picture of Bobby White
Re: Moodle 2.6.2 - How to hide Available courses on frontpage without hiding Enrolled Courses
 

Hi Torsten,

Thanks for writing back. I don't have the ability or skill to do custom CSS although it might be coming to us next year... Is just seems like a basic setting. 

Thanks though,

Bobby

 
Average of ratings: -
Picture of Torsten Händler
Re: Moodle 2.6.2 - How to hide Available courses on frontpage without hiding Enrolled Courses
Group Particularly helpful Moodlers

go to site-administration -> Appearance -> Themes


here take your theme, the most themes have a setting for custom css.

if your theme has this,  write in this line


.pagelayout-frontpage #frontpage-course-list .paging-morelink {display:none;}   


then save, this should hide the button only with css.


ok if someone has a bit expirence in web develpment he/she can display the link


 
Average of ratings:Useful (1)
Picture of shai spieler
Re: Moodle 2.6.2 - How to hide Available courses on frontpage without hiding Enrolled Courses
 

Thanks Torsten, 


I've been looking for a solution to this for some time now. 

Your solution worked great!

Thanks!


Shai

 
Average of ratings: -
Picture of Blair F.
Re: Moodle 2.6.2 - How to hide Available courses on frontpage without hiding Enrolled Courses
 

I feel Bobby's pain.  I've wasted HOURS upon hours trying to figure out a good work-around.  We have a course for new Moodle users, so I also came up with the idea to autoenrol everyone in that and that would prevent the "Available Courses" from showing, but that led to other issues that have taken up even more hours of my type (Like how many students can we enrol in a course before it causes problems?).  

I wish someone would fix this issue, or at least code in an option for those of us who don't want new users to see all the courses when they log in.

 
Average of ratings: -
Moi
Re: Moodle 2.6.2 - How to hide Available courses on frontpage without hiding Enrolled Courses
 

HI,

Sorry to revive such an old subject. I've been fiddling around with this a bit and I haven't been able to find a good work around, only a half hearted one. In Site administration > Appearance > Navigation there is an option called navcourselimit. I have set that to 0. It doesn't seem to have an effect on the courses shown in the front page, however. I wonder what it affects?


In Site Administration > Front page > Front page settings I've set the frontpage course limit to two. That means that people can only see two people on their front page at a time, even if they are enrolled in a course: but as our students rarely enroll in more than one course at a time, two should be enough and that means the damage is at least limited to two course visible for the user who has an account but is not enrolled in a course... Maybe this work-around works for someone else as well.

Now if I could just get rid of that 'All courses' link, my life would be a lot easier. I'll try your workaround Thorsten, as soon as I have an ok from my fellow administrator who knows a lot more about css than I dosmile Thanks so much for that! If it works I'm going to start my weekend in a very good way.

 
Average of ratings: -
Picture of Phil Carlson
Re: Moodle 2.6.2 - How to hide Available courses on frontpage without hiding Enrolled Courses
 

I know there is an option to get rid of the All Courses link, but it doesn't seem to do anything. I wish it did.

 
Average of ratings: -
Moi
Re: Moodle 2.6.2 - How to hide Available courses on frontpage without hiding Enrolled Courses
 

I used Thorstens hack for the css file above. It worked like a charm. Thanks so much! I hope it works for you too, Phil.

 
Average of ratings: -
Picture of Phil Carlson
Re: Moodle 2.6.2 - How to hide Available courses on frontpage without hiding Enrolled Courses
 

Lucinde & Thorsten - That solved my problem. Thank you!

 
Average of ratings: -