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

Set rights (#45)

* Set rights
This commit is contained in:
Éric Gaspar 2021-06-17 08:26:55 +02:00 committed by GitHub
parent 3ac60feb34
commit 193b296277
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 88 additions and 91 deletions

View file

@ -1,3 +1,8 @@
<!--
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
It shall NOT be edited by hand.
-->
# 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)
@ -6,29 +11,26 @@
*[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.*
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

View file

@ -4,31 +4,29 @@
[![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)*
*[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.*
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

View file

@ -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

10
doc/DISCLAIMER.md Normal file
View file

@ -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**

10
doc/DISCLAIMER_fr.md Normal file
View file

@ -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**

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 KiB

View file

@ -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": [

View file

@ -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
#=================================================

View file

@ -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

View file

@ -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