Overriding method in lib/coursecatlib.php

Overriding method in lib/coursecatlib.php

by Hemant Nimbekar -
Number of replies: 0
Hi,

I want to add 'end date' for the courses. I have done below things so far.

 - Showing a end date in add/edit course settings page using custom scripts.
 - Creating a new table for storing the end_date of the course. This table has 3 columns (id, course_id, end_date).
 - Storing the end date in table using custom scripts.
 - Retrieving the end date in course settings page.

Now I want to add the course end date in a course object meaning that when the course(s) are extracted from database. Lets say method "get_courses_records" in "coursecat" class defined in lib/coursecatlib.php file is used to get the courses from database, then I want to change that code in order to get the course end date for the course which is stored in another table. But I can not make the changes in existing core code.

So how can I achieve this?

Thanks in advance!

Regards,
Hemant


Average of ratings: -