Как обновить moodle на ubuntu

Обновлено: 06.07.2024

Before upgrading, check that your server meets all requirements for 3.11 in Site administration > Server > Environment.

See the release notes in the dev docs for both server and client software requirements.

  • You can only upgrade to Moodle 3.11 from Moodle 3.6 or later. If upgrading from earlier versions, you must upgrade to 3.6 as a first step.

Before upgrading

We advise that you test the upgrade first on a COPY of your production site, to make sure it works as you expect.

Consider setting the upgrade key for your site.

Backup important data

There are three areas that should be backed up before any upgrade:

  1. Moodle software (For example, everything in server/htdocs/moodle)
  2. Moodle uploaded files (For example, server/moodledata)
  3. Moodle database (For example, your Postgres or MySQL database dump)

See Site backup for more specific information.

Check for plugin updates

If you have Automatic updates deployment enabled, you will be able to update installed plugins automatically during the upgrade. Just make sure you check for available updates (via the button for it) at the Plugins check screen.

If you are updating plugins manually, it is a good moment now to check in the Moodle Plugins directory whether there is a 3.11 version available for any plugins (including themes) that you have previously installed on your site. If so, download the plugin package. In the next step, you will copy it to the appropriate location in your Moodle code (see Installing plugins).

The upgrade of the plugin will then happen as part of the Moodle upgrade process.

If an out-of-date plugin causes your upgrade to fail, you can usually delete the plugin code rather than uninstalling it from within Moodle so that the data associated with it is not deleted.

Put your site into maintenance mode

Before you begin upgrading your site, you should put it into maintenance mode to stop any non-admin users from logging in. Then you should wait for any currently running cron processes to complete before proceeding.

Install the new Moodle software

You can download the latest release from Moodle downloads.

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

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):

Don't forget to make moodle/config.php (and the rest of the source code) readable by your www server. For maximum security the files should not be writeable by your server. This is especially important on a 'production' server open to the public internet.

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

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 3.11 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 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 Site administration > Development > Purge all caches) after completing the upgrade on all servers.

Fatal error: Maximum execution time of 30 seconds exceeded.

After upgrading

Possible issues that may affect you in Moodle 3.11

Please add items here.

Activity dates and completion conditions can be shown on the course page

Activity dates and/or activity completion conditions can be shown below each activity on the course page, with a line after each activity. See Using Activity completion for details.

You can choose to not show activity dates and completion conditions on the course page by setting 'Show activity dates' and 'Show activity completion conditions' to No in the course settings. If both are set to No, then the lines after each activity will disappear.

Default values for these settings may be set in Site administration / Courses / Course default settings.

New user tours

Moodle 3.11 has four new user tours, two for teachers and two for students, each consisting of one step, highlighting new features. If desired, they can be disabled in Site administration / Appearance / User tours.

New capabilities in Moodle 3.11

  • block/accessreview:addinstance
  • block/accessreview:view
  • mod/quiz:viewoverrides
  • moodle/contentbank:viewunlistedcontent
  • tool/brickfield:viewcoursetools
  • tool/brickfield:viewsystemtools

Moodle 3.6, 3.7, 3.8, 3.9 and 3.10 improvements

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

Before upgrading, check that your server meets all requirements for 3.9 in Site administration > Server > Environment.

See the release notes in the dev docs for both server and client software requirements.

  • You can only upgrade to Moodle 3.9 from Moodle 3.5 or later. If upgrading from earlier versions, you must upgrade to 3.5 as a first step.

Before upgrading

We advise that you test the upgrade first on a COPY of your production site, to make sure it works as you expect.

Consider setting the upgrade key for your site.

Backup important data

There are three areas that should be backed up before any upgrade:

  1. Moodle software (For example, everything in server/htdocs/moodle)
  2. Moodle uploaded files (For example, server/moodledata)
  3. Moodle database (For example, your Postgres or MySQL database dump)

See Site backup for more specific information.

Check for plugin updates

If you have Automatic updates deployment enabled, you will be able to update installed plugins automatically during the upgrade. Just make sure you check for available updates (via the button for it) at the Plugins check screen.

If you are updating plugins manually, it is a good moment now to check in the Moodle Plugins directory whether there is a 3.9 version available for any plugins (including themes) that you have previously installed on your site. If so, download the plugin package. In the next step, you will copy it to the appropriate location in your Moodle code (see Installing plugins).

The upgrade of the plugin will then happen as part of the Moodle upgrade process.

If an out-of-date plugin causes your upgrade to fail, you can usually delete the plugin code rather than uninstalling it from within Moodle so that the data associated with it is not deleted.

Put your site into maintenance mode

Before you begin upgrading your site, you should put it into maintenance mode to stop any non-admin users from logging in. Then you should wait for any currently running cron processes to complete before proceeding.

