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

Upgrading to Moodle 1.6: Difference between revisions

From MoodleDocs
m (→‎See also: link edit)
mNo edit summary
 
(19 intermediate revisions by 10 users not shown)
Line 1: Line 1:
''Note: This page needs some more work.  Please help to improve it!''
{{Moodle 1.6}}This page lists issues specific to upgrading to Moodle 1.6. They should be read in conjunction with the generic [[Upgrading|upgrading instructions]].
{{Moodle 1.6}}
 
Since the changes for the upgrade from Moodle 1.5.x to Moodle 1.6 not only change the database structure, but also the database content (everything is converted to Unicode), some considerations are important before you start.  If you are upgrading a really important site, it will probably be worth doing a test upgrade on a separate copy of your site first just to make sure it goes OK.
Since the changes for the upgrade from Moodle 1.5.x to Moodle 1.6 not only change the database structure, but also the database content (everything is converted to UTF-8), some considerations are important before you start.  If you are upgrading a really important site, it will probably be worth doing a test upgrade on a separate copy of your site first just to make sure it goes OK.


==Check the system requirements==
==Check the system requirements==
Line 8: Line 8:


==Update the Moodle files==
==Update the Moodle files==
Perform a [[Upgrading|normal upgrade]] of your Moodle installation, '''backing up your database first'''.
Perform a [[Upgrading|normal upgrade]] of your Moodle installation, '''[[Upgrading#3._Your_database |backing up your database first]]'''.
Take care to include ALL optional modules you have in your existing installation. Conversion of the data to UTF-8 of these modules will not be possible if you forget this.
Take care to include ALL optional modules you have in your existing installation. Conversion of the data to UTF-8 of these modules will not be possible if you forget this.


==Database migration==
==Database migration==
Although not strictly necessary, it is HIGHLY recomended that you migrate your database to UTF-8 immediately after upgrading.  You'll find the link to do this waiting for you at the top of the admin page.
Although not strictly necessary, it is HIGHLY recomended that you migrate your database to UTF-8 immediately after upgrading.  You'll find the link to do this waiting for you at the top of the admin page. Please see [[Database migration|MySQL database migration]] or [[UTF-8 PostgreSQL|PostgreSQL database migration]] for further details.
 
Some third party modules will not be ready yet for Unicode migration, you'll be warned about these so you have a chance to disable them or seek a later version.
 
If you run your site in one language only, select this option to save a lot of time on the migration. Otherwise, Moodle will figure out how to do the migration for every piece of data based on the language of the user, course and your Moodle site.
 
Since the migration is a process which causes heavy processor and disk load and can take a long time to perform, you should choose the moment of the upgrade carefully.  For an indication, Moodle.org had about 3 million bits of text and took 2.5 hours on a very fast dual-opteron server.
 
During the migration process, you'll see a progress bar which updates every now and then.  Let it go all the way to 100%.  If the migration is interrupted for some reason (browser closed or network failure) don't worry - just wait for a while to make sure the process is finished on the server, and then start the migration again.  The process is smart enough to take up where it left off and you'll see messages about this.
 
The migration process places the Moodle installation in [[Maintenance mode|maintenance mode]], so non-admins cannot login.  Once you start the migration it needs to finish all the way before the installation can be used by others.


==Languages==
==Languages==
Line 38: Line 28:


If you use the langlist variable on the config variables page, don't forget to change the language names from xx to xx_utf8 or the languages will not be shown in the language drop down menu.
If you use the langlist variable on the config variables page, don't forget to change the language names from xx to xx_utf8 or the languages will not be shown in the language drop down menu.
IMPORTANT: There is a bug in 1.6 and 1.6.1 that blocks the locales specified in language packs. Workaround is to override locale for all languages by setting it in Administration >> Configuration >> Variables >> locale. You can find suitable values in the [[Table of locales]] (en.UTF-8 , es_ES.UTF-8,...). If you are using 1.6.1+ and later the correct value is usually empty field.


