Aggiornamento: differenze tra le versioni

Da MoodleDocs.
Riga 41: Riga 41:
Prima di aggiornare il sito, occorre metterlo in [[Manutenzione|modalità manutenzione]] per impedire agli utenti non Amministratori di accedere. Inoltre, prima di procedere, è necessario attendere il completamento dei processi cron in esecuzione.
Prima di aggiornare il sito, occorre metterlo in [[Manutenzione|modalità manutenzione]] per impedire agli utenti non Amministratori di accedere. Inoltre, prima di procedere, è necessario attendere il completamento dei processi cron in esecuzione.


== Install the new Moodle software ==
== Installare il nuovo software Moodle ==
You can fetch the current version of the software through
Recuperare la versione attuale del software da:


wget http://sourceforge.net/projects/moodle/files/Moodle/stable{{Version2}}/moodle-latest-{{Version2}}.tgz
wget http://sourceforge.net/projects/moodle/files/Moodle/stable{{Versione}}/moodle-latest-{{Versione}}.tgz


=== Standard install package ===
=== Standard install package ===

Versione delle 09:44, 16 dic 2018

Attenzione: Pagina in costruzione


Nota: Questa pagina spiega in dettaglio come aggiornare Moodle. Per un riepilogo del processo, consultare Panoramica sull'aggiornamento.


Controllare i requisiti

Verificare che il server soddisfi tutti i requisiti per Moodle 3.5 in Amministrazione del sito > Server > Ambiente.

Consultare (EN) Release notes nei documenti di sviluppo per i requisiti del software.

Nota:
  • È possibile eseguire l'upgrade a Moodle 3.5 da Moodle 3.1 o versioni successive. Se si esegue l'aggiornamento da versioni precedenti, è necessario prima eseguire l'aggiornamento alla (EN) versione 3.1.
  • La versione minima di PHP è la 7.0.0.
  • L'estensione PHP intl è richiesta da Moodle 3.4 (in precedenza era solo raccomandata).


Prima dell'aggiornamento

Consigliamo di testare l'upgrade prima su una COPIA del sito di produzione, per assicurarsi che funzioni come previsto.

Eventualmente, impostare la Chiave di aggiornamento per il sito.

Backup di dati importanti

Ci sono tre aree che dovrebbero essere sottoposte a backup prima di qualsiasi aggiornamento:

  1. Software Moodle (ad esempio, tutto ciò che si trova in server/htdocs/moodle)
  2. File Moodle caricati (ad esempio, server/moodledata)
  3. Database Moodle (ad esempio, il dump del database Postgres o MySQL)

Consultare Backup del sito per informazioni più specifiche.

Controllare gli aggiornamenti dei plugin

Se il Controllo automatico degli aggiornamenti è abilitato, sarà possibile aggiornare automaticamente i plugin installati durante l'aggiornamento. Controllare gli aggiornamenti disponibili (dal pulsante Controlla gli aggiornamenti) nella schermata Panoramica plugin in Amministrazione del sito.

Se si aggiornano i plugin manualmente, controllare nella (EN) Directory dei plugin di Moodle se è disponibile una versione 3.5 per tutti i plugin (inclusi i temi) precedentemente installati sul sito. Se presenti, scaricare il pacchetto del plugin, copiarlo nella posizione appropriata del codice Moodle. Consultare Installare plugin.

L'aggiornamento del plugin avverrà quindi come parte del processo di aggiornamento di Moodle.

Se un plugin obsoleto impedisce l'aggiornamento, in genere è possibile eliminare il codice del plugin piuttosto che disinstallarlo da Moodle in modo che i dati ad esso associati non vengano cancellati.

Mettere il sito in modalità manutenzione

Prima di aggiornare il sito, occorre metterlo in modalità manutenzione per impedire agli utenti non Amministratori di accedere. Inoltre, prima di procedere, è necessario attendere il completamento dei processi cron in esecuzione.

Installare il nuovo software Moodle

Recuperare la versione attuale del software da:

wget http://sourceforge.net/projects/moodle/files/Moodle/stable3.5/moodle-latest-3.5.tgz

Standard install package

  1. Move your old Moodle software program files to another location. Do NOT copy new files over the old files.
  2. Unzip or unpack the upgrade file so that all the new Moodle software program files are in the location the old files used to be in on the server. Moodle will adjust SQL and moodledata if it needs to in the upgrade.
  3. Copy your old config.php file back to the new Moodle directory.
  4. As mentioned above, if you had installed any plugins on your site you should add them to the new code tree (Moodle directory structure) now. It is important to check that you get the correct version for your new version of Moodle. Be particularly careful that you do not overwrite any code in the new version of Moodle and that you place the plugin folders in the correct directory (the same directory that they are in in the current installation.)
  5. Your moodledata folder should be located separately to your Moodle code folder and, as such, should not need anything done to it. Moodle 3.0 will throw a warning if it is located in a web accessible folder and the moodledata should never be located in the Moodle code folder. If you are moving your installation to a new server or new location on your server, then you will need to follow the Migration documents.

Linux

mv moodle moodle.backup
tar xvzf moodle-Template:Version.tgz

Next, copy across your config.php, any custom plugins, and your .htaccess file if you created one (check that custom plugins are the correct version for your new Moodle first):

