course category (site settings)

course category (site settings)

by Brian Schmidt -
Number of replies: 15
With 1.5.x, we had the course categories listed for what should be displayed in the center of the screen.  It worked great.  And when a user logged in, that area was replaced with the courses they were personally enrolled in.

However, in the upgrade to 1.6, I noticed that this no longer seems to happen.  In the Site Settings, I chose to only show the course categories and hide the news and courses.  Now what displays are the categories with every single course listed under each.  That makes the page way too long, as well as not being what we want.  Also, when a user now logs in, the categories remain there and they do not see their own courses.  I would really like to be able to have it display the way it used to, which makes a lot more sense (to me).

Is there a way to accomplish this?  Am I overlooking a setting?

TIA!
Brian
Average of ratings: -
In reply to Brian Schmidt

Re: course category (site settings)

by Crafton Williams -
I am having the same problem.
In reply to Crafton Williams

Re: course category (site settings)

by Ray Lawrence -
Hi,

This is working as you wanted for me with "List of courses" selected for the fron page.
In reply to Ray Lawrence

Re: course category (site settings)

by Brian Schmidt -
Hi Ray,

Thanks for the tip on the "list of courses" part - I missed that it loaded up My Courses upon login.  However, this is still not quite working for me the way I want.

The part I don't want, is that when the user is logged out, I get a huge list of all of the courses on the front page.  That's way too much content to be loaded every time for me.  Once they log in, they just see their courses - which is great and the part I do want.  What I would like for them to see, when logged out, is what they saw in the previous version - the list of categories.

Thanks,
Brian
In reply to Brian Schmidt

Re: course category (site settings)

by M Y -
Hi All,

I once had the same problem, the solution is an parameter in the config.php file.
Open the config.php file with your fav editor and add the following line anywhere file.
$CFG->disablemycourses = true;

You can find many other tweeks like this for which no GUI exists yet in the config-dist.php file.

--Martin

In reply to M Y

Re: course category (site settings)

by Brian Schmidt -
Hi Martin,

Thanks for the tip about looking at config-dist.php.

I actually don't want to disable the my courses part, though.  I like that the courses  for which that person is enrolled in show up for them when they log in.

What I don't want is for all of the courses to be displayed to someone who is not logged in.  I just want the categories to be displayed.

Thanks!
Brian
In reply to Brian Schmidt

Re: course category (site settings)

by M Y -
OH!! Sorry Brian,

I miss understood, I'm tired ;)

Sorry, I have no idea! Sorry

--Martin
In reply to M Y

Re: course category (site settings)

by Brian Schmidt -
No problem at all.  With as far behind as I am on rest myself, I can't fault anyone for it!   smile
In reply to Brian Schmidt

Re: course category (site settings)

by Ray Lawrence -
Hi Brian,

Aplologies, I missed your point.

Yes, you're right. It does seem to be different....
In reply to Brian Schmidt

Re: course category (site settings)

by Mark Schumann -
On a similar note, i really like the way the My Moodle page works, but I'd really like to include a topic section on the middle area above the course listings.  That way it'll work very similar to how it does not, but will give the users more info about their courses, and ONLY list their courses.
In reply to Brian Schmidt

Re: course category (site settings)

by Mon B -

This is occuring for me as well. I'm suprised there isn't an easy solution - I imagine lots of users have many courses.

I've looked in the settings and all over the forums here. Is this an oversight? It seems a simple choice in site settings would have been beneficial for this. Or perhaps we've overlooked somehting ourselves?

I also liked the old way of having a number to the left of each Category indicating the number of courses that Category holds.

Anyone? smile

In reply to Mon B

Re: course category (site settings)

by Ray Lawrence -
This issue has been reported at bug 5903.
In reply to Ray Lawrence

Re: course category (site settings)

by Brian Schmidt -
I just voted for the bug.  It surely seems like a bug or an oversight at the least for it to be functioning this way, given how the previous versions displayed as well as the description of what you're choosing to show/hide in the site settings.
In reply to Brian Schmidt

Re: course category (site settings)

by Steve Power -

I have voted for the bug too.

It seems that whatever you set the list of categories depth to it always shows them all. If you set $CFG->max_category_depth = 1 then you appear to be able to select other values from the drop down but whenever you return to the Administration >> Configuration >> Site settings page the drop down shows 1.

Regards
Steve

In reply to Brian Schmidt

Re: course category (site settings)

by Crafton Williams -
I found a quick workaround for this issue. Just comment out the following lines in moodle/course/lib.php -> print_category_info():

 $catimage = '<img src="'.$CFG->pixpath.'/i/course.gif" width="16" height="16" border="0" alt="" />';

and

$courses = get_courses($category->id, 'c.sortorder ASC', 'c.id,c.sortorder,c.visible,c.fullname,c.shortname,c.password,c.summary,c.guest,c.cost,c.currency');

After you comment these lines, the categories should show up as before without the course listing below. Apparently, there's some logic in print_category_info that says moodle should only show the categories the way we want only if the courselist value in site settings is set. I can't imagine why this was done, but there's the workaround. This module is only used by print_whole_category_list(), hence the change won't affect anything else.

Crafton