Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting moodle version info, no admin access

Tags:

moodle

Is there a way to obtain version info for a moodle site using only "teacher" level access? It seems as though this ability was removed in versions 1.9.7 and above. I'm trying to automate the process of uploading tests and having the version info would be rather handy.

like image 576
hp43 Avatar asked Jul 18 '12 18:07

hp43


5 Answers

In order to see the current version of moodle you just need to read this file: http://yourmoodlesite/lib/upgrade.txt

Here's more information about it: https://github.com/moodle/moodle/blob/MOODLE_29_STABLE/lib/upgrade.txt

like image 181
mrt Avatar answered Nov 04 '22 12:11

mrt


Sorry, these instructions may seem somewhat obscure, but it's the only way I could find to get the version of Moodle with only "teacher" level access.

As a teacher, you should be able to create a backup of any of your courses (though this capability may have been removed in the Moodle you're using). Backups are just zip files, but instead have a .mbz extension. If you change this extension to .zip, you'll be able to extract the zip. With the zip extracted, open "moodle_backup.xml", in there you should find the "moodle_release" item somewhere near the top, giving you the version of Moodle used to create the backup.

like image 34
edb Avatar answered Nov 04 '22 13:11

edb


The most dirty way to do so when no admin or file access, is doing differs from public files between versions. As example, index.php file can be 1024Kb lenght on v1.x and 1033Kb lenght on version 1.2.

Also, check for existance/non existance of a set of files is a common way (css, html, js, icon, etc)

I will edit this again if i find a specific solution.

First edit: For versions 19 or above, you can check version direcly from readme.txt file at https://github.com/moodle/moodle/blob/MOODLE_19_STABLE/README.txt

like image 41
m3nda Avatar answered Nov 04 '22 12:11

m3nda


Being a TA, I didn't want to mess around with backups which sounds weird but given my unique position, reasonable (to me).

On the implementation of moodle I use, with TA privilege, a link to moodle docs is present at the bottom of the page and if you open this link, it takes you to the moodle docs page with moodle_url/moodle_version/___.

Maybe this is peculiar to my system, but I believe it's a default setting thing.

like image 1
juanho Avatar answered Nov 04 '22 13:11

juanho


If you don't even have an account on the instance, you may still be able to find out the version. Any authentication errors in the API will return an error message of the form:

[{
   "error":true,
   "exception":{
       "message":"Course or activity not accessible.",
       "errorcode":"requireloginerror",
       "link":"https:\/\/moodle.example.com\/",
       "moreinfourl":"http:\/\/docs.moodle.org\/36\/en\/error\/moodle\/requireloginerror"
   }
}]

And the moreinfourl contains an approximate version number (in this case 3.6). For me, this page was requested when I visited the login page for the instance - a POST request to

https://moodle.example.com/lib/ajax/service.php?sesskey=JQrdIcgMn4&info=core_fetch_notifications
like image 1
Amanda Ellaway Avatar answered Nov 04 '22 13:11

Amanda Ellaway