Course do not show up

Course do not show up

by Mike Hathaway -
Number of replies: 8
I have a new Moodle set up and no matter how I add courses or categories they do not show up. If you search for the course it gets listed but if you click on a catagory it says no courses are available. How do I set this up and get it working properly?
Average of ratings: -
In reply to Mike Hathaway

Re: Course do not show up

by Zbigniew Fiedorowicz -
Try adding the following line to your config.php:

$CFG->max_category_depth = 10;

Let me know whether or not  this fixes your problem.
In reply to Zbigniew Fiedorowicz

Re: Course do not show up

by Mike Hathaway -

Nope did not work.  I even tried editing the = 10; to = '10'; and it still did not work.

In reply to Mike Hathaway

Re: Course do not show up

by Zbigniew Fiedorowicz -
A couple of weeks ago I made a couple of small changes to the display of courses and categories in Moodle. One was the addition of the $CFG->max_category_depth configuration variable, which allows truncating deeply nested displays of categories and courses at a predetermined depth. My thinking was that perhaps you had some buggy version of PHP which could not distinguish between $CFG->max_category_depth being undefined and being equal to 0. But you have just ruled out this possibility.

The other change I made was to have courses within a category to appear in the sort order chosen in the main display, rather than inflexibly sorted by the order in which the courses are created. I can't imagine why this change might cause the symptoms you describe, but on the off chance that somehow it does, try the following. In course/category.php, change the line

if ($subcategories = get_records("course_categories", "parent", $category->id, "sortorder ASC")) {

to

if ($subcategories = get_records("course_categories", "parent", $category->id)) {

i.e. get rid of the "sortorder ASC" (and the preceding comma). Let me know if this has any effect on your problem.


In reply to Zbigniew Fiedorowicz

Re: Course do not show up

by Zbigniew Fiedorowicz -
I should have added that I am assuming that you are using a development version of Moodle dating from April 1 or later.  If you are using the stable 1.2.1 version of March 25, then my comments/suggestions don't apply.
In reply to Zbigniew Fiedorowicz

Re: Course do not show up

by Mike Hathaway -
I am using 1.2.1 (old habbit I normally install and use last stable and never dev releases of anything)

nuts
In reply to Mike Hathaway

Re: Course do not show up

by Mike Hathaway -
I am going to add the url to my setup. We are not using it yet feel free to create an account and mess with it.
http://ace.fuhsd.org/moodle
If you email me I will give admin privileges or whatever privs you want then once this thing is working delete the accounts.

For everyone that has emailed thanks for your help so far. And I have Read the manuals before posting this