Note: You are currently viewing documentation for Moodle 2.2. Up-to-date documentation for the latest stable version is available here: Moodle version.

Moodle version: Difference between revisions

From MoodleDocs
m (+cat, right align)
(see also tracker issue link)
 
(13 intermediate revisions by 7 users not shown)
Line 1: Line 1:
[[Image:MoodleVersionPopup.jpg|Version popup over Moodle logo|right]]
{{Managing a Moodle site}}[[Image:moodleversion.png|thumb|Moodle version with (build number) and copyright]]
Often one sees references to differences in different Moodle versions. How can one see which version is on a certain site?
The version of Moodle which your site is using can be found if you login as an administrator and go to ''Settings > Site administration > Notifications''.
 
For a list of all past Moodle versions, see [[:dev:Releases]].
 
==Version.php file==
Your exact Moodle version may be obtained by viewing the file ''moodle/version.php'' in a text editor. Here is a typical ''version.php'':
 
<pre>
<?php
 
// MOODLE VERSION INFORMATION
 
// This file defines the current version of the core Moodle code being used.
// This is compared against the values stored in the database to determine
// whether upgrades should be performed (see lib/db/*.php)
 
    $version = 2007101580.00; // YYYYMMDD      = date of the 1.9 branch (don't change)
                              //        X    = release number 1.9.[0,1,2,3,4,5...]
                              //          Y.YY = micro-increments between releases
 
    $release = '1.9.8+ (Build: 20100512)';    // Human-friendly version name
 
?>
</pre>
 
Note: You cannot view the contents of version.php in your browser - you must use a text editor.
 
== Discovering Version programmatically ==
 
The above variables are copied into the $CFG global object. If you are writing custom code for Moodle you can access $CFG->version and $CFG->release.
 
==See also==
 
* MDL-26852 No way provided for users to determine Moodle build information


On a Moodle site's homepage, hover the mouse over the Moodle logo and you'll see the version:
[[Category:FAQ]]
[[Category:FAQ]]

Latest revision as of 07:42, 9 March 2012

Moodle version with (build number) and copyright

The version of Moodle which your site is using can be found if you login as an administrator and go to Settings > Site administration > Notifications.

For a list of all past Moodle versions, see dev:Releases.

Version.php file

Your exact Moodle version may be obtained by viewing the file moodle/version.php in a text editor. Here is a typical version.php:

<?php

// MOODLE VERSION INFORMATION

// This file defines the current version of the core Moodle code being used.
// This is compared against the values stored in the database to determine
// whether upgrades should be performed (see lib/db/*.php)

    $version = 2007101580.00; // YYYYMMDD      = date of the 1.9 branch (don't change)
                              //         X     = release number 1.9.[0,1,2,3,4,5...]
                              //          Y.YY = micro-increments between releases

    $release = '1.9.8+ (Build: 20100512)';     // Human-friendly version name

?>

Note: You cannot view the contents of version.php in your browser - you must use a text editor.

Discovering Version programmatically

The above variables are copied into the $CFG global object. If you are writing custom code for Moodle you can access $CFG->version and $CFG->release.

See also

  • MDL-26852 No way provided for users to determine Moodle build information