Error in PHP - Unsure what to do

Error in PHP - Unsure what to do

by Lisa Nally -
Number of replies: 1

Good morning. I'm using Moodle 1.9 and getting an error. Here's what I am trying to do. When I click Include a Topic Section in Front Page settings and go back to the home page, I get this error message: 

Fatal error: Call to undefined function iscomplete() in /home/seamensc/public_html/course/lib.php on line 1442

I've attached the PHP script file. I'm not sure where the error is. On another site, the code is the exact same and I don't get the error. 

Anyone had this issue before? Can someone help me figure out what the issue is? 

Average of ratings: -
In reply to Lisa Nally

Re: Error in PHP - Unsure what to do

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers

Hi Lisa -

This question really doesn't have anything to do with usability. This was probably a better question for the "General help" discussion.

In any case, Moodle 1.9 has been out of support since July 2012. It will be difficult getting help with it any more.

Looking at the file and line you have mentioned in the code repository, there is no "iscomplete()" function call. I searched that entire file and could not find an occurrence of that call anywhere. I also did a search of the entire 1.9 codebase and could not find any occurrence of the "iscomplete" function.

My guess is that you have made customizations in your code. And somehow you have lost some of those customizations. If you have another site with the same code at that line number, and it is working, then it must still have the customizations you need.

Looking at the attachment you provided, the file has definitely been customized. It looks like it has the old "Activity locking" hack added to it (probably this - https://docs.moodle.org/32/en/Development:Activity_Locking#Table_of_Versions). The function that hack provided has been part of Moodle since some version in Moodle 2. It would be best if you upgraded to a the latest (3.2).

Hope this helps.