Object : Re: Course Category Count Error (Damien contribution) Hello,
I saw the problem of Category Count Error. I agree it would be much better to see in parent categories the total of courses included in subcategories. As I didn't see any reaction here, I decided to look inside the code.
Here is my contribution. Please find here attached the \doceboLms\lib\lib.course.php file I changed to get the following result. (see attachment link on top right)
Main category ---- Category 1 (course content (3)) -----Category 2 (course content (1)) -----Course (a)
-----Category 3 (course content (2)) -----Course (b) ------Course (c)
You can imagine all possible organization of your courses and parent categories will always show total courses including itself + all sub categories.
I also suggest you change using the administration panel, menu "Principal or Main', 'languages" in leaarning management system, module course, the key _category_empty message to suggest visitors visiting subcategories instead of having "no course in this category" message.
For thoose who want to have a look into the code, look the enclosed file under Notpad++ or any other editor from line 947 to 535. I made some comment to help.
Before copying the enclosed file to your ftp server, please rename old file and keep a copy. But all tests I made were successful.
I suggest developers to test and publish it or adapt. ( I precise I'm not a developer, I just have some basic knowledge)
Enjoy !
Damien
Message modified by : Damien on : 10/01/2007 20:00 |