diff --git a/README.md b/README.md index 778d024..a3e5e44 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,8 @@ + + # 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) @@ -5,30 +10,27 @@ *[Lire ce readme en français.](./README_fr.md)* -> *This package allows you to install Moodle quickly and simply on a YunoHost server. -If you don't have YunoHost, please consult [the guide](https://yunohost.org/install) to learn how to install it.* +> *This package allows you to install Moodle quickly and simply on a YunoHost server. +If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* ## Overview -[Moodle](https://moodle.org) is a learning platform designed to provide educators, administrators and learners with a single robust, secure and integrated system to create personalised learning environments. Moodle is widely used around the world by universities, schools, companies and all manner of organisations and individuals. -**Shipped version:** 3.10.4 +Online learning platform + +**Shipped version:** 3.11.0~ynh1 + +**Demo:** https://sandbox.moodledemo.net/ ## Screenshots -![](https://upload.wikimedia.org/wikipedia/commons/3/36/Moodle_2.0_on_Firefox_4.0.png) +![](./doc/screenshots/Moodle_2.0_on_Firefox_4.0.png) -## Demo - -* [Official demo](https://sandbox.moodledemo.net/) +## Disclaimers / important information ## Configuration How to configure this app: by an admin panel. -## Documentation - - * Official documentation: https://docs.moodle.org/311/en/Main_page - ## YunoHost specific features #### Multi-user support @@ -36,19 +38,13 @@ How to configure this app: by an admin panel. * Are LDAP and HTTP auth supported? **Yes** * Can the app be used by multiple users? **Yes** -#### Supported architectures +## Documentation and resources -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/moodle.svg)](https://ci-apps.yunohost.org/ci/apps/moodle/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/moodle.svg)](https://ci-apps-arm.yunohost.org/ci/apps/moodle/) - -## Links - - * Report a bug: https://github.com/YunoHost-Apps/moodle_ynh/issues - * App website: https://moodle.org/ - * Upstream app repository: http://git.moodle.org/ - https://github.com/moodle/moodle - * YunoHost website: https://yunohost.org/ - ---- +* Official app website: https://moodle.org/ +* Official admin documentation: https://docs.moodle.org/311/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 ## Developer info @@ -60,3 +56,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/moodle_ynh/tree/testi or sudo yunohost app upgrade moodle -u https://github.com/YunoHost-Apps/moodle_ynh/tree/testing --debug ``` + +**More info regarding app packaging:** https://yunohost.org/packaging_apps \ No newline at end of file diff --git a/README_fr.md b/README_fr.md index 5d8f724..9b5a6bf 100644 --- a/README_fr.md +++ b/README_fr.md @@ -3,32 +3,30 @@ [![Niveau d'intégration](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) [![Installer Moodle avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=moodle) -*[Read this readme in english.](./README.md)* +*[Read this readme in english.](./README.md)* +*[Lire ce readme en français.](./README_fr.md)* -> *Ce package vous permet d'installer Moodle rapidement et simplement sur un serveur YunoHost. -Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/install) pour apprendre comment l'installer.* +> *Ce package vous permet d'installer Moodle rapidement et simplement sur un serveur YunoHost. +Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* ## Vue d'ensemble -[Moodle](https://moodle.org) est une plateforme d'apprentissage conçue pour fournir aux enseignants, aux administrateurs et aux apprenants un système unique robuste, sécurisé et intégré pour créer des environnements d'apprentissage personnalisés. Moodle est largement utilisé dans le monde entier par les universités, les écoles, les entreprises et toutes sortes d'organisations et d'individus. -**Version incluse :** 3.10.4 +Plateforme d'apprentissage en ligne + +**Version incluse :** 3.11.0~ynh1 + +**Démo :** https://sandbox.moodledemo.net/ ## Captures d'écran -![](https://upload.wikimedia.org/wikipedia/commons/3/36/Moodle_2.0_on_Firefox_4.0.png) +![](./doc/screenshots/Moodle_2.0_on_Firefox_4.0.png) -## Démo - -* [Démo officielle](https://sandbox.moodledemo.net/) +## Avertissements / informations importantes ## Configuration * Comment configurer cette application : via le panneau d'administration. -## Documentation - -* Documentation officielle : https://docs.moodle.org/3x/fr/Accueil - ## Caractéristiques spécifiques YunoHost #### Support multi-utilisateur @@ -36,19 +34,13 @@ Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/install) * L'authentification LDAP et HTTP est-elle prise en charge ? **Oui** * L'application peut-elle être utilisée par plusieurs utilisateurs ? **Oui** -#### Architectures supportées +## Documentations et ressources -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/moodle.svg)](https://ci-apps.yunohost.org/ci/apps/moodle/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/moodle.svg)](https://ci-apps-arm.yunohost.org/ci/apps/moodle/) - -## Liens - - * Signaler un bug :https://github.com/YunoHost-Apps/moodle_ynh/issues - * Site de l'application : https://moodle.org/ - * Dépôt de l'application principale : http://git.moodle.org/ - https://github.com/moodle/moodle - * Site web YunoHost : https://yunohost.org/ - ---- +* Site officiel de l'app : https://moodle.org/ +* Documentation officielle de l'admin : https://docs.moodle.org/311/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 ## Informations pour les développeurs @@ -60,3 +52,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/moodle_ynh/tree/testi ou sudo yunohost app upgrade moodle -u https://github.com/YunoHost-Apps/moodle_ynh/tree/testing --debug ``` + +**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps \ No newline at end of file diff --git a/conf/app.src b/conf/app.src index d917c00..eb56b1d 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/moodle/moodle/archive/v3.10.4.zip -SOURCE_SUM=00b6020496e4a7d7d107bbb398d56425c2ba57188bf16756f0480ac973229c33 +SOURCE_URL=https://github.com/moodle/moodle/archive/v3.11.0.zip +SOURCE_SUM=03f878da9f4aeb10c0222d5f9addce7f6c64b216881221bcbac2fec8e34bde5a SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md new file mode 100644 index 0000000..1e932a1 --- /dev/null +++ b/doc/DISCLAIMER.md @@ -0,0 +1,10 @@ +## Configuration + +How to configure this app: by an admin panel. + +## YunoHost specific features + +#### Multi-user support + +* Are LDAP and HTTP auth supported? **Yes** +* Can the app be used by multiple users? **Yes** diff --git a/doc/DISCLAIMER_fr.md b/doc/DISCLAIMER_fr.md new file mode 100644 index 0000000..a1befe8 --- /dev/null +++ b/doc/DISCLAIMER_fr.md @@ -0,0 +1,10 @@ +## Configuration + +* Comment configurer cette application : via le panneau d'administration. + +## Caractéristiques spécifiques YunoHost + +#### Support multi-utilisateur + +* L'authentification LDAP et HTTP est-elle prise en charge ? **Oui** +* L'application peut-elle être utilisée par plusieurs utilisateurs ? **Oui** diff --git a/doc/screenshots/Moodle_2.0_on_Firefox_4.0.png b/doc/screenshots/Moodle_2.0_on_Firefox_4.0.png new file mode 100644 index 0000000..9f8e6ae Binary files /dev/null and b/doc/screenshots/Moodle_2.0_on_Firefox_4.0.png differ diff --git a/manifest.json b/manifest.json index 1524f4c..d54ce1e 100644 --- a/manifest.json +++ b/manifest.json @@ -6,15 +6,22 @@ "en": "Online learning platform", "fr": "Plateforme d'apprentissage en ligne" }, - "version": "3.10.4~ynh1", + "version": "3.11.0~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", + "code": "https://github.com/moodle/moodle" + }, "license": "GPL-3.0-or-later", "maintainer": { "name": "Anmol Sharma", "email": "anmol@datamol.org" }, "requirements": { - "yunohost": ">= 4.2.0" + "yunohost": ">= 4.2.4" }, "multi_instance": true, "services": [ diff --git a/scripts/install b/scripts/install index 32e06ad..973538d 100644 --- a/scripts/install +++ b/scripts/install @@ -92,6 +92,10 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$final_path" +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" + #================================================= # NGINX CONFIGURATION #================================================= @@ -115,9 +119,8 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) # SECURE FILES AND DIRECTORIES #================================================= -chown -R $app: "$final_path" mkdir -p $data_path -chown -R $app: $data_path +chown -R $app:www-data "$data_path" #================================================= # SETUP APPLICATION @@ -156,17 +159,6 @@ ynh_script_progression --message="Adding cron job..." --weight=2 ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" -#================================================= -# GENERIC FINALIZATION -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= -ynh_script_progression --message="Securing files and directories..." --weight=1 - -# Set permissions to app files -chown -R $app: $data_path -chown -R $app: $final_path - #================================================= # SETUP SSOWAT #================================================= diff --git a/scripts/restore b/scripts/restore index b5b8eae..2b70759 100644 --- a/scripts/restore +++ b/scripts/restore @@ -67,16 +67,13 @@ ynh_script_progression --message="Restoring Moodle main directory..." --weight=1 ynh_restore_file --origin_path=$final_path +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" + ynh_restore_file --origin_path=$data_path -#================================================= -# RESTORE USER RIGHTS -#================================================= -ynh_script_progression --message="Restoring user rights..." - -# Restore permissions on app files -chown -R $app: "$final_path" -chown -R $app: $data_path +chown -R $app:www-data $data_path #================================================= # RESTORE THE PHP-FPM CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index 3c70089..b517364 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -79,9 +79,13 @@ then ynh_script_progression --message="Upgrading source files..." --weight=6 # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" + ynh_setup_source --dest_dir="$final_path" --keep="$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 #================================================= @@ -106,20 +110,6 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1 ynh_add_fpm_config --package="$extra_php_dependencies" phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) -#================================================= -# SPECIFIC UPGRADE -#================================================= -# UPGRADING THE APPLICATION -#================================================= -ynh_script_progression --message="Upgrading the application..." --weight=1 - -ynh_backup_if_checksum_is_different --file="$final_path/config.php" - -ynh_exec_as $app php${phpversion} "$final_path/admin/cli/upgrade.php" --non-interactive - -# Recalculate and store the checksum of the file for the next upgrade. -ynh_store_file_checksum --file="$final_path/config.php" - #================================================= # ACTIVATE LDAP SUPPORT #================================================= @@ -155,8 +145,7 @@ ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" ynh_script_progression --message="Securing files and directories..." --weight=1 # Set permissions on app files -chown -R $app: $data_path -chown -R $app: $final_path +chown -R $app:www-data $data_path #================================================= # RELOAD NGINX