cp moodle.backup/config.php moodle
cp -pr moodle.backup/theme/mytheme moodle/theme/mytheme
cp -pr moodle.backup/mod/mymod moodle/mod/mymod

Don't forget to make moodle/config.php (and the rest of the source code) readable by your www server. Ideally the files should not be writeable by your server.

chown -R www-data:www-data moodle (Linux debian - change to appropriate user and group for your OS version) chmod -R 755 moodle

If you use cron, take care that cron.php is executeable and uses the correct php command:

chmod 740 admin/cli/cron.php (some configurations need chmod 750 or chmod 755)
copy the first line from cron.php (if it looks like '#!/usr/local/bin/php' or '#!/usr/local/bin/php5.3', no need to copy '<?php') 

if necessary. However, for a simple upgrade, there should be no need to change anything with cron.

Using Git

You can use Git for updating or upgrading your Moodle. See Git for Administrators for details.

Command line upgrade

On Linux servers, Moodle Template:Version supports running the upgrade from the command line, rather than through a web browser. This is likely to be more reliable, particularly for large sites.

Finishing the upgrade

The last step is to trigger the upgrade processes within Moodle.

If you put your site into Maintenance mode earlier; take it out now!

To do this just go to Administration > Site administration > Notifications.

Moodle will automatically detect the new version and perform all the SQL database or file system upgrades that are necessary. If there is anything it can't do itself (very rare) then you will see messages telling you what you need to do.

Assuming all goes well (no error messages) then you can start using your new version of Moodle and enjoy the new features!

Note: If you are running multiple servers then you should purge all caches manually (via Administration > Site administration > Development > Purge all caches) after completing the upgrade on all servers.

Fatal error: Maximum execution time of 30 seconds exceeded...

If your server uses a main language other than English, you may encounter a 'Fatal error: Maximum execution time of 30 seconds exceeded' when you try to upgrade it. You can increase max_execution_time = 160 on php.ini to allow the scripts enough time to process the language update. Otherwise, you can switch to English as the default language before doing the upgrade and back to your original language after a succcessful upgrade. See the forum discussion at https://moodle.org/mod/forum/discuss.php?d=119598.

After upgrading

The config.php file from your installation should work fine but if you take a look at config-dist.php that came with Moodle 3.0 there are more/different options available (e.g. database drivers and settings). It's a good idea to map your old config.php settings to a new one based on the 3.0 config-dist.php.

Cron

Cron has received a major update (MDL-25499) and now has support for both scheduled and ad hoc tasks.

The benefits of these changes are:

  • The schedule for every task can be configured by the admin
  • Tasks can run in parallel
  • Cron processes use locking to prevent the same task running at the same time by different processes
  • Clusters with multiple identical application nodes are supported, you can run cron on all of them

A result of this is that cron can be run much more often, which means (for example) forum posts can be sent out sooner. To take advantage of the new cron system it is now strongly recommended that administrators increase the frequency that cron is run to at least once per minute.

You also may need to modify any automated scripts you have that are parsing the output from cron. It is no longer possible to simply monitor the output of cron for the string "Cron script completed correctly" (if that is what you were doing). An alternative is to monitor the output for the string "task failed:". If you detect that a task is failing, here are some tips for debugging the failure.

Before the upgrade, there may have been a cron task that was failing, which was preventing the rest of cron from being executed. A failure in any single task will no longer prevent the rest of the Moodle cron tasks from executing, so you may uncover previously masked bugs. It is a good idea to closely monitor the output from cron after the upgrade.

Assignments

The old assignment (2.2) module has been removed from core and has been replaced by a stub to support transparently remapping URLs and restoring course backups from the old module to the new one.

If you are still using the old assignment (2.2) module, after upgrading to Moodle 3.0 all assignment (2.2) activities will be hidden. You need to run the Assignment upgrade tool to un-hide the activities.

If you really, really need to keep using the old assignment (2.2) module, you should update the code to Moodle 3.0, and then replace the "mod/assignment" folder with the one from https://github.com/moodlehq/moodle-mod_assignment/releases before completing the upgrade.

Possible issues that may affect you in Moodle Template:Version

  • Moodle presets have changed. Most of the Bootstrap 4 variables have changed and the way bootstrap, font awesome and core scss is included. For more info on the Bootstrap 4 changes visit https://getbootstrap.com/docs/4.0/migration/

// Example code, place scss variables here. // $font-size-base: 0.9375rem

// Import FontAwesome. @import "fontawesome";

// Import All of Bootstrap. @import "bootstrap";

// Import Core moodle CSS. @import "moodle";

// Example code, place scss using Bootstrap mixins and extends here. // .navbar { // @include shadow(); // }

  • The PostgreSQL driver has been improved and, now, the get_recordset_xxx() operations don't fetch all the records into memory for big (>100000) datasets. This can be configured or disabled using the new fetchbuffersize dboption. Note this is known to affect installations using pg_bouncer in transaction mode. See MDL-60174 for more information.

See also the list of issues fixed in Moodle 3.5 which are labelled ui_change.

Moodle 3.1, 3.2, 3.3 and 3.4 improvements

Depending on which version you are upgrading from, please see the section 'Possible issues that may affect you' in the documentation

See also