dd-ctl remove install and configure moodle and plugins
parent
1dc6343ca5
commit
9a2efe0a6a
|
@ -81,6 +81,21 @@ if php -d max_input_vars=$max_input_vars /var/www/html/admin/cli/isinstalled.php
|
||||||
php -d max_input_vars=$max_input_vars /var/www/html/admin/cli/cfg.php --name=noreplyaddress --set=$MOODLE_MAIL_NOREPLY_ADDRESS
|
php -d max_input_vars=$max_input_vars /var/www/html/admin/cli/cfg.php --name=noreplyaddress --set=$MOODLE_MAIL_NOREPLY_ADDRESS
|
||||||
php -d max_input_vars=$max_input_vars /var/www/html/admin/cli/cfg.php --name=emailsubjectprefix --set=$MOODLE_MAIL_PREFIX
|
php -d max_input_vars=$max_input_vars /var/www/html/admin/cli/cfg.php --name=emailsubjectprefix --set=$MOODLE_MAIL_PREFIX
|
||||||
|
|
||||||
|
php -d max_input_vars=$max_input_vars /var/www/html/admin/cli/cfg.php --name=guestloginbutton --set=0
|
||||||
|
php -d max_input_vars=$max_input_vars /var/www/html/admin/cli/cfg.php --name=enrol_plugins_enabled --set=manual
|
||||||
|
php -d max_input_vars=$max_input_vars /var/www/html/admin/cli/cfg.php --name=enablemobilewebservice --set=0
|
||||||
|
php -d max_input_vars=$max_input_vars /var/www/html/admin/cli/cfg.php --name=enablebadges --set=0
|
||||||
|
php -d max_input_vars=$max_input_vars /var/www/html/admin/cli/cfg.php --name=timezone --set="${MOODLE_TIMEZONE-Europe/Madrid}"
|
||||||
|
php -d max_input_vars=$max_input_vars /var/www/html/admin/cli/cfg.php --name=cookiehttponly --set=1
|
||||||
|
|
||||||
|
# Add operator custom CSS
|
||||||
|
php -d max_input_vars=$max_input_vars /var/www/html/admin/cli/cfg.php --component=theme_cbe --name=scss \
|
||||||
|
--set="\$(cat <<-eof
|
||||||
|
$(sed -E "s/DOMAIN/${DOMAIN}/g" custom/css/custom.css 2>/dev/null || true)
|
||||||
|
eof
|
||||||
|
)"
|
||||||
|
php -d max_input_vars=$max_input_vars /var/www/html/admin/cli/purge_caches.php
|
||||||
|
|
||||||
elif false; then
|
elif false; then
|
||||||
echo "Upgrading moodle..."
|
echo "Upgrading moodle..."
|
||||||
php -d max_input_vars=$max_input_vars /var/www/html/admin/cli/maintenance.php --enable
|
php -d max_input_vars=$max_input_vars /var/www/html/admin/cli/maintenance.php --enable
|
||||||
|
@ -88,4 +103,4 @@ elif false; then
|
||||||
php -d max_input_vars=$max_input_vars /var/www/html/admin/cli/maintenance.php --disable
|
php -d max_input_vars=$max_input_vars /var/www/html/admin/cli/maintenance.php --disable
|
||||||
fi
|
fi
|
||||||
|
|
||||||
chown nobody:root /var/www/html -R
|
chown nobody:root /var/www/html -R
|
||||||
|
|
|
@ -18,10 +18,129 @@
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
if [ ! -f /var/www/html/config.php ]; then
|
if [ ! -f /var/www/html/config.php ]; then
|
||||||
|
|
||||||
|
mkdir -p "$SRC_FOLDER/moodle/mod/assign/submission"
|
||||||
|
mkdir -p "$SRC_FOLDER/moodle/auth/saml2"
|
||||||
|
mkdir -p "$SRC_FOLDER/moodle/theme/cbe"
|
||||||
|
mkdir -p "$SRC_FOLDER/moodle/blocks"
|
||||||
|
mkdir -p "$SRC_FOLDER/moodle/lib/editor/atto/plugins/tipnc"
|
||||||
|
|
||||||
#ADD plugins/auth_saml2.zip /var/www/html/
|
#ADD plugins/auth_saml2.zip /var/www/html/
|
||||||
curl --location https://github.com/isard-vdi/moodle-auth_saml2/archive/refs/heads/role_map.zip > auth_saml2.zip
|
curl --location https://github.com/isard-vdi/moodle-auth_saml2/archive/refs/heads/role_map.zip > auth_saml2.zip
|
||||||
unzip auth_saml2.zip -d /var/www/html/auth/
|
unzip auth_saml2.zip -d /var/www/html/auth/
|
||||||
mv /var/www/html/auth/moodle-auth_saml2-role_map /var/www/html/auth/saml2
|
mv /var/www/html/auth/moodle-auth_saml2-role_map /var/www/html/auth/saml2
|
||||||
rm auth_saml2.zip
|
rm auth_saml2.zip
|
||||||
|
|
||||||
|
curl --location "${MOODLE_PLUGIN_JITSI_OVERRIDE:-https://moodle.org/plugins/download.php/27002/mod_jitsi_moodle40_2022070602.zip}" > jitsi.zip
|
||||||
|
unzip jitsi.zip -d "$SRC_FOLDER/moodle/mod/"
|
||||||
|
rm jitsi.zip
|
||||||
|
|
||||||
|
curl --location "${MOODLE_PLUGIN_BBB_OVERRIDE:-https://moodle.org/plugins/download.php/26792/mod_bigbluebuttonbn_moodle311_2019101014.zip}" > bbb.zip
|
||||||
|
unzip bbb.zip -d "$SRC_FOLDER/moodle/mod/"
|
||||||
|
rm bbb.zip
|
||||||
|
|
||||||
|
# curl --location https://github.com/isard-vdi/moodle-auth_saml2/archive/refs/heads/role_map.zip > auth_saml2.zip
|
||||||
|
# curl --location https://moodle.org/plugins/download.php/24556/auth_saml2_moodle311_2021062900.zip > auth_saml2.zip
|
||||||
|
curl --location "${MOODLE_PLUGIN_SAML_OVERRIDE:-https://github.com/isard-vdi/moodle-auth_saml2/archive/refs/heads/role_map.zip}" > auth_saml2.zip
|
||||||
|
unzip auth_saml2.zip -d "$SRC_FOLDER/moodle/auth/"
|
||||||
|
mv "$SRC_FOLDER/moodle/auth/moodle-auth_saml2-role_map/*" "$SRC_FOLDER/moodle/auth/saml2/"
|
||||||
|
rm -rf "$SRC_FOLDER/moodle/auth/auth/moodle-auth_saml2-role_map"
|
||||||
|
rm auth_saml2.zip
|
||||||
|
M3IPSHARE="https://github.com/3iPunt/moodle_mod_tresipuntshare/archive/refs/heads/master.zip"
|
||||||
|
|
||||||
|
if [[ "${MOODLE_PLUGIN_TRESIPUNTSHARE_OVERRIDE:-${M3IPSHARE}}" == *"develop"* ]]; then
|
||||||
|
PLUGIN_BRANCH=develop
|
||||||
|
else
|
||||||
|
PLUGIN_BRANCH=master
|
||||||
|
fi
|
||||||
|
curl --location "${MOODLE_PLUGIN_TRESIPUNTSHARE_OVERRIDE:-${M3IPSHARE}}" > tresipuntshare.zip
|
||||||
|
unzip tresipuntshare.zip -d "$SRC_FOLDER/moodle/mod/"
|
||||||
|
mv "$SRC_FOLDER/moodle/auth/moodle_mod_tresipuntshare-$PLUGIN_BRANCH" "$SRC_FOLDER/moodle/auth/tresipuntshare"
|
||||||
|
rm tresipuntshare.zip
|
||||||
|
M3IPVIDEO="https://github.com/3iPunt/moodle_mod_tresipuntvideo/archive/refs/heads/master.zip"
|
||||||
|
|
||||||
|
if [[ "${MOODLE_PLUGIN_TRESIPUNTVIDEO_OVERRIDE:-${M3IPVIDEO}}" == *"develop"* ]]; then
|
||||||
|
PLUGIN_BRANCH=develop
|
||||||
|
else
|
||||||
|
PLUGIN_BRANCH=master
|
||||||
|
fi
|
||||||
|
curl --location "${MOODLE_PLUGIN_TRESIPUNTVIDEO_OVERRIDE:-${M3IPVIDEO}}" > tresipuntvideo.zip
|
||||||
|
unzip tresipuntvideo.zip -d "$SRC_FOLDER/moodle/mod/"
|
||||||
|
mv "$SRC_FOLDER/moodle/mod/moodle_mod_tresipuntvideo-$PLUGIN_BRANCH" "$SRC_FOLDER/moodle/mod/tresipuntvideo"
|
||||||
|
rm tresipuntvideo.zip
|
||||||
|
M3IPAUDIO="https://github.com/3iPunt/moodle_mod_tresipuntaudio/archive/refs/heads/master.zip"
|
||||||
|
|
||||||
|
if [[ "${MOODLE_PLUGIN_TRESIPUNTAUDIO_OVERRIDE:-${M3IPAUDIO}}" == *"develop"* ]]; then
|
||||||
|
PLUGIN_BRANCH=develop
|
||||||
|
else
|
||||||
|
PLUGIN_BRANCH=master
|
||||||
|
fi
|
||||||
|
curl --location "${MOODLE_PLUGIN_TRESIPUNTAUDIO_OVERRIDE:-${M3IPAUDIO}}" > tresipuntaudio.zip
|
||||||
|
unzip tresipuntaudio.zip -d "$SRC_FOLDER/moodle/mod/"
|
||||||
|
mv "$SRC_FOLDER/moodle/mod/moodle_mod_tresipuntaudio-$PLUGIN_BRANCH" "$SRC_FOLDER/moodle/mod/tresipuntaudio"
|
||||||
|
rm tresipuntaudio.zip
|
||||||
|
M3IPSUBMISSION="https://github.com/3iPunt/moodle_assignsubmission_tipnc/archive/refs/heads/master.zip"
|
||||||
|
|
||||||
|
if [[ "${MOODLE_PLUGIN_ASSIGNSUBMISSION_OVERRIDE:-${M3IPSUBMISSION}}" == *"develop"* ]]; then
|
||||||
|
PLUGIN_BRANCH=develop
|
||||||
|
else
|
||||||
|
PLUGIN_BRANCH=master
|
||||||
|
fi
|
||||||
|
curl --location "${MOODLE_PLUGIN_ASSIGNSUBMISSION_OVERRIDE:-${M3IPSUBMISSION}}" > assignsubmission_tipnc.zip
|
||||||
|
unzip assignsubmission_tipnc.zip -d "$SRC_FOLDER/moodle/mod/assign/submission/"
|
||||||
|
mv "$SRC_FOLDER/moodle/mod/assign/submission/moodle_assignsubmission_tipnc-$PLUGIN_BRANCH" "$SRC_FOLDER/moodle/mod/assign/submission/tipnc"
|
||||||
|
rm assignsubmission_tipnc.zip
|
||||||
|
M3IPSPEND="https://github.com/3iPunt/moodle_block_tresipuntmodspend/archive/refs/heads/master.zip"
|
||||||
|
|
||||||
|
curl --location "${MOODLE_PLUGIN_TRESIPUNTMODSPEND_OVERRIDE:-${M3IPSPEND}}" > block_tresipuntmodspend.zip
|
||||||
|
unzip block_tresipuntmodspend.zip -d "$SRC_FOLDER/moodle/blocks/"
|
||||||
|
rm block_tresipuntmodspend.zip
|
||||||
|
M3IPCBE="https://github.com/3iPunt/moodle_theme_cbe/archive/refs/heads/master.zip"
|
||||||
|
|
||||||
|
if [[ "${MOODLE_THEME_CBE_OVERRIDE:-${M3IPCBE}}" == *"develop"* ]]; then
|
||||||
|
PLUGIN_BRANCH=develop
|
||||||
|
else
|
||||||
|
PLUGIN_BRANCH=master
|
||||||
|
fi
|
||||||
|
curl --location "${MOODLE_THEME_CBE_OVERRIDE:-${M3IPCBE}}" > tresipunt_theme_cbe.zip
|
||||||
|
unzip tresipunt_theme_cbe.zip -d "$SRC_FOLDER/moodle/theme/cbe/"
|
||||||
|
mv "$SRC_FOLDER/moodle/theme/cbe/moodle_theme_cbe-$PLUGIN_BRANCH/*" "$SRC_FOLDER/moodle/theme/cbe/"
|
||||||
|
rm tresipunt_theme_cbe.zip
|
||||||
|
|
||||||
|
# mod_tipnextcloud
|
||||||
|
M3IPTN="https://github.com/3iPunt/mod_tipnextcloud/archive/refs/heads/master.zip"
|
||||||
|
if [[ "${MOODLE_MOD_TN_OVERRIDE:-${M3IPTN}}" == *"develop"* ]]; then
|
||||||
|
PLUGIN_BRANCH=develop
|
||||||
|
else
|
||||||
|
PLUGIN_BRANCH=master
|
||||||
|
fi
|
||||||
|
|
||||||
|
curl --location "${MOODLE_MOD_TN_OVERRIDE:-${M3IPTN}}" > tresipunt_mod_tn.zip
|
||||||
|
unzip tresipunt_mod_tn.zip -d "$SRC_FOLDER/moodle/mod/tipnextcloud/"
|
||||||
|
mv "$SRC_FOLDER/moodle/mod/tipnextcloud/mod_tipnextcloud-$PLUGIN_BRANCH/*" "$SRC_FOLDER/moodle/mod/tipnextcloud/"
|
||||||
|
rm tresipunt_mod_tn.zip
|
||||||
|
|
||||||
|
# atto_tipnc https://github.com/3iPunt/atto_tipnc
|
||||||
|
M3ATTOTIPTN="https://github.com/3iPunt/atto_tipnc/archive/refs/heads/master.zip"
|
||||||
|
if [[ "${MOODLE_ATTOTIPTN_OVERRIDE:-${M3ATTOTIPTN}}" == *"develop"* ]]; then
|
||||||
|
PLUGIN_BRANCH=develop
|
||||||
|
else
|
||||||
|
PLUGIN_BRANCH=master
|
||||||
|
fi
|
||||||
|
|
||||||
|
curl --location "${MOODLE_ATTOTIPTN_OVERRIDE:-https://github.com/3iPunt/atto_tipnc/archive/refs/heads/master.zip}" > tresipunt_atto_tipnc.zip
|
||||||
|
unzip tresipunt_atto_tipnc.zip -d "$SRC_FOLDER/moodle/lib/editor/atto/plugins/tipnc/"
|
||||||
|
mv "$SRC_FOLDER/moodle/lib/editor/atto/plugins/tipnc/atto_tipnc-$PLUGIN_BRANCH/*" "$SRC_FOLDER/moodle/lib/editor/atto/plugins/tipnc/"
|
||||||
|
rm tresipunt_atto_tipnc.zip
|
||||||
|
|
||||||
|
# local_mail
|
||||||
|
curl --location "${MOODLE_PLUGIN_MAIL_OVERRIDE:-https://moodle.org/plugins/download.php/26393/local_mail_moodle40_2017121407.zip}" > mail.zip
|
||||||
|
unzip mail.zip -d "$SRC_FOLDER/moodle/local/"
|
||||||
|
rm mail.zip
|
||||||
|
#mkdir -p /tmp/moodle/local/tresipuntimportgc
|
||||||
|
#cp -R local_plugins/moodle/tresipuntimportgc/* /tmp/moodle/local/tresipuntimportgc/
|
||||||
|
|
||||||
|
php -d max_input_vars=$max_input_vars /var/www/html/admin/cli/purge_caches.php
|
||||||
|
|
||||||
fi
|
fi
|
||||||
chown -R nobody:root /var/www/html
|
chown -R nobody:root /var/www/html
|
||||||
|
|
|
@ -14,12 +14,27 @@ services:
|
||||||
- ${SRC_FOLDER}/moodle:/var/www/html:rw
|
- ${SRC_FOLDER}/moodle:/var/www/html:rw
|
||||||
depends_on:
|
depends_on:
|
||||||
- dd-apps-postgresql
|
- dd-apps-postgresql
|
||||||
|
#env_file:
|
||||||
|
# - .env
|
||||||
environment:
|
environment:
|
||||||
#- LANG=en_US.UTF-8
|
#- LANG=en_US.UTF-8
|
||||||
#- LANGUAGE=en_US:en
|
#- LANGUAGE=en_US:en
|
||||||
|
- MOODLE_PLUGIN_JITSI_OVERRIDE=${MOODLE_PLUGIN_JITSI_OVERRIDE}
|
||||||
|
- MOODLE_PLUGIN_BBB_OVERRIDE=${MOODLE_PLUGIN_BBB_OVERRIDE}
|
||||||
|
- MOODLE_PLUGIN_SAML_OVERRID=${MOODLE_PLUGIN_SAML_OVERRID}
|
||||||
|
- MOODLE_PLUGIN_TRESIPUNTSHARE_OVERRIDE=${MOODLE_PLUGIN_TRESIPUNTSHARE_OVERRIDE}
|
||||||
|
- MOODLE_PLUGIN_TRESIPUNTVIDEO_OVERRIDE=${MOODLE_PLUGIN_TRESIPUNTVIDEO_OVERRIDE}
|
||||||
|
- MOODLE_PLUGIN_TRESIPUNTAUDIO_OVERRIDE=${MOODLE_PLUGIN_TRESIPUNTAUDIO_OVERRIDE}
|
||||||
|
- MOODLE_PLUGIN_ASSIGNSUBMISSION_OVERRIDE=${MOODLE_PLUGIN_ASSIGNSUBMISSION_OVERRIDE}
|
||||||
|
- MOODLE_PLUGIN_TRESIPUNTMODSPEND_OVERRIDE=${MOODLE_PLUGIN_TRESIPUNTMODSPEND_OVERRIDE}
|
||||||
|
- MOODLE_THEME_CBE_OVERRIDE=${MOODLE_THEME_CBE_OVERRIDE}
|
||||||
|
- MOODLE_MOD_TN_OVERRIDE=${MOODLE_MOD_TN_OVERRIDE}
|
||||||
|
- MOODLE_ATTOTIPTN_OVERRIDE=${MOODLE_ATTOTIPTN_OVERRIDE}
|
||||||
|
- MOODLE_PLUGIN_MAIL_OVERRIDE=${MOODLE_PLUGIN_MAIL_OVERRIDE}
|
||||||
- MOODLE_VERSION=${MOODLE_VERSION}
|
- MOODLE_VERSION=${MOODLE_VERSION}
|
||||||
- DOMAIN=${DOMAIN}
|
- DOMAIN=${DOMAIN}
|
||||||
- SITE_URL=https://moodle.${DOMAIN}
|
- SITE_URL=https://moodle.${DOMAIN}
|
||||||
|
- SRC_FOLDER=${SRC_FOLDER}
|
||||||
- DB_TYPE=pgsql
|
- DB_TYPE=pgsql
|
||||||
- DB_HOST=dd-apps-postgresql
|
- DB_HOST=dd-apps-postgresql
|
||||||
- DB_PORT=5432
|
- DB_PORT=5432
|
||||||
|
@ -34,6 +49,7 @@ services:
|
||||||
- MOODLE_SHORTSITENAME=${TITLE_SHORT} #
|
- MOODLE_SHORTSITENAME=${TITLE_SHORT} #
|
||||||
- MOODLE_USERNAME=${MOODLE_ADMIN_USER}
|
- MOODLE_USERNAME=${MOODLE_ADMIN_USER}
|
||||||
- MOODLE_PASSWORD=${MOODLE_ADMIN_PASSWORD}
|
- MOODLE_PASSWORD=${MOODLE_ADMIN_PASSWORD}
|
||||||
|
- MOODLE_TIMEZONE=${MOODLE_TIMEZONE}
|
||||||
- SMTP_HOST=${SMTP_HOST}
|
- SMTP_HOST=${SMTP_HOST}
|
||||||
- SMTP_PORT=${SMTP_PORT}
|
- SMTP_PORT=${SMTP_PORT}
|
||||||
- SMTP_USER=${SMTP_USER}
|
- SMTP_USER=${SMTP_USER}
|
||||||
|
|
172
dd-ctl
172
dd-ctl
|
@ -215,14 +215,16 @@ build_compose(){
|
||||||
CLAMAV_YML="clamav.yml"
|
CLAMAV_YML="clamav.yml"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
awk '( /^MOODLE_|^DD_/ )' dd.conf > dd-apps/docker/moodle/.env
|
||||||
|
|
||||||
## Prepare apps environment
|
## Prepare apps environment
|
||||||
ln -sf "${CUSTOM_PATH}/.env" dd-apps/.env
|
ln -sf "${CUSTOM_PATH}/.env" dd-apps/.env
|
||||||
ln -sf "${CUSTOM_PATH}/.env" dd-apps/docker/postgresql && \
|
ln -sf "${CUSTOM_PATH}/.env" dd-apps/docker/postgresql && \
|
||||||
ln -sf "${CUSTOM_PATH}/.env" dd-apps/docker/mariadb && \
|
ln -sf "${CUSTOM_PATH}/.env" dd-apps/docker/mariadb && \
|
||||||
ln -sf "${CUSTOM_PATH}/.env" dd-apps/docker/moodle && \
|
|
||||||
ln -sf "${CUSTOM_PATH}/.env" dd-apps/docker/nextcloud && \
|
ln -sf "${CUSTOM_PATH}/.env" dd-apps/docker/nextcloud && \
|
||||||
ln -sf "${CUSTOM_PATH}/.env" dd-apps/docker/wordpress && \
|
ln -sf "${CUSTOM_PATH}/.env" dd-apps/docker/wordpress && \
|
||||||
ln -sf "${CUSTOM_PATH}/.env" dd-apps/docker/etherpad
|
ln -sf "${CUSTOM_PATH}/.env" dd-apps/docker/etherpad
|
||||||
|
#ln -sf "${CUSTOM_PATH}/.env" dd-apps/docker/moodle
|
||||||
|
|
||||||
## Prepare sso environment
|
## Prepare sso environment
|
||||||
ln -sf "${CUSTOM_PATH}/.env" dd-sso/.env
|
ln -sf "${CUSTOM_PATH}/.env" dd-sso/.env
|
||||||
|
@ -489,25 +491,25 @@ nextcloud_scan(){
|
||||||
docker exec -u www-data dd-apps-nextcloud-app php occ files:scan --all
|
docker exec -u www-data dd-apps-nextcloud-app php occ files:scan --all
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_moodle(){
|
#setup_moodle(){
|
||||||
echo " --> Applying custom settings in moodle"
|
# echo " --> Applying custom settings in moodle"
|
||||||
# TODO: check why admin/cli/cfg can't be read with -u nobody
|
# # TODO: check why admin/cli/cfg can't be read with -u nobody
|
||||||
docker exec -i dd-apps-moodle sh -s <<-EOF
|
# docker exec -i dd-apps-moodle sh -s <<-EOF
|
||||||
php7 admin/cli/cfg.php --name=guestloginbutton --set=0
|
# php7 admin/cli/cfg.php --name=guestloginbutton --set=0
|
||||||
php7 admin/cli/cfg.php --name=enrol_plugins_enabled --set=manual
|
# php7 admin/cli/cfg.php --name=enrol_plugins_enabled --set=manual
|
||||||
php7 admin/cli/cfg.php --name=enablemobilewebservice --set=0
|
# php7 admin/cli/cfg.php --name=enablemobilewebservice --set=0
|
||||||
php7 admin/cli/cfg.php --name=enablebadges --set=0
|
# php7 admin/cli/cfg.php --name=enablebadges --set=0
|
||||||
php7 admin/cli/cfg.php --name=timezone --set="${MOODLE_TIMEZONE-Europe/Madrid}"
|
# php7 admin/cli/cfg.php --name=timezone --set="${MOODLE_TIMEZONE-Europe/Madrid}"
|
||||||
php7 admin/cli/cfg.php --name=cookiehttponly --set=1
|
# php7 admin/cli/cfg.php --name=cookiehttponly --set=1
|
||||||
# Add operator custom CSS
|
# # Add operator custom CSS
|
||||||
php7 admin/cli/cfg.php --component=theme_cbe --name=scss \
|
# php7 admin/cli/cfg.php --component=theme_cbe --name=scss \
|
||||||
--set="\$(cat <<-eof
|
# --set="\$(cat <<-eof
|
||||||
$(sed -E "s/DOMAIN/${DOMAIN}/g" custom/css/custom.css 2>/dev/null || true)
|
# $(sed -E "s/DOMAIN/${DOMAIN}/g" custom/css/custom.css 2>/dev/null || true)
|
||||||
eof
|
# eof
|
||||||
)"
|
# )"
|
||||||
php7 admin/cli/purge_caches.php
|
# php7 admin/cli/purge_caches.php
|
||||||
EOF
|
# EOF
|
||||||
}
|
#}
|
||||||
|
|
||||||
setup_wordpress(){
|
setup_wordpress(){
|
||||||
echo " --> Applying custom settings in wordpress"
|
echo " --> Applying custom settings in wordpress"
|
||||||
|
@ -672,128 +674,6 @@ extras_dump_keycloak_client(){
|
||||||
}
|
}
|
||||||
upgrade_plugins_moodle(){
|
upgrade_plugins_moodle(){
|
||||||
wait_for_moodle
|
wait_for_moodle
|
||||||
rm -rf /tmp/moodle
|
|
||||||
|
|
||||||
mkdir -p /tmp/moodle/mod
|
|
||||||
mkdir -p /tmp/moodle/mod/assign/submission
|
|
||||||
mkdir -p /tmp/moodle/auth/saml2
|
|
||||||
mkdir -p /tmp/moodle/theme/cbe
|
|
||||||
mkdir -p /tmp/moodle/blocks
|
|
||||||
mkdir -p /tmp/moodle/lib/editor/atto/plugins/tipnc
|
|
||||||
|
|
||||||
curl --location "${MOODLE_PLUGIN_JITSI_OVERRIDE:-https://moodle.org/plugins/download.php/27002/mod_jitsi_moodle40_2022070602.zip}" > jitsi.zip
|
|
||||||
unzip -q jitsi.zip -d /tmp/moodle/mod/
|
|
||||||
rm jitsi.zip
|
|
||||||
|
|
||||||
curl --location "${MOODLE_PLUGIN_BBB_OVERRIDE:-https://moodle.org/plugins/download.php/26792/mod_bigbluebuttonbn_moodle311_2019101014.zip}" > bbb.zip
|
|
||||||
unzip -q bbb.zip -d /tmp/moodle/mod/
|
|
||||||
rm bbb.zip
|
|
||||||
|
|
||||||
# curl --location https://github.com/isard-vdi/moodle-auth_saml2/archive/refs/heads/role_map.zip > auth_saml2.zip
|
|
||||||
# curl --location https://moodle.org/plugins/download.php/24556/auth_saml2_moodle311_2021062900.zip > auth_saml2.zip
|
|
||||||
curl --location "${MOODLE_PLUGIN_SAML_OVERRIDE:-https://github.com/isard-vdi/moodle-auth_saml2/archive/refs/heads/role_map.zip}" > auth_saml2.zip
|
|
||||||
unzip -q auth_saml2.zip -d /tmp/moodle/auth/
|
|
||||||
mv /tmp/moodle/auth/moodle-auth_saml2-role_map/* /tmp/moodle/auth/saml2/
|
|
||||||
rm -rf /tmp/moodle/auth/moodle-auth_saml2-role_map
|
|
||||||
rm auth_saml2.zip
|
|
||||||
M3IPSHARE="https://github.com/3iPunt/moodle_mod_tresipuntshare/archive/refs/heads/master.zip"
|
|
||||||
|
|
||||||
if [[ "${MOODLE_PLUGIN_TRESIPUNTSHARE_OVERRIDE:-${M3IPSHARE}}" == *"develop"* ]]; then
|
|
||||||
PLUGIN_BRANCH=develop
|
|
||||||
else
|
|
||||||
PLUGIN_BRANCH=master
|
|
||||||
fi
|
|
||||||
curl --location "${MOODLE_PLUGIN_TRESIPUNTSHARE_OVERRIDE:-${M3IPSHARE}}" > tresipuntshare.zip
|
|
||||||
unzip -q tresipuntshare.zip -d /tmp/moodle/mod/
|
|
||||||
mv /tmp/moodle/mod/moodle_mod_tresipuntshare-$PLUGIN_BRANCH /tmp/moodle/mod/tresipuntshare
|
|
||||||
rm tresipuntshare.zip
|
|
||||||
M3IPVIDEO="https://github.com/3iPunt/moodle_mod_tresipuntvideo/archive/refs/heads/master.zip"
|
|
||||||
|
|
||||||
if [[ "${MOODLE_PLUGIN_TRESIPUNTVIDEO_OVERRIDE:-${M3IPVIDEO}}" == *"develop"* ]]; then
|
|
||||||
PLUGIN_BRANCH=develop
|
|
||||||
else
|
|
||||||
PLUGIN_BRANCH=master
|
|
||||||
fi
|
|
||||||
curl --location "${MOODLE_PLUGIN_TRESIPUNTVIDEO_OVERRIDE:-${M3IPVIDEO}}" > tresipuntvideo.zip
|
|
||||||
unzip -q tresipuntvideo.zip -d /tmp/moodle/mod/
|
|
||||||
mv /tmp/moodle/mod/moodle_mod_tresipuntvideo-$PLUGIN_BRANCH /tmp/moodle/mod/tresipuntvideo
|
|
||||||
rm tresipuntvideo.zip
|
|
||||||
M3IPAUDIO="https://github.com/3iPunt/moodle_mod_tresipuntaudio/archive/refs/heads/master.zip"
|
|
||||||
|
|
||||||
if [[ "${MOODLE_PLUGIN_TRESIPUNTAUDIO_OVERRIDE:-${M3IPAUDIO}}" == *"develop"* ]]; then
|
|
||||||
PLUGIN_BRANCH=develop
|
|
||||||
else
|
|
||||||
PLUGIN_BRANCH=master
|
|
||||||
fi
|
|
||||||
curl --location "${MOODLE_PLUGIN_TRESIPUNTAUDIO_OVERRIDE:-${M3IPAUDIO}}" > tresipuntaudio.zip
|
|
||||||
unzip -q tresipuntaudio.zip -d /tmp/moodle/mod/
|
|
||||||
mv /tmp/moodle/mod/moodle_mod_tresipuntaudio-$PLUGIN_BRANCH /tmp/moodle/mod/tresipuntaudio
|
|
||||||
rm tresipuntaudio.zip
|
|
||||||
M3IPSUBMISSION="https://github.com/3iPunt/moodle_assignsubmission_tipnc/archive/refs/heads/master.zip"
|
|
||||||
|
|
||||||
if [[ "${MOODLE_PLUGIN_ASSIGNSUBMISSION_OVERRIDE:-${M3IPSUBMISSION}}" == *"develop"* ]]; then
|
|
||||||
PLUGIN_BRANCH=develop
|
|
||||||
else
|
|
||||||
PLUGIN_BRANCH=master
|
|
||||||
fi
|
|
||||||
curl --location "${MOODLE_PLUGIN_ASSIGNSUBMISSION_OVERRIDE:-${M3IPSUBMISSION}}" > assignsubmission_tipnc.zip
|
|
||||||
unzip -q assignsubmission_tipnc.zip -d /tmp/moodle/mod/assign/submission/
|
|
||||||
mv /tmp/moodle/mod/assign/submission/moodle_assignsubmission_tipnc-$PLUGIN_BRANCH /tmp/moodle/mod/assign/submission/tipnc
|
|
||||||
rm assignsubmission_tipnc.zip
|
|
||||||
M3IPSPEND="https://github.com/3iPunt/moodle_block_tresipuntmodspend/archive/refs/heads/master.zip"
|
|
||||||
|
|
||||||
curl --location "${MOODLE_PLUGIN_TRESIPUNTMODSPEND_OVERRIDE:-${M3IPSPEND}}" > block_tresipuntmodspend.zip
|
|
||||||
unzip -q block_tresipuntmodspend.zip -d /tmp/moodle/blocks/
|
|
||||||
rm block_tresipuntmodspend.zip
|
|
||||||
M3IPCBE="https://github.com/3iPunt/moodle_theme_cbe/archive/refs/heads/master.zip"
|
|
||||||
|
|
||||||
if [[ "${MOODLE_THEME_CBE_OVERRIDE:-${M3IPCBE}}" == *"develop"* ]]; then
|
|
||||||
PLUGIN_BRANCH=develop
|
|
||||||
else
|
|
||||||
PLUGIN_BRANCH=master
|
|
||||||
fi
|
|
||||||
curl --location "${MOODLE_THEME_CBE_OVERRIDE:-${M3IPCBE}}" > tresipunt_theme_cbe.zip
|
|
||||||
unzip -q tresipunt_theme_cbe.zip -d /tmp/moodle/theme/cbe/
|
|
||||||
mv /tmp/moodle/theme/cbe/moodle_theme_cbe-$PLUGIN_BRANCH/* /tmp/moodle/theme/cbe/
|
|
||||||
rm tresipunt_theme_cbe.zip
|
|
||||||
|
|
||||||
# mod_tipnextcloud
|
|
||||||
M3IPTN="https://github.com/3iPunt/mod_tipnextcloud/archive/refs/heads/master.zip"
|
|
||||||
if [[ "${MOODLE_MOD_TN_OVERRIDE:-${M3IPTN}}" == *"develop"* ]]; then
|
|
||||||
PLUGIN_BRANCH=develop
|
|
||||||
else
|
|
||||||
PLUGIN_BRANCH=master
|
|
||||||
fi
|
|
||||||
|
|
||||||
curl --location "${MOODLE_MOD_TN_OVERRIDE:-${M3IPTN}}" > tresipunt_mod_tn.zip
|
|
||||||
unzip -q tresipunt_mod_tn.zip -d /tmp/moodle/mod/tipnextcloud/
|
|
||||||
mv /tmp/moodle/mod/tipnextcloud/mod_tipnextcloud-$PLUGIN_BRANCH/* /tmp/moodle/mod/tipnextcloud/
|
|
||||||
rm tresipunt_mod_tn.zip
|
|
||||||
|
|
||||||
|
|
||||||
# atto_tipnc https://github.com/3iPunt/atto_tipnc
|
|
||||||
M3ATTOTIPTN="https://github.com/3iPunt/atto_tipnc/archive/refs/heads/master.zip"
|
|
||||||
if [[ "${MOODLE_ATTOTIPTN_OVERRIDE:-${M3ATTOTIPTN}}" == *"develop"* ]]; then
|
|
||||||
PLUGIN_BRANCH=develop
|
|
||||||
else
|
|
||||||
PLUGIN_BRANCH=master
|
|
||||||
fi
|
|
||||||
|
|
||||||
curl --location "${MOODLE_ATTOTIPTN_OVERRIDE:-https://github.com/3iPunt/atto_tipnc/archive/refs/heads/master.zip}" > tresipunt_atto_tipnc.zip
|
|
||||||
unzip -q tresipunt_atto_tipnc.zip -d /tmp/moodle/lib/editor/atto/plugins/tipnc/
|
|
||||||
mv /tmp/moodle/lib/editor/atto/plugins/tipnc/atto_tipnc-$PLUGIN_BRANCH/* /tmp/moodle/lib/editor/atto/plugins/tipnc/
|
|
||||||
rm tresipunt_atto_tipnc.zip
|
|
||||||
|
|
||||||
# local_mail
|
|
||||||
curl --location "${MOODLE_PLUGIN_MAIL_OVERRIDE:-https://moodle.org/plugins/download.php/26393/local_mail_moodle40_2017121407.zip}" > mail.zip
|
|
||||||
unzip -q mail.zip -d /tmp/moodle/local/
|
|
||||||
rm mail.zip
|
|
||||||
#mkdir -p /tmp/moodle/local/tresipuntimportgc
|
|
||||||
#cp -R local_plugins/moodle/tresipuntimportgc/* /tmp/moodle/local/tresipuntimportgc/
|
|
||||||
|
|
||||||
cp -R /tmp/moodle/* "$SRC_FOLDER/moodle/"
|
|
||||||
rm -rf /tmp/moodle
|
|
||||||
docker exec -i dd-apps-moodle php7 admin/cli/purge_caches.php
|
|
||||||
}
|
}
|
||||||
|
|
||||||
upgrade_plugins_nextcloud(){
|
upgrade_plugins_nextcloud(){
|
||||||
|
@ -952,12 +832,12 @@ case "$OPERATION" in
|
||||||
up
|
up
|
||||||
|
|
||||||
wait_for_moodle
|
wait_for_moodle
|
||||||
upgrade_plugins_moodle
|
#upgrade_plugins_moodle
|
||||||
upgrade_plugins_nextcloud
|
upgrade_plugins_nextcloud
|
||||||
upgrade_plugins_wp
|
upgrade_plugins_wp
|
||||||
|
|
||||||
setup_nextcloud
|
setup_nextcloud
|
||||||
setup_moodle
|
#setup_moodle
|
||||||
setup_wordpress
|
setup_wordpress
|
||||||
|
|
||||||
saml --no-up
|
saml --no-up
|
||||||
|
@ -985,7 +865,7 @@ case "$OPERATION" in
|
||||||
wait_for_moodle
|
wait_for_moodle
|
||||||
setup_nextcloud
|
setup_nextcloud
|
||||||
setup_wordpress
|
setup_wordpress
|
||||||
setup_moodle
|
#setup_moodle
|
||||||
;;
|
;;
|
||||||
down)
|
down)
|
||||||
down
|
down
|
||||||
|
@ -1040,7 +920,7 @@ case "$OPERATION" in
|
||||||
upgrade-plugins)
|
upgrade-plugins)
|
||||||
up
|
up
|
||||||
wait_for_moodle
|
wait_for_moodle
|
||||||
upgrade_plugins_moodle
|
#upgrade_plugins_moodle
|
||||||
upgrade_plugins_nextcloud
|
upgrade_plugins_nextcloud
|
||||||
upgrade_plugins_wp
|
upgrade_plugins_wp
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in New Issue