===Localisations of existing language packs===
===Localisations of existing language packs===
Line 47: Line 39:
Custom made new language packs go in ''moodledata/lang''. They have to be in a xx_utf8 folder and MUST be UTF-8 encoded (Unicode).  We no longer support other encodings, especially when mixed with UTF-8 packs.
Custom made new language packs go in ''moodledata/lang''. They have to be in a xx_utf8 folder and MUST be UTF-8 encoded (Unicode).  We no longer support other encodings, especially when mixed with UTF-8 packs.


If you are using custom language packs before the UTF-8 migration, please remember that they need to include either 1) thischarset or 2) parentlanguage in their moodle.php. Please also rename them from xx to xx_utf8 after the migration. You might need to convert the custom packs into UTF-8 format before using them in a migrated Moodle 1.6.
If you are using custom language packs before the UTF-8 migration, please remember that they need to include either 1) thischarset or 2) parentlanguage in their moodle.php. Please also rename them from xx to xx_utf8 after the migration. You might need to convert the custom packs into UTF-8 format before using them in a migrated Moodle 1.6.


Line 54: Line 45:
If you want to download all the languages at once, we suggest checking the whole lang directory out directly from CVS into your ''moodledata/lang'' directory.
If you want to download all the languages at once, we suggest checking the whole lang directory out directly from CVS into your ''moodledata/lang'' directory.


   cvs -z3 -d:ext:myusername@moodle.cvs.sourceforge.net:/cvsroot/moodle co lang
   cvs -z3 -d:ext:myusername@YOURMIRROR.cvs.moodle.org:/moodle co lang
 
