This might stem from how it was originally installed via git ...
If I re-call correctly, using:
git clone -b MOODLE_2X_STABLE git://git.moodle.org/moodle.git
restricted me to the 2X version and I had issues in tracking higher versions.
I've never seen:
Mfilter/algebra/algebra2tex.pl
Mfilter/tex/mimetex.darwin
Mfilter/tex/mimetex.freebsd
Mfilter/tex/mimetex.linux
Mlib/editor/tinymce/lib.php
and looks like git branch -a is seeing something weird.
So here's a work-around to try before going through a restore process:
In this example, CentOS ... which has /var/www/ as the Apache root. Document root is html and where the moodle code lies. You adjust for your OS.
As root user:
cd /var/www/
git clone git://git.moodle.org/moodle.git htmlgit
This creates (clones into) the 'htmlgit' directory while acquiring Moodle code.
cd htmlgit
git branch -a
should show:
* master
remotes/origin/HEAD -> origin/master
remotes/origin/MOODLE_13_STABLE
remotes/origin/MOODLE_14_STABLE
remotes/origin/MOODLE_15_STABLE
remotes/origin/MOODLE_16_STABLE
remotes/origin/MOODLE_17_STABLE
remotes/origin/MOODLE_18_STABLE
remotes/origin/MOODLE_19_STABLE
remotes/origin/MOODLE_20_STABLE
remotes/origin/MOODLE_21_STABLE
remotes/origin/MOODLE_22_STABLE
remotes/origin/MOODLE_23_STABLE
remotes/origin/MOODLE_24_STABLE
remotes/origin/MOODLE_25_STABLE
remotes/origin/MOODLE_26_STABLE
remotes/origin/MOODLE_27_STABLE
remotes/origin/MOODLE_28_STABLE
remotes/origin/MOODLE_29_STABLE
remotes/origin/master
We want to set to this htmlgit directory to the version you currently have (2.7.x)
git branch --track MOODLE_27_STABLE origin/MOODLE_27_STABLE
it should show:
Branch MOODLE_27_STABLE set up to track remote branch MOODLE_27_STABLE from origin.
Now we check it out:
git checkout MOODLE_27_STABLE
It should now say:
Your branch is up-to-date with 'origin/MOODLE_27_STABLE'.
Check the version file:
fgrep '$release' version.php
It should show:
$release = '2.7.9 (Build: 20150706)'; // Human-friendly version name
Now the "tricky part" ...
Code directory is /var/www/html/ in this example and where the messed up .git resides.
cd /var/www/html/
mv .git ../
That moves the hidden .git directory up one level and out of the code directory.
cp config.php ../
We are 'archiving' a copy of config.php file up one level.
cd /var/www/htmlgit/
cp -rp * ../html/
This should copy recursively and preserve ownership/permissions which well change ALL files/folders up one level and into the html directory where the moodle code should reside.
Then one more:
cp -rp .git ../html/
That copies recursively the hidden .git directory into the directory where moodle code resides.
cd /var/www/html/
chown apache:apache
Check to make sure your config.php file is there still.
ls -l config.php
If ok, then, we make sure it has current files for 27. This might be redundant and un-necessary, but just making sure:
git pull
Check version:
fgrep '$release' version.php
git branch -a should show:
* MOODLE_27_STABLE
master
remotes/origin/HEAD -> origin/master
Then we'll make sure the DB is updated also:
php admin/cli/upgrade.php --non-interactive
If all is ok to this point, then we'll now move it to 2.9.
cd /var/www/html/
git branch --track MOODLE_29_STABLE origin/MOODLE_29_STABLE
git checkout MOODLE_29_STABLE
should show:
Switched to branch 'MOODLE_29_STABLE'
Your branch is up-to-date with 'origin/MOODLE_29_STABLE'.
and a git branch -a shows
MOODLE_27_STABLE
* MOODLE_29_STABLE
master
and a fgrep '$release' version.php
$release = '2.9.1 (Build: 20150706)'; // Human-friendly version name
Now upgrade
php admin/cli/upgrade.php --non-interactive
change ownership's
chown apache:apache * -R
Now we try the web browser. ;)
If everything works clean up the stuff we used to re-acquire ... including the htmlgit directory so it won't confuse later.
'spirit of sharing', Ken