Install the new Moodle software

You can download the latest release from Moodle downloads.

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

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):

Don't forget to make moodle/config.php (and the rest of the source code) readable by your www server. For maximum security the files should not be writeable by your server. This is especially important on a 'production' server open to the public internet.

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

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 3.9 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 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 Site administration > Development > Purge all caches) after completing the upgrade on all servers.

Fatal error: Maximum execution time of 30 seconds exceeded.

After upgrading

Possible issues that may affect you in Moodle 3.9

Course overview improvements

New course overview settings enable an admin to

  • reduce the currently available layouts (Card, List and Summary)
  • specify which filter options are available, including providing a custom filter which uses course custom field values

Course request changes

The capabilities moodle/course:request and moodle/site:approvecourse may now be applied in the category context.

Removed functionality

  • The Community finder block and course-sharing functionality have been removed as part of the preparations for the new MoodleNet open social media platform.
  • The People block has been removed because there is a Participants link in the navigation drawer (Boost theme) and in the navigation block (Classic theme).

New capabilities in Moodle 3.9

  • forumreport/summary:view
  • forumreport/summary:viewall
  • mod/forum:exportforum
  • mod/forum:grade
  • atto/h5p:addembed
  • moodle/h5p:deploy
  • moodle/h5p:setdisplayoptions
  • moodle/h5p:updatelibraries

Moodle 3.5, 3.6, 3.7 and 3.8 improvements

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

как обновить moodle до новой версии

Так как же обновить систему до новой версии на удаленном сервере через web, вот вам краткая инструкция.

Проверьте требования

проверка сервера moodle

Убедитесь, что ваш сервер отвечает всем требованиям для версии 3.11 в разделе Администрирование> Сервер> Среда (версии ПО).

Вы можете перейти только на Moodle 3.11 только с Moodle 3.6 или более поздней версии. При обновлении с более ранних версий в качестве первого шага необходимо выполнить обновление до версии 3.6.

Перед обновлением

Советую вам сначала протестировать обновление на копии вашего сайта, чтобы убедиться, что он работает корректно.

Рассмотрите возможность установки ключа обновления для вашего сайта.

Ключ обновления

Защищает ваш сайт Moodle во время обновления.

Когда сайт Moodle обновляется в результате обновления ядра Moodle и / или установки / обновления плагина, механизмы аутентификации и авторизации не надежны. Любой анонимный посетитель вашего сайта может инициировать процесс обновления, вводя в свой браузер адрес страницы администратора.

Это можно рассматривать как угрозу безопасности, поскольку на экранах обновлений доступно много конфиденциальной информации (серверная среда, версии плагина и т. д.).

Чтобы улучшить защиту вашего сайта во время обновления, рекомендуется настроить ключ обновления в основном файле config.php:

Если ключ обновления определен в файле config.php, его значение должно быть предоставлено для доступа к страницам администратора во время обновления сайта.

Не используйте пароль администратора в качестве ключа обновления.

Резервирование важных данных

Перед обновлением необходимо резервировать три области:

  • Программное обеспечение Moodle (например, все в сервере server / htdocs / moodle)
  • Загруженные файлы Moodle (например, сервер / moodledata)
  • База данных Moodle (например, дамп базы данных Postgres или MySQL) См. Резервное копирование сайта для получения более подробной информации.

Проверить наличие обновлений плагина

Если вы включили автоматическое развертывание обновлений, вы сможете обновлять установленные плагины автоматически во время обновления. Просто убедитесь, что вы проверяете наличие доступных обновлений (с помощью кнопки для него) на экране проверки плагинов.

уведомления-об-обновлении-moodle

Если вы обновляете плагины вручную, сейчас самое время проверить каталог Moodle Plugins, есть ли плагины, которые вы ранее установили на своем сайте для версии 3.11. Если да, загрузите их. На следующем шаге вы скопируете его в соответствующее место в коде Moodle (см. установка плагинов).

Обновление плагина пройдет как часть процесса обновления Moodle.

Если устаревший плагин приводит к сбою обновления, можно удалить код плагина, а не удалять его из Moodle, чтобы связанные с ним данные не удалялись.

Поместите свой сайт в режим обслуживания

режим-технического-обслуживания-moodle

Прежде чем приступать к обновлению своего сайта, вы должны перевести его в режим обслуживания, чтобы не допустить входа в систему пользователей, не являющихся администраторами. Затем вам нужно дождаться завершения всех текущих запущенных процессов cron перед продолжением.

Установите новое программное обеспечение Moodle

Вы можете получить текущую версию программного обеспечения по ссылке:

Стандартный режим установки

  1. Переместите ваши старые файлы программ Moodle в другое место. НЕ копируйте новые файлы поверх старых файлов.
  2. Разархивируйте или распакуйте файл обновления, чтобы все новые файлы программного обеспечения Moodle находились в том месте, где старые файлы использовались на сервере. Moodle будет настраивать SQL и moodledata, если это необходимо для обновления.
  3. Скопируйте старый файл config.php и .htaccess (если добавляли свои правила) в новый каталог Moodle.
  4. Как уже упоминалось выше, если вы установили плагины на свой сайт, вы должны добавить их в новое место (структуру каталога Moodle). Важно проверить, что вы выбрали правильную версию для своей новой версии Moodle. Будьте особенно осторожны, чтобы вы не перезаписывали какую-либо папку в новой версии Moodle и что вы размещаете папки плагинов в правильном каталоге (тот же каталог, в котором они находятся в текущей установке).
  5. Ваша папка moodledata должна быть размещена отдельно от папки Moodle и, как таковая, не должна с ней взаимодействовать. Moodle 3.0 выдаст предупреждение, если она находится в папке, доступной в Интернете, папка moodledata никогда не должна находиться в папке Moodle. Если вы перемещаете свою установку на новый сервер или новое местоположение на своем сервере, вам необходимо будет следовать инструкциям по миграции.

Linux

Затем скопируйте файл config.php, любые пользовательские плагины и ваш .htaccess файл, если вы его создали (проверьте, что пользовательские плагины являются правильной версией для вашего нового Moodle):

Если вы используете cron, позаботьтесь о том, чтобы cron.php выполнялся и использовал правильную команду php:

если необходимо. Однако для простого обновления не нужно ничего менять с помощью cron.

Использование Git

Вы можете использовать Git для обновления или обновления вашего Moodle. Подробнее см. Git для администраторов.

Обновление через командную строку

На серверах Linux Moodle 3.11 поддерживает запуск обновления из командной строки, а не через веб-браузер. Это, вероятно, будет более надежным, особенно для крупных сайтов.

Завершение обновления

Если вы поместили свой сайт в режим обслуживания раньше; отключите его сейчас!

Для этого просто откройте «Администрирование»> «Администрирование сайта»> «Уведомления».

Примечание. Если вы запускаете несколько серверов, вы должны очистить все кеши вручную (через Administration> Администрирование сайта> Разработка> Очистить все кеши) после завершения обновления на всех серверах.

Если ваш сервер использует основной язык, отличный от английского, вы можете столкнуться с «Неустранимая ошибка: максимальное время выполнения 30 секунд превышено» при попытке обновления. Вы можете увеличить max_execution_time = 160 в php.ini, чтобы выделить сценариям достаточно времени для обработки обновления языка.

После обновления

Файл config.php из вашей установки должен работать нормально, но если вы посмотрите на config-dist.php, который поставляется вместе с Moodle 3.0, доступно больше / разных опций (например, драйверы и настройки базы данных). Это хорошая идея, чтобы сопоставить ваши старые настройки config.php с новой версией 3.0 config-dist.php.

Cron получил большое обновление (MDL-25499) и теперь поддерживает как запланированные, так и специальные задачи.

Преимущества этих изменений:

Вам также может потребоваться изменить любые автоматизированные сценарии, которые вы анализируете после запуска cron. Уже невозможно просто контролировать вывод cron для строки «Cron script completed completed». Альтернативой является мониторинг вывода для строки «Задача не выполнена:». Если вы обнаружите, что задача не работает, вот несколько советов по отладке ошибки.

Новые пользовательские туры

В Moodle 3.11 появилось четыре новых пользовательских тура, два для преподавателей и два для студентов. При желании их можно отключить в разделе Администрирование сайта / Внешний вид / Пользовательские туры.

Before upgrading, check that your server meets all requirements for 3.8 in Site administration > Server > Environment.

See the release notes in the dev docs for both server and client software requirements.

  • You can only upgrade to Moodle 3.8 from Moodle 3.2 or later. If upgrading from earlier versions, you must upgrade to 3.2 as a first step.

Before upgrading

We advise that you test the upgrade first on a COPY of your production site, to make sure it works as you expect.

Consider setting the upgrade key for your site.

Backup important data

There are three areas that should be backed up before any upgrade:

  1. Moodle software (For example, everything in server/htdocs/moodle)
  2. Moodle uploaded files (For example, server/moodledata)
  3. Moodle database (For example, your Postgres or MySQL database dump)

See Site backup for more specific information.

Check for plugin updates

If you have Automatic updates deployment enabled, you will be able to update installed plugins automatically during the upgrade. Just make sure you check for available updates (via the button for it) at the Plugins check screen.

If you are updating plugins manually, it is a good moment now to check in the Moodle Plugins directory whether there is a 3.8 version available for any plugins (including themes) that you have previously installed on your site. If so, download the plugin package. In the next step, you will copy it to the appropriate location in your Moodle code (see Installing plugins).

The upgrade of the plugin will then happen as part of the Moodle upgrade process.

If an out-of-date plugin causes your upgrade to fail, you can usually delete the plugin code rather than uninstalling it from within Moodle so that the data associated with it is not deleted.

Put your site into maintenance mode

Before you begin upgrading your site, you should put it into maintenance mode to stop any non-admin users from logging in. Then you should wait for any currently running cron processes to complete before proceeding.

Install the new Moodle software

You can fetch the current version of the software at

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

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):

Don't forget to make moodle/config.php (and the rest of the source code) readable by your www server. For maximum security the files should not be writeable by your server. This is especially important on a 'production' server open to the public internet.

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

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 3.8 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 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 Site administration > Development > Purge all caches) after completing the upgrade on all servers.

Fatal error: Maximum execution time of 30 seconds exceeded.

After upgrading

Possible issues that may affect you in Moodle 3.8

Course overview improvements

New course overview settings enable an admin to

  • reduce the currently available layouts (Card, List and Summary)
  • specify which filter options are available, including providing a custom filter which uses course custom field values

Course request changes

The capabilities moodle/course:request and moodle/site:approvecourse may now be applied in the category context.

Removed functionality

  • The Community finder block and course-sharing functionality have been removed as part of the preparations for the new MoodleNet open social media platform.
  • The People block has been removed because there is a Participants link in the navigation drawer (Boost theme) and in the navigation block (Classic theme).

Please add more items here.

New capabilities in Moodle 3.8

  • forumreport/summary:view
  • forumreport/summary:viewall
  • mod/forum:exportforum
  • mod/forum:grade
  • atto/h5p:addembed
  • moodle/h5p:deploy
  • moodle/h5p:setdisplayoptions
  • moodle/h5p:updatelibraries

Moodle 3.2, 3.3, 3.4, 3.5, 3.6 and 3.7 improvements

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

1. В первую очередь необходимо скачать и распаковать архив с файлами новой версии Moodle. Сделать это можно с официального сайта - //download.moodle.org/ или по ссылке в панели управления ("Администрирование" >> "Уведомления").


2. Войдите в панель управления хостингом и авторизуйтесь - https://cp.beget.ru/main , перейдите на вкладку "Файловый менеджер"

1

3. После этого уже знакомым двойным щелчком откройте папку с файлами Вашего сайта. Там должна быть папка public_html и папка moodle_data. Папка moodle_data будет присутствовать если Вы перемещали ее для устранения ошибки которая описана здесь. Если Вы этого не делали, то этой папки не будет в списке и Вам будет нужно потом загрузить её из резервной копии.

4. Загрузите zip-архив с файлами новой версии в папку с Ваши сайтом. Для этого в верхнем меню выберите пункт "Загрузить файлы", в всплывающем окне нажмите "Выбрать" и выберите zip-архив, который Вы загрузили в предыдущем пункте. Поставьте галочку напротив архива и нажмите "Загрузить"

1

Загрузка файлов может занять некоторое время, но следует обязательно дождаться ее завершения. Когда загрузка будет завешена, в этом же окне Вы увидите информацию об этом:

1

Нажмите "Закрыть" для завершения загрузки файлов.

5. Загруженный архив необходимо распаковать. Для этого кликните на архиве правой кнопкой мышки и выберите пункт "Распаковать архив"

1

После распаковки архива в директории сайта появится папка moodle

Теперь все готово для начала обновления. С этого момента уже нельзя будет остановиться на полпути и придется довести задуманное до логического конца.

6. Сейчас нужно удалить с сервера все лишнее - папку public_html и zip-архив с новыми файлами (будьте внимательны - именно архив, а не папку moodle). Для удаления кликните на папке или архиве правой кнопкой мышки и выберите пункт "Удалить"

7. Переименуйте папку moodle в public_html - кликните правой кнопкой мышки и выберите "Переименовать"

8. После этого нужно распаковать на своем компьютере архив с резервной копией файлов, созданный в предыдущей теме. Из этого архива необходимо загрузить на сервер файл config.php в папку ваш_сайт/public_html/ .

ВНИМАНИЕ! Если не загрузить из резервной копии файл config.php, то при входе на сайт начнется не обновление, а новая установка Moodle.

Если Вы ранее не перемещали папку moodle_data, то её так же необходимо загрузить из резервной копии в папку /public_html

Также на сервер необходимо загрузить папку с файлами темы оформления, если Вы загружали и устанавливали нестандартную тему.

7. Теперь можете зайти на свой сайт. Если в предыдущих пунктах Вы все сделали правильно, то Вы будете автоматически перенаправлены на страницу установки обновления.


Читайте также: