Overwritten Core Files

Overwritten Core Files

by Otto Borden -
Number of replies: 1

Earlier I was installing Activity Locking onto a Moodle installation that is in the same folder as another Moodle installation(they are not the same versions -- 1.9.7 and 1.9.10+). I put the files into the wrong folder and overwrote the following files with the versions contained in Activity Locking for 1.9.5:

lib/moodlelib.php

course/lib.php

course/format/topics/format.php

course/format/weeks/format.php

Now when I try to view a course I get the following error:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/transi9/public_html/excelncollege.com/moodle/course/view.php on line 10

How should I go about fixing this??? Any help is greatly appreciated, this is a very important thing I have messed up.

Average of ratings: -
In reply to Otto Borden

Re: Overwritten Core Files

by Sean Farrell -

Hi Otto,

You seem to be trying to recover old versions of moodle system files to make your site work again, without upgrading.

You could use the moodle.org git repository web interface, select view by 'tree', to look at it from a filesystem perspective instead of a list of changes.

http://git.moodle.org/gw?p=moodle.git;a=tree

Find the file that you are after, then select "history", for example for course/lib.php this would be:

http://git.moodle.org/gw?p=moodle.git;a=history;f=course/lib.php;h=101f73f98a556c5059ec86446cc21304c53063ae;hb=HEAD

This shows a list of the various versions of the file over time, and I think you can view a copy of the file at a selected point in history by selecting 'blob', and then get the raw file by selecting "raw".  File / Save as... and repeat a few times.

Hopefully that should get you back in business again.

--
Sean Farrell
Edinburgh