You have to replace 'YOURMIRROR' with the two-letters cocde of a Moodle CVS mirror. Have a look at the [[CVS for Administrators#CVS Servers | list of mirrors]] to find the best one for you.


This is the recommended method for translators, as you can edit these packs within Moodle and just check them straight back into CVS.
This is the recommended method for translators, as you can edit these packs within Moodle and just check them straight back into CVS.
Line 65: Line 58:


*[[Translation]] - More details on language packs in 1.6, especially customized packs
*[[Translation]] - More details on language packs in 1.6, especially customized packs
*[[Converting files to UTF-8]] - General text on how to convert files, like non-standard language packs, to UTF-8
Using Moodle forum discussions:
Using Moodle forum discussions:
*[http://moodle.org/mod/forum/discuss.php?d=39153 utf-8 and mysql]
*[http://moodle.org/mod/forum/discuss.php?d=39153 utf-8 and mysql]
Line 70: Line 65:
*[http://moodle.org/mod/forum/discuss.php?d=43527 Local language modifications]
*[http://moodle.org/mod/forum/discuss.php?d=43527 Local language modifications]
*[http://moodle.org/mod/forum/discuss.php?d=46900 Language packs and migration to UTF-8]
*[http://moodle.org/mod/forum/discuss.php?d=46900 Language packs and migration to UTF-8]
*[http://moodle.org/mod/forum/discuss.php?d=49668 Is there now only one local language pack allowed?]


[[Category:Administrator]]
[[Category:Administrator]]
[[Category:Installation]]
[[Category:Installation]]


[[es:Actualización de moodle 1.6]]
[[es:Actualización a moodle 1.6]]
[[fr:Mise à jour à Moodle 1.6]]
[[fr:Mise à jour à Moodle 1.6]]
[[ja:Moodle1.6へのアップグレード]]
[[zh:升级到Moodle 1.6]]

Latest revision as of 13:29, 24 June 2008

Moodle1.6

This page lists issues specific to upgrading to Moodle 1.6. They should be read in conjunction with the generic upgrading instructions.

Since the changes for the upgrade from Moodle 1.5.x to Moodle 1.6 not only change the database structure, but also the database content (everything is converted to UTF-8), some considerations are important before you start. If you are upgrading a really important site, it will probably be worth doing a test upgrade on a separate copy of your site first just to make sure it goes OK.

Check the system requirements

Go to Administration >> Environment (in recent versions of Moodle 1.5) and choose Moodle 1.6 ;-) You will get a report of whether your server specs meet the requirements for Moodle 1.6 and what needs to be done. Basically you need PHP 4.3.0 or later (for PHP5, version 5.1.0 or later is required), and MySQL 4.1.16 or later (4.1.12 is ok if your site is latin-only) or PostgreSQL. Native iconv support in PHP will really speed things up too (it needs to be specified during compilation) but is not required.

Update the Moodle files

Perform a normal upgrade of your Moodle installation, backing up your database first. Take care to include ALL optional modules you have in your existing installation. Conversion of the data to UTF-8 of these modules will not be possible if you forget this.

Database migration

Although not strictly necessary, it is HIGHLY recomended that you migrate your database to UTF-8 immediately after upgrading. You'll find the link to do this waiting for you at the top of the admin page. Please see MySQL database migration or PostgreSQL database migration for further details.

Languages

An entirely new interface for languages has been designed. By default, Moodle only contains one language (English), and you need to install all the language packs you need individually. The new interface makes this easy - it will download them for you from moodle.org and install them in your data directory.

After the migration of the database, you may go to Administration >> Configuration >> Language and follow the Language import utility link. You may select the desired language packs on the right pane and install them directly. Updating the language packs can now easily be done by following the update link.

Take care to use always a language pack that matches your database content:

  • Upgraded installations: first database migration, then UTF-8 language packs
  • New 1.6 installations: you will immediately use UTF-8 language packs

You will not find the en_utf8 language pack in your moodledata/lang folder. It is in the moodle/lang folder and is not to be modified at all. It should never be upgraded, since it is part of the installation. All other language packs, even modifications for the en language pack go in the moodledata/lang folder (and are in the case of the en language pack called en_utf8_local or en_xx_utf8 but then with parent language string in moodle.php)

If you use the langlist variable on the config variables page, don't forget to change the language names from xx to xx_utf8 or the languages will not be shown in the language drop down menu.

IMPORTANT: There is a bug in 1.6 and 1.6.1 that blocks the locales specified in language packs. Workaround is to override locale for all languages by setting it in Administration >> Configuration >> Variables >> locale. You can find suitable values in the Table of locales (en.UTF-8 , es_ES.UTF-8,...). If you are using 1.6.1+ and later the correct value is usually empty field.

Localisations of existing language packs

Localisations of an existing xx_utf8 language pack should be called xx_utf8_local, should be UTF-8 encoded and should also be put in the moodledata/lang folder. It is still possible to give it another name like xx_mypack_utf8, but then you should add the parentlanguage string in moodle.php from your localisation.

Custom language packs

Custom made new language packs go in moodledata/lang. They have to be in a xx_utf8 folder and MUST be UTF-8 encoded (Unicode). We no longer support other encodings, especially when mixed with UTF-8 packs.

If you are using custom language packs before the UTF-8 migration, please remember that they need to include either 1) thischarset or 2) parentlanguage in their moodle.php. Please also rename them from xx to xx_utf8 after the migration. You might need to convert the custom packs into UTF-8 format before using them in a migrated Moodle 1.6.

Advanced languages

If you want to download all the languages at once, we suggest checking the whole lang directory out directly from CVS into your moodledata/lang directory.

 cvs -z3 -d:ext:myusername@YOURMIRROR.cvs.moodle.org:/moodle co lang

You have to replace 'YOURMIRROR' with the two-letters cocde of a Moodle CVS mirror. Have a look at the list of mirrors to find the best one for you.

This is the recommended method for translators, as you can edit these packs within Moodle and just check them straight back into CVS.

Finishing up

Congratulations! After migrating your database and updating your languages you should have a functional 1.6 site. You'll probably want to visit the various admin pages (especially Variables) to turn some of the features on and off.

See also

  • Translation - More details on language packs in 1.6, especially customized packs
  • Converting files to UTF-8 - General text on how to convert files, like non-standard language packs, to UTF-8

Using Moodle forum discussions: