1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/moodle_ynh.git synced 2024-09-03 19:46:23 +02:00
* Upgrade to v.3.9.2

* Update app.src

* Update README.md

* Small typos

* Cleaning up

* Upgrade to 3.10.0

* Fix small typo

* Set badge in SVG

* Fix typo (#30)

"setuping" -> "setting up"

* Upgrade to 3.10.1 (#31)

* Upgrade to 3.10.1

* Update manifest.json

* Update install

* Update install

* small fixes (#33)

* Upgrade to 3.10.2 (#35)

* Upgrade to 3.10.2

* Remove ask (#36)

* Protect final_path

* Revert "Protect final_path"

This reverts commit f764d11977.

* Add change url (#38)

* Update change_url

* 3.10.3 (#37)

* Upgrade to version 3.10.3
* Add README_fr
* Small fixes

* Fix badges

* Remove not yet working script

* Fix links

* [autopatch] Update issue and PR templates (#41)

Co-authored-by: Yunohost-Bot <>

* Add templates

* 3.10.4 (#42)

* 3.10.4

* Cleaning up

* Set rights (#45)

* Set rights

* Fix (#47)

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update doc/DISCLAIMER_fr.md

Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org>

* Auto-update README

* apply exemple for data dir (#48)

* Update install

* 3.11.1 (#50)

* 3.11.1

* Update php-fpm.conf

* 3.11.2 (#51)

* 3.11.2

* Update php-fpm.conf

* Add config file (#54)

* Update upgrade

* Fix

* Update change_url

* Update nginx.conf

* Update change_url

* Update change_url

* Update upgrade

* Update change_url

* Update change_url

* Update change_url

* Update change_url

* Update change_url

* Update change_url

* fix

* fix

* Update change_url

* Update change_url

* Update change_url

* Update change_url

* Update change_url

* Update change_url

* Update change_url

* Fix

* Update change_url

* Update change_url

* Update change_url

* Update nginx.conf

* Update nginx.conf

* Update nginx.conf

* Update nginx.conf

* Update restore

* Update manifest.json

* 4.3

* 3.11.4 (#57)

* 3.11.4

* 3.11.5 (#58)

* 3.11.5

* Auto-update README

Co-authored-by: Yunohost-Bot <>

* 3.11.6 (#61)

* 3.11.6

* Update config-path.php

* 4.0.0 (#62)

* 3.11.5

* Auto-update README

* 3.11.6

* Auto-update README

* Fix

* Update config-path.php

* Update manifest.json

* remove language

* Revert "remove language"

This reverts commit a598ca0465.

* Fix

* Update upgrade

* Update check_process

* Fix

* Update install

* Fix

* Update install

* Fix

* Update install

* Update upgrade

* 100M

* Fix

* fix

* Update _common.sh

* Fix

* remove de

* Update fr.src

* remove translation

* fix

* Update upgrade

* Update change_url

* Update config-path.php

* Update _common.sh

* 4.0.0

* Auto-update README

* 7.4

* Update restore

* Update upgrade

Co-authored-by: Yunohost-Bot <>
Co-authored-by: yunohost-bot <yunohost@yunohost.org>

* Update check_process

* Cleaning up

* Auto-update README

* 4.0.1

* Auto-update README

Co-authored-by: Benjamin Hartmann <42138517+benjaminwolkchen@users.noreply.github.com>
Co-authored-by: YunoHost Bot <yunohost-bot@users.noreply.github.com>
Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org>
Co-authored-by: Yunohost-Bot <>
Co-authored-by: yunohost-bot <yunohost@yunohost.org>
This commit is contained in:
Éric Gaspar 2022-05-22 16:09:44 +02:00 committed by GitHub
parent 623e7bae2d
commit d9f62c804a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 36 additions and 30 deletions

View file

@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
Online learning platform
**Shipped version:** 3.11.6~ynh1
**Shipped version:** 4.0.1~ynh1
**Demo:** https://sandbox.moodledemo.net/
@ -41,7 +41,7 @@ How to configure this app: by an admin panel.
## Documentation and resources
* Official app website: https://moodle.org/
* Official admin documentation: https://docs.moodle.org/311/en/Main_page
* Official admin documentation: https://docs.moodle.org/400/en/Main_page
* Upstream app code repository: https://github.com/moodle/moodle
* YunoHost documentation for this app: https://yunohost.org/app_moodle
* Report a bug: https://github.com/YunoHost-Apps/moodle_ynh/issues

View file

@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
Plateforme d'apprentissage en ligne
**Version incluse :** 3.11.6~ynh1
**Version incluse :** 4.0.1~ynh1
**Démo :** https://sandbox.moodledemo.net/
@ -28,7 +28,7 @@ Plateforme d'apprentissage en ligne
## Documentations et ressources
* Site officiel de l'app : https://moodle.org/
* Documentation officielle de l'admin : https://docs.moodle.org/311/en/Main_page
* Documentation officielle de l'admin : https://docs.moodle.org/400/en/Main_page
* Dépôt de code officiel de l'app : https://github.com/moodle/moodle
* Documentation YunoHost pour cette app : https://yunohost.org/app_moodle
* Signaler un bug : https://github.com/YunoHost-Apps/moodle_ynh/issues

View file

@ -13,8 +13,8 @@
setup_private=1
setup_public=1
upgrade=1
# 3.11.1~ynh1
upgrade=1 from_commit=b2abcd9cefa16e5c5e0e6963a92ebc961be12d1a
# 3.11.6~ynh1
upgrade=1 from_commit=623e7bae2dbae1bc9d7ceaa947ec49f56b57fa05
backup_restore=1
multi_instance=1
change_url=1
@ -22,6 +22,6 @@
Email=
Notification=none
;;; Upgrade options
; commit=b2abcd9cefa16e5c5e0e6963a92ebc961be12d1a
name=3.11.1~ynh1
; commit=623e7bae2dbae1bc9d7ceaa947ec49f56b57fa05
name=Testing (#63)

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/moodle/moodle/archive/v3.11.6.zip
SOURCE_SUM=eaade75ef2ddb223abe7ca89c61d2579ef183bdedaee0241307b0a7992bb6b45
SOURCE_URL=https://github.com/moodle/moodle/archive/v4.0.1.zip
SOURCE_SUM=7e0ea98532226e131726d67a30e3ada77bb8a7c799f0094f75050920c11d3b4f
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=zip
SOURCE_IN_SUBDIR=true

View file

@ -6,13 +6,13 @@
"en": "Online learning platform",
"fr": "Plateforme d'apprentissage en ligne"
},
"version": "3.11.6~ynh1",
"version": "4.0.1~ynh1",
"url": "https://moodle.org/",
"upstream": {
"license": "GPL-3.0-or-later",
"website": "https://moodle.org/",
"demo": "https://sandbox.moodledemo.net/",
"admindoc": "https://docs.moodle.org/311/en/Main_page",
"admindoc": "https://docs.moodle.org/400/en/Main_page",
"code": "https://github.com/moodle/moodle"
},
"license": "GPL-3.0-or-later",
@ -26,7 +26,7 @@
"multi_instance": true,
"services": [
"nginx",
"php7.3-fpm"
"php7.4-fpm"
],
"arguments": {
"install" : [

View file

@ -5,9 +5,7 @@
#=================================================
# dependencies used by the app
pkg_dependencies="postgresql"
YNH_PHP_VERSION="7.3"
YNH_PHP_VERSION="7.4"
pkg_dependencies="postgresql php${YNH_PHP_VERSION}-common php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-xmlrpc php${YNH_PHP_VERSION}-soap php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-pgsql php${YNH_PHP_VERSION}-ldap"

View file

@ -40,6 +40,10 @@ ynh_print_info --message="Declaring files to be backed up..."
ynh_backup --src_path="$final_path"
#=================================================
# BACKUP THE DATA DIR
#=================================================
ynh_backup --src_path="$data_path" --is_big
#=================================================

View file

@ -145,7 +145,7 @@ ynh_psql_execute_as_root --database="$db_name" --sql="UPDATE public.mdl_config_p
ynh_psql_execute_as_root --database="$db_name" --sql="UPDATE public.mdl_config_plugins SET value='onlogin' WHERE plugin='auth_ldap' AND (name='field_updatelocal_firstname' OR name='field_updatelocal_lastname' OR name='field_updatelocal_email');"
ynh_psql_execute_as_root --database="$db_name" --sql="UPDATE public.mdl_config_plugins SET value='locked' WHERE plugin='auth_ldap' AND (name='field_lock_firstname' OR name='field_lock_lastname' OR name='field_lock_email');"
# The admin is an ldap user
# The admin is an LDAP user
ynh_psql_execute_as_root --database="$db_name" --sql="UPDATE public.mdl_user SET auth='ldap' WHERE username='$admin';"
php$phpversion "$final_path/admin/cli/purge_caches.php"

View file

@ -43,7 +43,7 @@ ynh_remove_app_dependencies
#=================================================
# REMOVE APP MAIN DIR
#=================================================
ynh_script_progression --message="Removing Moodle main directory..." --weight=2
ynh_script_progression --message="Removing app main directory..." --weight=2
# Remove the app directory securely
ynh_secure_remove --file="$final_path"

View file

@ -83,16 +83,6 @@ chmod 750 "$data_path"
chmod -R o-rwx "$data_path"
chown -R $app:www-data "$data_path"
#=================================================
# RESTORE THE PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring PHP-FPM configuration..." --weight=1
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
# Recreate a dedicated php-fpm config
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$phpversion
#=================================================
# SPECIFIC RESTORATION
#=================================================
@ -103,6 +93,16 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=3
# Define and install dependencies
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
#=================================================
# RESTORE THE PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring PHP-FPM configuration..." --weight=1
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
# Recreate a dedicated php-fpm config
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$phpversion
#=================================================
# RESTORE THE POSTGRESQL DATABASE
#=================================================

View file

@ -37,7 +37,7 @@ upgrade_type=$(ynh_check_app_version_changed)
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================
ynh_script_progression --message="Backing up Moodle before upgrading (may take a while)..." --weight=10
ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=10
# Backup the current version of the app
ynh_backup_before_upgrade
@ -106,6 +106,10 @@ then
#php${phpversion} $final_path/admin/cli/upgrade.php
fi
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#=================================================
# NGINX CONFIGURATION
#=================================================
@ -144,7 +148,7 @@ ynh_psql_execute_as_root --database="$db_name" --sql="UPDATE public.mdl_config_p
ynh_psql_execute_as_root --database="$db_name" --sql="UPDATE public.mdl_config_plugins SET value='onlogin' WHERE plugin='auth_ldap' AND (name='field_updatelocal_firstname' OR name='field_updatelocal_lastname' OR name='field_updatelocal_email');"
ynh_psql_execute_as_root --database="$db_name" --sql="UPDATE public.mdl_config_plugins SET value='locked' WHERE plugin='auth_ldap' AND (name='field_lock_firstname' OR name='field_lock_lastname' OR name='field_lock_email');"
# The admin is an ldap user
# The admin is an LDAP user
ynh_psql_execute_as_root --database="$db_name" --sql="UPDATE public.mdl_user SET auth='ldap' WHERE username='$admin';"
php${phpversion} "$final_path/admin/cli/purge_caches.php"