Does anyone know how to display on the top level categories only in the course categories block in version 1.5 . I can find a button, and I can't find the code either. Suggestions.
You can set the following in config.php
$CFG->max_category_depth = 1;
Hope this helps
Thanks, but that makes everything a Top Level Category, and I am trying to keep the other level categories but only show the top level category. I believe the field name / variable is "parent", but I am not sure where to put in the code. I came into a situation that has code added to it, but the code is poorly documented. It seems like the parent category should be equal to zero, but I can't figure out where to edit that in our lines of code?
Sorry you lost me there. The setting restricts display to Top Level categories. if set to 2 it will show top and second level. I do not see how it can change the level of all of the categories to become top.
If your code has been changed from standard then it could be that the way things are displayed has changed to stop this.
Well, that is possible. We have had a few problems with this in the past, and we are currently working upon upgrading soon so perhaps I can check that in 1.6. At times it seems like we some spaghetti code happening, and I cannot verify the previous logic because it was uncommented etc. Your original code is obvious and well documented, but these additions are were made before I came in on this project. Thanks for your help, but I did change the depth setting and it displayed everything as a top_level category.