From b775698f39220832c92f8566e17728c7be2b1e35 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 9 Oct 2020 14:27:52 +0200 Subject: [PATCH 1/5] Upgrade to v.3.9.2 --- conf/app.src | 6 +++--- issue_template.md | 6 +++--- manifest.json | 6 +++--- scripts/install | 8 ++++---- scripts/remove | 4 ++-- scripts/restore | 4 ++-- scripts/upgrade | 8 ++++---- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/conf/app.src b/conf/app.src index 28e9bcd..f61e421 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,6 +1,6 @@ -SOURCE_URL=https://download.moodle.org/stable39/moodle-3.9.zip -SOURCE_SUM=b976f3c9446a98c0b15d0467ec83cfe25fa32d30f4f56eb4e98f2efe96f6f24ed4039667cdcbb47cc767e91ada2cd484f4b4c2660ce57479b9f361c6bbf54b3c -SOURCE_SUM_PRG=sha512sum +SOURCE_URL=https://download.moodle.org/download.php/stable39/moodle-3.9.2.zip +SOURCE_SUM=ca66ffbaf9360f2342d46a5ab1e754b1b50b17e1c2ab3d078355b34a7c5985e7 +SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true SOURCE_FILENAME=moodle.zip diff --git a/issue_template.md b/issue_template.md index d82d230..ae65abb 100644 --- a/issue_template.md +++ b/issue_template.md @@ -7,7 +7,7 @@ about: Create a report to help us debug, it would be nice to fill the template a **How to post a meaningful bug report** 1. *Read this whole template first.* 2. *Determine if you are on the right place:* - - *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change url...), you are on the right place!* + - *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change_url...), you are on the right place!* - *Otherwise, the issue may be due to Moodle itself. Refer to its documentation or repository for help.* - *If you have a doubt, post here, we will figure it out together.* 3. *Delete the italic comments as you write over them below, and remove this guide.* @@ -34,8 +34,8 @@ about: Create a report to help us debug, it would be nice to fill the template a - *If you used the webadmin, please perform the equivalent command from the CLI first.* - *If the error occurs in your browser, explain what you did:* 1. *Go to '...'* - 2. *Click on '....'* - 3. *Scroll down to '....'* + 2. *Click on '...'* + 3. *Scroll down to '...'* 4. *See error* **Expected behavior** diff --git a/manifest.json b/manifest.json index d5e07e9..3693e18 100644 --- a/manifest.json +++ b/manifest.json @@ -3,10 +3,10 @@ "id": "moodle", "packaging_format": 1, "description": { - "en": "An online learning platform", - "fr": "Une plateforme d'apprentissage en ligne" + "en": "Online learning platform", + "fr": "Plateforme d'apprentissage en ligne" }, - "version": "3.9.0~ynh1", + "version": "3.9.2~ynh1", "url": "https://moodle.org/", "license": "GPL-3.0-or-later", "maintainer": { diff --git a/scripts/install b/scripts/install index e7b9a98..33743ca 100644 --- a/scripts/install +++ b/scripts/install @@ -87,7 +87,7 @@ ynh_setup_source --dest_dir="$final_path" #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Configuring nginx web server..." --weight=2 +ynh_script_progression --message="Configuring NGINX web server..." --weight=2 # Create a dedicated nginx config ynh_add_nginx_config @@ -103,7 +103,7 @@ ynh_system_user_create --username="$app" #================================================= # PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Configuring php-fpm..." --weight=1 +ynh_script_progression --message="Configuring PHP-FPM..." --weight=1 # Create a dedicated php-fpm config ynh_add_fpm_config --package="$extra_php_dependencies" @@ -133,7 +133,7 @@ ynh_store_file_checksum "$final_path/config.php" #================================================= # ACTIVATE LDAP SUPPORT #================================================= -ynh_script_progression --message="Activate ldap support..." +ynh_script_progression --message="Activate LDAP support..." ynh_psql_execute_as_root --database="$db_name" --sql="UPDATE public.mdl_config SET value='ldap,email' WHERE name='auth';" ynh_psql_execute_as_root --database="$db_name" --sql="UPDATE public.mdl_config_plugins SET value='ldap://127.0.0.1/' WHERE plugin='auth_ldap' AND name='host_url';" @@ -187,7 +187,7 @@ fi #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." --weight=1 +ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/remove b/scripts/remove index 63371c6..ed6fafb 100644 --- a/scripts/remove +++ b/scripts/remove @@ -51,7 +51,7 @@ ynh_secure_remove --file="$final_path" #================================================= # REMOVE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Removing nginx web server configuration..." +ynh_script_progression --message="Removing NGINX web server configuration..." # Remove the dedicated nginx config ynh_remove_nginx_config @@ -59,7 +59,7 @@ ynh_remove_nginx_config #================================================= # REMOVE PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Removing php-fpm configuration..." --weight=20 +ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=20 # Remove the dedicated php-fpm config ynh_remove_fpm_config diff --git a/scripts/restore b/scripts/restore index e7c6461..1d15f01 100644 --- a/scripts/restore +++ b/scripts/restore @@ -48,7 +48,7 @@ test ! -d "$data_path" \ #================================================= # RESTORE THE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Restoring the nginx configuration..." +ynh_script_progression --message="Restoring the NGINX configuration..." ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" @@ -121,7 +121,7 @@ ynh_restore_file --origin_path="/etc/cron.d/$app" #================================================= # RELOAD NGINX AND PHP-FPM #================================================= -ynh_script_progression --message="Reloading nginx web server and php-fpm..." +ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." ynh_systemd_action --service_name=php"$phpversion"-fpm --action=reload ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/upgrade b/scripts/upgrade index b5c73ad..c0e4120 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -72,7 +72,7 @@ fi #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Upgrading nginx web server configuration..." +ynh_script_progression --message="Upgrading NGINX web server configuration..." # Create a dedicated nginx config ynh_add_nginx_config @@ -95,7 +95,7 @@ ynh_system_user_create --username="$app" #================================================= # PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Upgrading php-fpm configuration..." +ynh_script_progression --message="Upgrading PHP-FPM configuration..." # Create a dedicated php-fpm config ynh_add_fpm_config --package="$extra_php_dependencies" @@ -126,7 +126,7 @@ chown -R "$app": "$final_path" #================================================= # ACTIVATE LDAP SUPPORT #================================================= -ynh_script_progression --message="Activate ldap support..." +ynh_script_progression --message="Activate LDAP support..." ynh_psql_execute_as_root --database="$db_name" --sql="UPDATE public.mdl_config SET value='ldap,email' WHERE name='auth';" ynh_psql_execute_as_root --database="$db_name" --sql="UPDATE public.mdl_config_plugins SET value='ldap://127.0.0.1/' WHERE plugin='auth_ldap' AND name='host_url';" @@ -180,7 +180,7 @@ fi #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." +ynh_script_progression --message="Reloading NGINX web server..." ynh_systemd_action --service_name=nginx --action=reload From 73b38c1b3c6bafe82e216e6213000e4500199bdf Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 9 Oct 2020 14:34:48 +0200 Subject: [PATCH 2/5] Update app.src --- conf/app.src | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/app.src b/conf/app.src index f61e421..943ce1e 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://download.moodle.org/download.php/stable39/moodle-3.9.2.zip -SOURCE_SUM=ca66ffbaf9360f2342d46a5ab1e754b1b50b17e1c2ab3d078355b34a7c5985e7 +SOURCE_URL=https://github.com/moodle/moodle/archive/v3.9.2.zip +SOURCE_SUM=eecb0e1247b9a1de4d3bcd3962946005d8e052a6bf311163cc2d330a9bfe172d SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true From a5fd10d4cee4621c8352f3888aeb12b9424e38c4 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 9 Oct 2020 16:08:48 +0200 Subject: [PATCH 3/5] Update README.md --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1923715..ef93cc9 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Moodle app for YunoHost +# Moodle for YunoHost [![Integration level](https://dash.yunohost.org/integration/moodle.svg)](https://dash.yunohost.org/appci/app/moodle) ![](https://ci-apps.yunohost.org/ci/badges/moodle.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/moodle.maintain.svg) [![Install Moodle with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=moodle) @@ -11,7 +11,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Moodle is widely used around the world by universities, schools, companies and all manner of organisations and individuals. -**Shipped version:** 3.9.0 +**Shipped version:** 3.9.2 ## Screenshots @@ -50,8 +50,7 @@ How to configure this app: by an admin panel. --- -Developer info ----------------- +## Developer info Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/moodle_ynh/tree/testing). From bc0641c268a051c6c2b11b613dfbee92c7535f94 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 13 Oct 2020 16:09:29 +0200 Subject: [PATCH 4/5] Small typos --- manifest.json | 2 +- scripts/backup | 1 - scripts/install | 2 +- scripts/remove | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 6 files changed, 5 insertions(+), 6 deletions(-) diff --git a/manifest.json b/manifest.json index 3693e18..c321887 100644 --- a/manifest.json +++ b/manifest.json @@ -14,7 +14,7 @@ "email": "anmol@datamol.org" }, "requirements": { - "yunohost": ">= 3.5" + "yunohost": ">= 3.8.1" }, "multi_instance": true, "services": [ diff --git a/scripts/backup b/scripts/backup index 18f6094..fe82eec 100644 --- a/scripts/backup +++ b/scripts/backup @@ -6,7 +6,6 @@ # IMPORT GENERIC HELPERS #================================================= -#Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers diff --git a/scripts/install b/scripts/install index 33743ca..60d4b7c 100644 --- a/scripts/install +++ b/scripts/install @@ -89,7 +89,7 @@ ynh_setup_source --dest_dir="$final_path" #================================================= ynh_script_progression --message="Configuring NGINX web server..." --weight=2 -# Create a dedicated nginx config +# Create a dedicatedNGINX config ynh_add_nginx_config #================================================= diff --git a/scripts/remove b/scripts/remove index ed6fafb..72b2347 100644 --- a/scripts/remove +++ b/scripts/remove @@ -53,7 +53,7 @@ ynh_secure_remove --file="$final_path" #================================================= ynh_script_progression --message="Removing NGINX web server configuration..." -# Remove the dedicated nginx config +# Remove the dedicated NGINX config ynh_remove_nginx_config #================================================= diff --git a/scripts/restore b/scripts/restore index 1d15f01..c218fbb 100644 --- a/scripts/restore +++ b/scripts/restore @@ -85,7 +85,7 @@ ynh_script_progression --message="Restoring PHP-FPM configuration..." ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" -# Recreate a dedicated php-fpm config +# Recreate a dedicated PHP-FPM config ynh_add_fpm_config --package="$extra_php_dependencies" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index c0e4120..79687fc 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -97,7 +97,7 @@ ynh_system_user_create --username="$app" #================================================= ynh_script_progression --message="Upgrading PHP-FPM configuration..." -# Create a dedicated php-fpm config +# Create a dedicated PHP-FPM config ynh_add_fpm_config --package="$extra_php_dependencies" phpversion=$(ynh_app_setting_get --app="$app" --key=phpversion) From ecdda12753bbecdcd500f85f80f33337b3078bfe Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 13 Oct 2020 18:55:21 +0200 Subject: [PATCH 5/5] Cleaning up --- scripts/backup | 2 +- scripts/install | 2 +- scripts/remove | 4 ++-- scripts/restore | 4 ++-- scripts/upgrade | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/backup b/scripts/backup index fe82eec..9c2f9f5 100644 --- a/scripts/backup +++ b/scripts/backup @@ -73,4 +73,4 @@ ynh_psql_dump_db --database="$db_name" > db.sql # END OF SCRIPT #================================================= -ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." +ynh_print_info --message="Backup script completed for Moodle. (YunoHost will then actually copy those files to the archive)." diff --git a/scripts/install b/scripts/install index 60d4b7c..3a0b12a 100644 --- a/scripts/install +++ b/scripts/install @@ -195,4 +195,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Installation of $app completed" --last +ynh_script_progression --message="Installation of Moodle completed" --last diff --git a/scripts/remove b/scripts/remove index 72b2347..5bcf4e5 100644 --- a/scripts/remove +++ b/scripts/remove @@ -43,7 +43,7 @@ ynh_remove_app_dependencies #================================================= # REMOVE APP MAIN DIR #================================================= -ynh_script_progression --message="Removing app main directory..." +ynh_script_progression --message="Removing Moodle main directory..." # Remove the app directory securely ynh_secure_remove --file="$final_path" @@ -91,4 +91,4 @@ ynh_system_user_delete --username="$app" # END OF SCRIPT #================================================= -ynh_script_progression --message="Removal of $app completed" --last +ynh_script_progression --message="Removal of Moodle completed" --last diff --git a/scripts/restore b/scripts/restore index c218fbb..396d9b6 100644 --- a/scripts/restore +++ b/scripts/restore @@ -55,7 +55,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # RESTORE THE APP MAIN DIR #================================================= -ynh_script_progression --message="Restoring the app main directory..." +ynh_script_progression --message="Restoring Moodle main directory..." ynh_restore_file --origin_path="$final_path" @@ -130,4 +130,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Restoration completed for $app" --last +ynh_script_progression --message="Restoration completed for Moodle" --last diff --git a/scripts/upgrade b/scripts/upgrade index 79687fc..fb33027 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -44,7 +44,7 @@ fi #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=30 +ynh_script_progression --message="Backing up Moodle before upgrading (may take a while)..." --weight=30 # Backup the current version of the app ynh_backup_before_upgrade @@ -188,4 +188,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Upgrade of $app completed" --last +ynh_script_progression --message="Upgrade of Moodle completed" --last