Something a little odd in the /course/lib.php file....

Something a little odd in the /course/lib.php file....

by Colin Fraser -
Number of replies: 2
Picture of Documentation writers Picture of Testers

In the General Forum I looked at this question: 

Creating an expiry date for courses

And I was surprised to see that the end date for courses had been removed. Looking at the code, to see if it was still there, but inactive, I found this in the "/course/lib.php" file:

a change of colour 

Did a search on the word "date" and this is really odd. I obviously have strings encoded to colourize, as default, but I do not understand why the code is displaying as it is. This continues until Line 357, when it reverts to its normal state. As a test, I removed the two double quote marks from line 217, and it reverted to what I would have thought to be normal display of PHP code, put the quotes back and it does this again. 

I wasn't expecting this, and I do not know enough about the code to make any sort of assessment - but it does not look right. 

Anyway, to get back to my point, the removal of the enddate in courses? I would have thought that many Institutes and business operations would have required an enddate, for a variety of reasons. There used to be one, but that seems to have been removed. I looked in the mdl_course table and saw there was no enddate field, but I am sure I recall one in an earlier version of the Moodle database in the same table. 

Can anyone please enlighten me as to what is happening with the code, and is the enddate likely to reappear? 

Average of ratings: -
In reply to Colin Fraser

Re: Something a little odd in the /course/lib.php file....

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

As far as I am aware, course start/end dates only ever affected the enrolment settings (i.e. all enrolments expired when the end date was reached).

This functionality has, therefore, been moved inside the enrolment plugins (which also gives the possibility of defining different start / end dates for different groups of students, by having different enrolment instances enabled).


Average of ratings: Useful (1)
In reply to Davo Smith

Re: Something a little odd in the /course/lib.php file....

by Colin Fraser -
Picture of Documentation writers Picture of Testers

Thanks Davo, that sounds a lot more reasonable than just disappearing a course.