|
@ -26,6 +26,13 @@ platforms/
|
|||
/plugins/
|
||||
/plugins/android.json
|
||||
/plugins/ios.json
|
||||
resources/android/icon
|
||||
resources/android/splash
|
||||
resources/ios/icon
|
||||
resources/ios/splash
|
||||
resources/windows/icon
|
||||
resources/windows/splash
|
||||
config.xml
|
||||
www/
|
||||
!www/README.md
|
||||
$RECYCLE.BIN/
|
||||
|
|
114
.travis.yml
|
@ -1,25 +1,125 @@
|
|||
os: linux
|
||||
dist: bionic
|
||||
group: edge
|
||||
|
||||
language: node_js
|
||||
node_js: 11
|
||||
php: 7.1
|
||||
|
||||
android:
|
||||
components:
|
||||
- tools
|
||||
- platform-tools
|
||||
- build-tools-29.0.3
|
||||
- android-28
|
||||
- extra-google-google_play_services
|
||||
- extra-google-m2repository
|
||||
- extra-android-m2repository
|
||||
|
||||
git:
|
||||
depth: 3
|
||||
|
||||
before_cache:
|
||||
- rm -rf $HOME/.cache/electron-builder/wine
|
||||
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
|
||||
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.npm
|
||||
- $HOME/.cache/electron
|
||||
- $HOME/.cache/electron-builder
|
||||
- $HOME/.gradle/caches/
|
||||
- $HOME/.gradle/wrapper/
|
||||
- $HOME/.android/build-cache
|
||||
|
||||
before_script:
|
||||
- npm install npm@latest -g
|
||||
- if [ "$TRAVIS_OS_NAME" != 'windows' ] ; then npm install npm@latest -g ; fi
|
||||
- gulp
|
||||
|
||||
script:
|
||||
- npm run build --bailOnLintError true --typeCheckOnLint true
|
||||
|
||||
after_success:
|
||||
- scripts/ci.sh
|
||||
jobs:
|
||||
include:
|
||||
- stage: check
|
||||
if: NOT branch =~ /(master|integration|desktop)$/ AND env(DEPLOY) IS blank
|
||||
os: linux
|
||||
script: npm run build --bailOnLintError true --typeCheckOnLint true
|
||||
- stage: mirror
|
||||
if: branch IN (master, integration, desktop) AND repo = moodlehq/moodleapp AND type != cron
|
||||
os: linux
|
||||
script: scripts/mirror.sh
|
||||
- stage: prepare
|
||||
if: branch =~ /(master|^integration)$/ AND env(PREPARE) IS NOT blank AND env(PREPARE) = 1 AND type != cron
|
||||
os: linux
|
||||
script: scripts/aot.sh
|
||||
- stage: build
|
||||
name: "Build Android"
|
||||
if: env(DEPLOY) IS NOT blank AND ((env(DEPLOY) = 1 AND NOT branch = desktop) OR (env(DEPLOY) IN (2,3) AND tag IS NOT blank))
|
||||
os: linux
|
||||
dist: trusty
|
||||
group: edge
|
||||
language: android
|
||||
env:
|
||||
- BUILD_PLATFORM='android'
|
||||
before_install:
|
||||
- nvm install 11
|
||||
- node --version
|
||||
- npm --version
|
||||
- nvm --version
|
||||
- npm ci
|
||||
- npm install -g gulp
|
||||
script: scripts/aot.sh
|
||||
- stage: build
|
||||
name: "Build iOS"
|
||||
if: env(DEPLOY) IS NOT blank AND ((env(DEPLOY) = 1 AND NOT branch = desktop) OR (env(DEPLOY) IN (2,3) AND tag IS NOT blank))
|
||||
os: osx
|
||||
osx_image: xcode11.3
|
||||
env:
|
||||
- BUILD_PLATFORM='ios'
|
||||
script: scripts/aot.sh
|
||||
- stage: build
|
||||
name: "Build Linux"
|
||||
if: env(DEPLOY) IS NOT blank AND ((env(DEPLOY) = 1 AND branch = desktop) OR (env(DEPLOY) = 3 AND tag IS NOT blank))
|
||||
os: linux
|
||||
env:
|
||||
- ELECTRON_CACHE=$HOME/.cache/electron
|
||||
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
|
||||
- BUILD_PLATFORM='linux'
|
||||
script: scripts/aot.sh
|
||||
- stage: build
|
||||
name: "Build MacOS"
|
||||
if: env(DEPLOY) IS NOT blank AND ((env(DEPLOY) = 1 AND branch = desktop) OR (env(DEPLOY) = 3 AND tag IS NOT blank))
|
||||
os: osx
|
||||
osx_image: xcode11.3
|
||||
env:
|
||||
- ELECTRON_CACHE=$HOME/.cache/electron
|
||||
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
|
||||
- BUILD_PLATFORM='osx'
|
||||
script: scripts/aot.sh
|
||||
- stage: build
|
||||
name: "Build Windows"
|
||||
if: env(DEPLOY) IS NOT blank AND ((env(DEPLOY) = 1 AND branch = desktop) OR (env(DEPLOY) = 3 AND tag IS NOT blank))
|
||||
os: windows
|
||||
env:
|
||||
- ELECTRON_CACHE=$HOME/.cache/electron
|
||||
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
|
||||
- ELECTRON_BUILDER_ALLOW_UNRESOLVED_DEPENDENCIES=true
|
||||
- DEBUG=electron-windows-store
|
||||
- BUILD_PLATFORM='windows'
|
||||
script: scripts/aot.sh
|
||||
- stage: test
|
||||
name: "End to end tests (mod_forum, mod_messages and mod_comments)"
|
||||
services:
|
||||
- docker
|
||||
if: type = cron
|
||||
script: scripts/test_e2e.sh "@app&&@mod_forum" "@app&&@mod_messages" "@app&&@mod_comments"
|
||||
- stage: test
|
||||
name: "End to end tests (mod_data, mod_survey, mod_course, core_course and mod_courses)"
|
||||
services:
|
||||
- docker
|
||||
if: type = cron
|
||||
script: scripts/test_e2e.sh "@app&&@mod_data" "@app&&@mod_survey" "@app&&@mod_course" "@app&&@core_course" "@app&&@mod_courses"
|
||||
- stage: test
|
||||
name: "End to end tests (others)"
|
||||
services:
|
||||
- docker
|
||||
if: type = cron
|
||||
script: scripts/test_e2e.sh "@app&&~@mod_forum&&~@mod_messages&&~@mod_comments&&~@mod_data&&~@mod_survey&&~@mod_course&&~@core_course&&~@mod_courses"
|
||||
|
|
725
config.xml
|
@ -1,5 +1,5 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<widget id="com.moodle.moodlemobile" version="3.8.2" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
|
||||
<widget android-versionCode="39000" id="com.moodle.moodlemobile" ios-CFBundleVersion="3.9.0.0" version="3.9.0" versionCode="39000" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
|
||||
<name>Moodle</name>
|
||||
<description>Moodle official app</description>
|
||||
<author email="mobile@moodle.com" href="http://moodle.com">Moodle Mobile team</author>
|
||||
|
@ -8,6 +8,7 @@
|
|||
<access launch-external="yes" origin="tel:*" />
|
||||
<access launch-external="yes" origin="mailto:*" />
|
||||
<access launch-external="yes" origin="geo:*" />
|
||||
<allow-navigation href="moodleappfs:*" />
|
||||
<allow-navigation href="cdvfile:*" />
|
||||
<allow-navigation href="content:*" />
|
||||
<allow-navigation href="data:*" />
|
||||
|
@ -17,179 +18,631 @@
|
|||
<allow-intent href="sms:*" />
|
||||
<allow-intent href="mailto:*" />
|
||||
<allow-intent href="geo:*" />
|
||||
<preference name="permissions" value="none" />
|
||||
<preference name="orientation" value="default" />
|
||||
<preference name="target-device" value="universal" />
|
||||
<preference name="fullscreen" value="false" />
|
||||
<preference name="stay-in-webview" value="false" />
|
||||
<preference name="webviewbounce" value="false" />
|
||||
<preference name="AppendUserAgent" value="MoodleMobile" />
|
||||
<preference name="android-minSdkVersion" value="19" />
|
||||
<preference name="android-targetSdkVersion" value="29" />
|
||||
<preference name="UIWebViewBounce" value="false" />
|
||||
<preference name="DisallowOverscroll" value="true" />
|
||||
<preference name="prerendered-icon" value="true" />
|
||||
<preference name="AppendUserAgent" value="MoodleMobile" />
|
||||
<preference name="BackupWebStorage" value="none" />
|
||||
<preference name="ScrollEnabled" value="false" />
|
||||
<preference name="KeyboardDisplayRequiresUserAction" value="false" />
|
||||
<preference name="AllowInlineMediaPlayback" value="true" />
|
||||
<preference name="AndroidPersistentFileLocation" value="Compatibility" />
|
||||
<preference name="iosPersistentFileLocation" value="Compatibility" />
|
||||
<preference name="LoadUrlTimeoutValue" value="60000" />
|
||||
<preference name="load-url-timeout" value="60000" />
|
||||
<preference name="SplashScreen" value="screen" />
|
||||
<preference name="SplashScreenDelay" value="15000" />
|
||||
<preference name="SplashMaintainAspectRatio" value="true" />
|
||||
<preference name="SplashShowOnlyFirstTime" value="false" />
|
||||
<preference name="LoadUrlTimeoutValue" value="60000" />
|
||||
<preference name="android-minSdkVersion" value="19" />
|
||||
<preference name="android-targetSdkVersion" value="29" />
|
||||
<preference name="AndroidPersistentFileLocation" value="Compatibility" />
|
||||
<preference name="CustomURLSchemePluginClearsAndroidIntent" value="true" />
|
||||
<preference name="iosPersistentFileLocation" value="Compatibility" />
|
||||
<preference name="iosScheme" value="moodleappfs" />
|
||||
<preference name="WKWebViewOnly" value="true" />
|
||||
<feature name="StatusBar">
|
||||
<param name="ios-package" onload="true" value="CDVStatusBar" />
|
||||
</feature>
|
||||
<platform name="android">
|
||||
<resource-file src="MainActivity.java" target="app/src/main/java/com/moodle/moodlemobile/MainActivity.java" />
|
||||
<resource-file src="google-services.json" target="app/google-services.json" />
|
||||
<splash density="land-ldpi" qualifier="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
|
||||
<splash density="land-mdpi" qualifier="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
|
||||
<splash density="land-hdpi" qualifier="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
|
||||
<splash density="land-xhdpi" qualifier="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
|
||||
<splash density="land-xxhdpi" qualifier="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
|
||||
<splash density="land-xxxhdpi" qualifier="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
|
||||
<splash density="port-ldpi" qualifier="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
|
||||
<splash density="port-mdpi" qualifier="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
|
||||
<splash density="port-hdpi" qualifier="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
|
||||
<splash density="port-xhdpi" qualifier="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
|
||||
<splash density="port-xxhdpi" qualifier="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
|
||||
<splash density="port-xxxhdpi" qualifier="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
|
||||
<resource-file src="resources/android/icon/drawable-ldpi-smallicon.png" target="app/src/main/res/mipmap-ldpi/smallicon.png" />
|
||||
<resource-file src="resources/android/icon/drawable-mdpi-smallicon.png" target="app/src/main/res/mipmap-mdpi/smallicon.png" />
|
||||
<resource-file src="resources/android/icon/drawable-hdpi-smallicon.png" target="app/src/main/res/mipmap-hdpi/smallicon.png" />
|
||||
<resource-file src="resources/android/icon/drawable-xhdpi-smallicon.png" target="app/src/main/res/mipmap-xhdpi/smallicon.png" />
|
||||
<resource-file src="resources/android/splash/drawable-land-hdpi-screen.png" target="app/src/main/res/drawable-land-hdpi/screen.png" />
|
||||
<resource-file src="resources/android/splash/drawable-land-ldpi-screen.png" target="app/src/main/res/drawable-land-ldpi/screen.png" />
|
||||
<resource-file src="resources/android/splash/drawable-land-mdpi-screen.png" target="app/src/main/res/drawable-land-mdpi/screen.png" />
|
||||
<resource-file src="resources/android/splash/drawable-land-xhdpi-screen.png" target="app/src/main/res/drawable-land-xhdpi/screen.png" />
|
||||
<resource-file src="resources/android/splash/drawable-land-xxhdpi-screen.png" target="app/src/main/res/drawable-land-xxhdpi/screen.png" />
|
||||
<resource-file src="resources/android/splash/drawable-land-xxxhdpi-screen.png" target="app/src/main/res/drawable-land-xxxhdpi/screen.png" />
|
||||
<resource-file src="resources/android/splash/drawable-port-hdpi-screen.png" target="app/src/main/res/drawable-port-hdpi/screen.png" />
|
||||
<resource-file src="resources/android/splash/drawable-port-ldpi-screen.png" target="app/src/main/res/drawable-port-ldpi/screen.png" />
|
||||
<resource-file src="resources/android/splash/drawable-port-mdpi-screen.png" target="app/src/main/res/drawable-port-mdpi/screen.png" />
|
||||
<resource-file src="resources/android/splash/drawable-port-xhdpi-screen.png" target="app/src/main/res/drawable-port-xhdpi/screen.png" />
|
||||
<resource-file src="resources/android/splash/drawable-port-xxhdpi-screen.png" target="app/src/main/res/drawable-port-xxhdpi/screen.png" />
|
||||
<resource-file src="resources/android/splash/drawable-port-xxxhdpi-screen.png" target="app/src/main/res/drawable-port-xxxhdpi/screen.png" />
|
||||
<resource-file src="resources/values/colors.xml" target="/app/src/main/res/values/colors.xml" />
|
||||
<icon background="@color/background" density="ldpi" foreground="resources/android/icon/ldpi-foreground.png" src="resources/android/icon/drawable-ldpi-icon.png" />
|
||||
<icon background="@color/background" density="mdpi" foreground="resources/android/icon/mdpi-foreground.png" src="resources/android/icon/drawable-mdpi-icon.png" />
|
||||
<icon background="@color/background" density="hdpi" foreground="resources/android/icon/hdpi-foreground.png" src="resources/android/icon/drawable-hdpi-icon.png" />
|
||||
<icon background="@color/background" density="xhdpi" foreground="resources/android/icon/xhdpi-foreground.png" src="resources/android/icon/drawable-xhdpi-icon.png" />
|
||||
<icon background="@color/background" density="xxhdpi" foreground="resources/android/icon/xxhdpi-foreground.png" src="resources/android/icon/drawable-xxhdpi-icon.png" />
|
||||
<icon background="@color/background" density="xxxhdpi" foreground="resources/android/icon/xxxhdpi-foreground.png" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
|
||||
<edit-config file="AndroidManifest.xml" mode="merge" target="/manifest/application/activity[@android:name='MainActivity']">
|
||||
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|screenLayout|smallestScreenSize" android:debuggable="true" />
|
||||
</edit-config>
|
||||
<edit-config file="AndroidManifest.xml" mode="merge" target="/manifest/application">
|
||||
<application android:largeHeap="true" android:usesCleartextTraffic="true" />
|
||||
</edit-config>
|
||||
<config-file parent="/manifest/application" target="AndroidManifest.xml">
|
||||
<meta-data android:name="firebase_analytics_collection_deactivated" android:value="true" />
|
||||
</config-file>
|
||||
<config-file parent="/*" target="res/xml/config.xml">
|
||||
<feature name="IntentShim">
|
||||
<param name="android-package" value="com.darryncampbell.cordova.plugin.intent.IntentShim" />
|
||||
<param name="onload" value="true" />
|
||||
</feature>
|
||||
</config-file>
|
||||
<config-file mode="merge" parent="/manifest/application" platform="android" target="AndroidManifest.xml">
|
||||
<provider android:authorities="${applicationId}.darryncampbell.cordova.plugin.intent.fileprovider" android:exported="false" android:grantUriPermissions="true" android:name="com.darryncampbell.cordova.plugin.intent.CordovaPluginIntentFileProvider">
|
||||
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/provider_paths" />
|
||||
</provider>
|
||||
</config-file>
|
||||
<config-file parent="/*" target="res/xml/config.xml">
|
||||
<feature name="Clipboard">
|
||||
<param name="android-package" value="com.verso.cordova.clipboard.Clipboard" />
|
||||
</feature>
|
||||
</config-file>
|
||||
<config-file parent="/*" target="res/xml/config.xml">
|
||||
<feature name="CordovaHttpPlugin">
|
||||
<param name="android-package" value="com.silkimen.cordovahttp.CordovaHttpPlugin" />
|
||||
</feature>
|
||||
</config-file>
|
||||
<config-file parent="/*" target="res/xml/config.xml">
|
||||
<feature name="Camera">
|
||||
<param name="android-package" value="org.apache.cordova.camera.CameraLauncher" />
|
||||
</feature>
|
||||
</config-file>
|
||||
<config-file parent="/*" target="res/xml/config.xml">
|
||||
<feature name="LaunchMyApp">
|
||||
<param name="android-package" value="nl.xservices.plugins.LaunchMyApp" />
|
||||
</feature>
|
||||
</config-file>
|
||||
<config-file parent="/*" target="res/xml/config.xml">
|
||||
<feature name="Device">
|
||||
<param name="android-package" value="org.apache.cordova.device.Device" />
|
||||
</feature>
|
||||
</config-file>
|
||||
<config-file parent="/*" target="res/xml/config.xml">
|
||||
<feature name="File">
|
||||
<param name="android-package" value="org.apache.cordova.file.FileUtils" />
|
||||
<param name="onload" value="true" />
|
||||
</feature>
|
||||
<allow-navigation href="cdvfile:*" />
|
||||
</config-file>
|
||||
<config-file parent="/*" target="res/xml/config.xml">
|
||||
<feature name="FileOpener2">
|
||||
<param name="android-package" value="io.github.pwlin.cordova.plugins.fileopener2.FileOpener2" />
|
||||
</feature>
|
||||
</config-file>
|
||||
<config-file parent="/manifest/application" target="AndroidManifest.xml">
|
||||
<provider android:authorities="${applicationId}.opener.provider" android:exported="false" android:grantUriPermissions="true" android:name="io.github.pwlin.cordova.plugins.fileopener2.FileProvider">
|
||||
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/opener_paths" />
|
||||
</provider>
|
||||
</config-file>
|
||||
<config-file parent="/*" target="res/xml/config.xml">
|
||||
<feature name="FileTransfer">
|
||||
<param name="android-package" value="org.apache.cordova.filetransfer.FileTransfer" />
|
||||
</feature>
|
||||
</config-file>
|
||||
<config-file parent="/*" target="res/xml/config.xml">
|
||||
<feature name="Geolocation">
|
||||
<param name="android-package" value="org.apache.cordova.geolocation.Geolocation" />
|
||||
</feature>
|
||||
</config-file>
|
||||
<config-file parent="/*" target="res/xml/config.xml">
|
||||
<feature name="Globalization">
|
||||
<param name="android-package" value="org.apache.cordova.globalization.Globalization" />
|
||||
</feature>
|
||||
</config-file>
|
||||
<config-file parent="/*" target="res/xml/config.xml">
|
||||
<feature name="InAppBrowser">
|
||||
<param name="android-package" value="org.apache.cordova.inappbrowser.InAppBrowser" />
|
||||
</feature>
|
||||
</config-file>
|
||||
<config-file parent="/*" target="res/xml/config.xml">
|
||||
<feature name="LocalNotification">
|
||||
<param name="android-package" value="de.appplant.cordova.plugin.localnotification.LocalNotification" />
|
||||
</feature>
|
||||
</config-file>
|
||||
<config-file parent="/manifest/application" target="AndroidManifest.xml">
|
||||
<provider android:authorities="${applicationId}.localnotifications.provider" android:exported="false" android:grantUriPermissions="true" android:name="de.appplant.cordova.plugin.notification.util.AssetProvider">
|
||||
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/localnotification_provider_paths" />
|
||||
</provider>
|
||||
<receiver android:exported="false" android:name="de.appplant.cordova.plugin.localnotification.TriggerReceiver" />
|
||||
<receiver android:exported="false" android:name="de.appplant.cordova.plugin.localnotification.ClearReceiver" />
|
||||
<service android:exported="false" android:name="de.appplant.cordova.plugin.localnotification.ClickReceiver" />
|
||||
<receiver android:directBootAware="true" android:exported="false" android:name="de.appplant.cordova.plugin.localnotification.RestoreReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.LOCKED_BOOT_COMPLETED" />
|
||||
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
</config-file>
|
||||
<config-file parent="/*" target="res/xml/config.xml">
|
||||
<feature name="Capture">
|
||||
<param name="android-package" value="org.apache.cordova.mediacapture.Capture" />
|
||||
</feature>
|
||||
</config-file>
|
||||
<config-file parent="/*" target="res/xml/config.xml">
|
||||
<feature name="NetworkStatus">
|
||||
<param name="android-package" value="org.apache.cordova.networkinformation.NetworkManager" />
|
||||
</feature>
|
||||
</config-file>
|
||||
<config-file parent="/*" target="res/xml/config.xml">
|
||||
<feature name="QRScanner">
|
||||
<param name="android-package" value="com.bitpay.cordova.qrscanner.QRScanner" />
|
||||
</feature>
|
||||
</config-file>
|
||||
<config-file parent="/*" target="res/xml/config.xml">
|
||||
<feature name="CDVOrientation">
|
||||
<param name="android-package" value="cordova.plugins.screenorientation.CDVOrientation" />
|
||||
</feature>
|
||||
</config-file>
|
||||
<config-file parent="/*" target="res/xml/config.xml">
|
||||
<feature name="SplashScreen">
|
||||
<param name="android-package" value="org.apache.cordova.splashscreen.SplashScreen" />
|
||||
<param name="onload" value="true" />
|
||||
</feature>
|
||||
</config-file>
|
||||
<config-file parent="/*" target="res/xml/config.xml">
|
||||
<feature name="StatusBar">
|
||||
<param name="android-package" value="org.apache.cordova.statusbar.StatusBar" />
|
||||
<param name="onload" value="true" />
|
||||
</feature>
|
||||
</config-file>
|
||||
<config-file parent="/*" target="res/xml/config.xml">
|
||||
<feature name="Whitelist">
|
||||
<param name="android-package" value="org.apache.cordova.whitelist.WhitelistPlugin" />
|
||||
<param name="onload" value="true" />
|
||||
</feature>
|
||||
</config-file>
|
||||
<config-file parent="/*" target="res/xml/config.xml">
|
||||
<feature name="SQLitePlugin">
|
||||
<param name="android-package" value="io.sqlc.SQLitePlugin" />
|
||||
</feature>
|
||||
</config-file>
|
||||
<config-file parent="/*" target="res/xml/config.xml">
|
||||
<feature name="PushNotification">
|
||||
<param name="android-package" value="com.adobe.phonegap.push.PushPlugin" />
|
||||
</feature>
|
||||
</config-file>
|
||||
<config-file parent="/manifest/application" target="AndroidManifest.xml">
|
||||
<activity android:exported="true" android:name="com.adobe.phonegap.push.PushHandlerActivity" android:permission="${applicationId}.permission.PushHandlerActivity" />
|
||||
<receiver android:name="com.adobe.phonegap.push.BackgroundActionButtonHandler" />
|
||||
<receiver android:name="com.adobe.phonegap.push.PushDismissedHandler" />
|
||||
<service android:name="com.adobe.phonegap.push.FCMService">
|
||||
<intent-filter>
|
||||
<action android:name="com.google.firebase.MESSAGING_EVENT" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
<service android:name="com.adobe.phonegap.push.PushInstanceIDListenerService">
|
||||
<intent-filter>
|
||||
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
</config-file>
|
||||
</platform>
|
||||
<platform name="ios">
|
||||
<resource-file src="GoogleService-Info.plist" />
|
||||
<icon height="57" src="resources/ios/icon/icon.png" width="57" />
|
||||
<icon height="114" src="resources/ios/icon/icon@2x.png" width="114" />
|
||||
<icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
|
||||
<icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80" />
|
||||
<icon height="120" src="resources/ios/icon/icon-40@3x.png" width="120" />
|
||||
<icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
|
||||
<icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100" />
|
||||
<icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
|
||||
<icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120" />
|
||||
<icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180" />
|
||||
<icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
|
||||
<icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144" />
|
||||
<icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
|
||||
<icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152" />
|
||||
<icon height="167" src="resources/ios/icon/icon-83.5@2x.png" width="167" />
|
||||
<icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
|
||||
<icon height="58" src="resources/ios/icon/icon-small@2x.png" width="58" />
|
||||
<icon height="87" src="resources/ios/icon/icon-small@3x.png" width="87" />
|
||||
<splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" />
|
||||
<splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
|
||||
<splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
|
||||
<splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
|
||||
<splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" />
|
||||
<splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" />
|
||||
<splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
|
||||
<splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" />
|
||||
<splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" />
|
||||
<splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
|
||||
<splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
|
||||
<splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
|
||||
<icon height="1024" src="resources/ios/icon/icon-1024.png" width="1024" />
|
||||
<splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" />
|
||||
<edit-config file="*-Info.plist" mode="merge" target="NSLocationWhenInUseUsageDescription">
|
||||
<string>We need your location so you can attach it as part of your submissions.</string>
|
||||
</edit-config>
|
||||
<edit-config file="*-Info.plist" mode="merge" target="NSLocationAlwaysUsageDescription">
|
||||
<string>We need your location so you can attach it as part of your submissions.</string>
|
||||
</edit-config>
|
||||
<icon height="20" src="resources/ios/icon/icon-20.png" width="20" />
|
||||
<icon height="40" src="resources/ios/icon/icon-20@2x.png" width="40" />
|
||||
<icon height="60" src="resources/ios/icon/icon-20@3x.png" width="60" />
|
||||
<icon height="29" src="resources/ios/icon/icon-29.png" width="29" />
|
||||
<icon height="58" src="resources/ios/icon/icon-29@2x.png" width="58" />
|
||||
<icon height="87" src="resources/ios/icon/icon-29@3x.png" width="87" />
|
||||
<icon height="48" src="resources/ios/icon/icon-24@2x.png" width="48" />
|
||||
<icon height="55" src="resources/ios/icon/icon-27.5@2x.png" width="55" />
|
||||
<icon height="88" src="resources/ios/icon/icon-44@2x.png" width="88" />
|
||||
<icon height="172" src="resources/ios/icon/icon-86@2x.png" width="172" />
|
||||
<icon height="196" src="resources/ios/icon/icon-98@2x.png" width="196" />
|
||||
<icon height="216" src="resources/ios/icon/icon-108@2x.png" width="216" />
|
||||
<splash height="2688" src="resources/ios/splash/Default-2688h~iphone.png" width="1242" />
|
||||
<splash height="1242" src="resources/ios/splash/Default-Landscape-2688h~iphone.png" width="2688" />
|
||||
<splash height="1792" src="resources/ios/splash/Default-1792h~iphone.png" width="828" />
|
||||
<splash height="828" src="resources/ios/splash/Default-Landscape-1792h~iphone.png" width="1792" />
|
||||
<splash height="2436" src="resources/ios/splash/Default-2436h.png" width="1125" />
|
||||
<splash height="1125" src="resources/ios/splash/Default-Landscape-2436h.png" width="2436" />
|
||||
<edit-config file="*-Info.plist" mode="merge" target="NSCameraUsageDescription">
|
||||
<string>We need camera access to take pictures so you can attach them as part of your submissions.</string>
|
||||
</edit-config>
|
||||
<edit-config file="*-Info.plist" mode="merge" target="NSMicrophoneUsageDescription">
|
||||
<string>We need microphone access to record sounds so you can attach them as part of your submissions.</string>
|
||||
</edit-config>
|
||||
<edit-config file="*-Info.plist" mode="merge" target="NSPhotoLibraryUsageDescription">
|
||||
<string>We need photo library access to get pictures from there so you can attach them as part of your submissions.</string>
|
||||
</edit-config>
|
||||
<edit-config file="*-Info.plist" mode="merge" target="UISupportsDocumentBrowser">
|
||||
<true />
|
||||
</edit-config>
|
||||
<edit-config file="*-Info.plist" mode="merge" target="CFBundleShortVersionString">
|
||||
<string>3.9.0</string>
|
||||
</edit-config>
|
||||
<config-file parent="FIREBASE_ANALYTICS_COLLECTION_DEACTIVATED" target="*-Info.plist">
|
||||
<string>YES</string>
|
||||
</config-file>
|
||||
<config-file parent="UISupportedInterfaceOrientations" target="*-Info.plist">
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
</config-file>
|
||||
<config-file parent="UISupportedInterfaceOrientations~ipad" target="*-Info.plist">
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
</config-file>
|
||||
<config-file parent="UIRequiresFullScreen" target="*-Info.plist">
|
||||
<false />
|
||||
</config-file>
|
||||
<config-file parent="CFBundleDocumentTypes" target="*-Info.plist">
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Unknown File</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Alternate</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>public.calendar-event</string>
|
||||
<string>public.database</string>
|
||||
<string>public.executable</string>
|
||||
<string>public.data</string>
|
||||
<string>public.content </string>
|
||||
<string>public.item</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Video</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Alternate</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>public.video</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Image</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Alternate</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>public.image</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Web Archive</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Alternate</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>com.apple.webarchive</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>iWork Keynote</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Alternate</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>com.apple.keynote.key</string>
|
||||
<string>com.apple.iwork.keynote.key</string>
|
||||
<string>com.apple.iwork.keynote.kth</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>iWork Numbers</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Alternate</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>com.apple.numbers.numbers</string>
|
||||
<string>com.apple.iwork.numbers.numbers</string>
|
||||
<string>com.apple.iwork.numbers.template</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>iWork Pages</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Alternate</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>com.apple.page.pages</string>
|
||||
<string>com.apple.iwork.pages.pages</string>
|
||||
<string>com.apple.iwork.pages.template</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>OpenDocument Spreadsheet</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Alternate</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>org.oasis.opendocument.spreadsheet</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>OpenDocument Presentation</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Alternate</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>org.oasis.opendocument.presentation</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>OpenDocument Text</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Alternate</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>org.oasis.opendocument.text</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Folder</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Alternate</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>public.folder</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Audio</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Alternate</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>public.audio</string>
|
||||
<string>public.mp3</string>
|
||||
<string>public.mpeg-4-audio</string>
|
||||
<string>com.apple.protected-mpeg-4-audio</string>
|
||||
<string>public.aifc-audio</string>
|
||||
<string>com.apple.coreaudio-format</string>
|
||||
<string>public.aiff-audio</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Movie</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Alternate</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>public.movie</string>
|
||||
<string>public.3gpp2</string>
|
||||
<string>public.3gpp</string>
|
||||
<string>public.mpeg</string>
|
||||
<string>com.apple.quicktime-movie</string>
|
||||
<string>public.mpeg-4</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>GIF image</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Alternate</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>com.compuserve.gif</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>PNG image</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Alternate</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>public.png</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>TIFF image</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Alternate</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>public.tiff</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>JPEG image</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Alternate</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>public.jpeg</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>XML</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Alternate</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>public.xml</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>HTML</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Alternate</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>public.html</string>
|
||||
<string>public.xhtml</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Rich Text</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Alternate</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>public.rtf</string>
|
||||
<string>com.apple.rtfd</string>
|
||||
<string>com.apple.flat-rtfd</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Text</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Alternate</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>public.text</string>
|
||||
<string>public.plain-text</string>
|
||||
<string>public.utf8-plain-text</string>
|
||||
<string>public.utf16-external-plain-text</string>
|
||||
<string>public.utf16-plain-text</string>
|
||||
<string>com.apple.traditional-mac-plain-text</string>
|
||||
<string>public.source-code</string>
|
||||
<string>public.c-source</string>
|
||||
<string>public.objective-c-source</string>
|
||||
<string>public.c-plus-plus-source</string>
|
||||
<string>public.objective-c-plus-plus-source</string>
|
||||
<string>public.c-header</string>
|
||||
<string>public.c-plus-plus-header</string>
|
||||
<string>com.sun.java-source</string>
|
||||
<string>public.script</string>
|
||||
<string>public.shell-script</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>zip</string>
|
||||
<string>zipx</string>
|
||||
</array>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Zip archive</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Alternate</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>public.zip-archive</string>
|
||||
<string>public.archive</string>
|
||||
<string>com.pkware.zip-archive</string>
|
||||
<string>com.pkware.zipx-archive</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>rar</string>
|
||||
<string>RAR</string>
|
||||
</array>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Rar archive</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Alternate</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>com.rarlab.rar-archive</string>
|
||||
<string>public.archive</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>7z</string>
|
||||
<string>7Z</string>
|
||||
</array>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>7z archive</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Alternate</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>org.7-zip.7-zip-archive</string>
|
||||
<string>public.archive</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Waveform audio</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Alternate</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>com.microsoft.waveform-audio</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Windows icon image</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Alternate</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>com.microsoft.ico</string>
|
||||
<string>com.apple.icns</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Windows bitmap image</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Alternate</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>com.microsoft.bmp</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Microsoft PowerPoint</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Alternate</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>com.microsoft.powerpoint.ppt</string>
|
||||
<string>org.openxmlformats.presentationml.presentation</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Microsoft Excel</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Alternate</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>org.openxmlformats.spreadsheetml.sheet</string>
|
||||
<string>com.microsoft.excel.xls</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Microsoft Word</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Alternate</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>com.microsoft.word.doc</string>
|
||||
<string>com.microsoft.word.wordml</string>
|
||||
<string>org.openxmlformats.wordprocessingml.document</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>PDF</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Alternate</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>com.adobe.pdf</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
</config-file>
|
||||
</platform>
|
||||
<plugin name="com-darryncampbell-cordova-plugin-intent" spec="1.3.0" />
|
||||
<plugin name="cordova-android-support-gradle-release" spec="3.0.1">
|
||||
<variable name="ANDROID_SUPPORT_VERSION" value="27.1.0" />
|
||||
</plugin>
|
||||
<plugin name="cordova-clipboard" spec="1.3.0" />
|
||||
<plugin name="cordova-plugin-badge" spec="0.8.8" />
|
||||
<plugin name="cordova-plugin-camera" spec="4.1.0" />
|
||||
<plugin name="cordova-plugin-customurlscheme" spec="4.4.0">
|
||||
<variable name="URL_SCHEME" value="moodlemobile" />
|
||||
</plugin>
|
||||
<plugin name="cordova-plugin-device" spec="2.0.3" />
|
||||
<plugin name="cordova-plugin-file" spec="6.0.2" />
|
||||
<plugin name="cordova-plugin-file-opener2" spec="2.2.1" />
|
||||
<plugin name="cordova-plugin-file-transfer" spec="1.7.1" />
|
||||
<plugin name="cordova-plugin-geolocation" spec="4.0.2">
|
||||
<variable name="GEOLOCATION_USAGE_DESCRIPTION" value="We need your location so you can attach it as part of your submissions." />
|
||||
</plugin>
|
||||
<plugin name="cordova-plugin-globalization" spec="1.11.0" />
|
||||
<plugin name="cordova-plugin-inappbrowser" spec="3.1.0" />
|
||||
<plugin name="cordova-plugin-ionic-keyboard" spec="2.1.3" />
|
||||
<plugin name="cordova-plugin-local-notification" spec="https://github.com/moodlemobile/cordova-plugin-local-notification.git#moodle" />
|
||||
<plugin name="cordova-plugin-media-capture" spec="3.0.3" />
|
||||
<plugin name="cordova-plugin-network-information" spec="2.0.2" />
|
||||
<plugin name="cordova-plugin-screen-orientation" spec="3.0.2" />
|
||||
<plugin name="cordova-plugin-splashscreen" spec="5.0.3" />
|
||||
<plugin name="cordova-plugin-statusbar" spec="2.4.3" />
|
||||
<plugin name="cordova-plugin-whitelist" spec="1.3.4" />
|
||||
<plugin name="cordova-plugin-zip" spec="3.1.0" />
|
||||
<plugin name="cordova-sqlite-storage" spec="3.4.0" />
|
||||
<plugin name="nl.kingsquare.cordova.background-audio" spec="1.0.1" />
|
||||
<plugin name="phonegap-plugin-push" spec="https://github.com/moodlemobile/phonegap-plugin-push.git#moodle-v3">
|
||||
<variable name="ANDROID_SUPPORT_V13_VERSION" value="27.+" />
|
||||
<variable name="FCM_VERSION" value="17.5.+" />
|
||||
</plugin>
|
||||
<edit-config file="AndroidManifest.xml" mode="merge" target="/manifest/application/activity[@android:name='MainActivity']">
|
||||
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|screenLayout|smallestScreenSize" android:debuggable="true" />
|
||||
</edit-config>
|
||||
<edit-config file="AndroidManifest.xml" mode="merge" target="/manifest/application">
|
||||
<application android:usesCleartextTraffic="true" />
|
||||
</edit-config>
|
||||
<config-file parent="/manifest/application" target="AndroidManifest.xml">
|
||||
<meta-data android:name="firebase_analytics_collection_deactivated" android:value="true" />
|
||||
</config-file>
|
||||
<config-file parent="FIREBASE_ANALYTICS_COLLECTION_DEACTIVATED" target="*-Info.plist">
|
||||
<string>YES</string>
|
||||
</config-file>
|
||||
<engine name="android" spec="8.0.0" />
|
||||
<engine name="ios" spec="5.0.1" />
|
||||
</widget>
|
||||
|
|
|
@ -12,7 +12,8 @@ const customConfig = {
|
|||
'@providers': resolve('./src/providers'),
|
||||
'@components': resolve('./src/components'),
|
||||
'@directives': resolve('./src/directives'),
|
||||
'@pipes': resolve('./src/pipes')
|
||||
'@pipes': resolve('./src/pipes'),
|
||||
'@singletons': resolve('./src/singletons'),
|
||||
}
|
||||
},
|
||||
externals: [
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<Identity Name="3312ADB7.MoodleDesktop"
|
||||
ProcessorArchitecture="x64"
|
||||
Publisher="CN=33CDCDF6-1EB5-4827-9897-ED25C91A32F6"
|
||||
Version="3.8.2.0" />
|
||||
Version="3.9.0.0" />
|
||||
<Properties>
|
||||
<DisplayName>Moodle Desktop</DisplayName>
|
||||
<PublisherDisplayName>Moodle Pty Ltd.</PublisherDisplayName>
|
||||
|
|
47
package.json
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "moodlemobile",
|
||||
"version": "3.8.2",
|
||||
"version": "3.9.0",
|
||||
"description": "The official app for Moodle.",
|
||||
"author": {
|
||||
"name": "Moodle Pty Ltd.",
|
||||
|
@ -24,6 +24,12 @@
|
|||
}
|
||||
],
|
||||
"scripts": {
|
||||
"start": "npm run dev",
|
||||
"dev": "ionic serve",
|
||||
"dev:android": "ionic cordova run android --livereload",
|
||||
"dev:ios": "ionic cordova run ios --livereload",
|
||||
"prod:android": "ionic cordova run android --aot",
|
||||
"prod:ios": "ionic cordova run ios --aot",
|
||||
"setup": "npm install && npx cordova prepare && npx gulp",
|
||||
"clean": "npx ionic-app-scripts clean",
|
||||
"build": "npx ionic-app-scripts build",
|
||||
|
@ -51,6 +57,7 @@
|
|||
"@angular/platform-browser-dynamic": "5.2.11",
|
||||
"@ionic-native/badge": "4.20.0",
|
||||
"@ionic-native/camera": "4.20.0",
|
||||
"@ionic-native/chooser": "^4.20.0",
|
||||
"@ionic-native/clipboard": "4.20.0",
|
||||
"@ionic-native/core": "4.20.0",
|
||||
"@ionic-native/device": "4.20.0",
|
||||
|
@ -59,12 +66,14 @@
|
|||
"@ionic-native/file-transfer": "4.20.0",
|
||||
"@ionic-native/geolocation": "4.20.0",
|
||||
"@ionic-native/globalization": "4.20.0",
|
||||
"@ionic-native/http": "^4.20.0",
|
||||
"@ionic-native/in-app-browser": "4.20.0",
|
||||
"@ionic-native/keyboard": "4.20.0",
|
||||
"@ionic-native/local-notifications": "4.20.0",
|
||||
"@ionic-native/media-capture": "4.20.0",
|
||||
"@ionic-native/network": "4.20.0",
|
||||
"@ionic-native/push": "4.20.0",
|
||||
"@ionic-native/qr-scanner": "4.20.0",
|
||||
"@ionic-native/screen-orientation": "4.20.0",
|
||||
"@ionic-native/splash-screen": "4.20.0",
|
||||
"@ionic-native/sqlite": "4.20.0",
|
||||
|
@ -81,24 +90,30 @@
|
|||
"cordova-android-support-gradle-release": "3.0.1",
|
||||
"cordova-clipboard": "1.3.0",
|
||||
"cordova-ios": "5.1.1",
|
||||
"cordova-plugin-advanced-http": "2.4.1",
|
||||
"cordova-plugin-badge": "0.8.8",
|
||||
"cordova-plugin-camera": "4.1.0",
|
||||
"cordova-plugin-chooser": "1.3.1",
|
||||
"cordova-plugin-customurlscheme": "5.0.0",
|
||||
"cordova-plugin-device": "2.0.3",
|
||||
"cordova-plugin-file": "6.0.2",
|
||||
"cordova-plugin-file-opener2": "3.0.0",
|
||||
"cordova-plugin-file-transfer": "1.7.1",
|
||||
"cordova-plugin-geolocation": "4.0.2",
|
||||
"cordova-plugin-geolocation": "git+https://github.com/apache/cordova-plugin-geolocation.git#89cf51d222e8f225bdfb661965b3007d669c40ff",
|
||||
"cordova-plugin-globalization": "1.11.0",
|
||||
"cordova-plugin-inappbrowser": "3.2.0",
|
||||
"cordova-plugin-inappbrowser": "4.0.0",
|
||||
"cordova-plugin-ionic-keyboard": "2.1.3",
|
||||
"cordova-plugin-ionic-webview": "4.1.3",
|
||||
"cordova-plugin-local-notification": "git+https://github.com/moodlemobile/cordova-plugin-local-notification.git#moodle",
|
||||
"cordova-plugin-media-capture": "3.0.3",
|
||||
"cordova-plugin-network-information": "2.0.2",
|
||||
"cordova-plugin-qrscanner": "git+https://github.com/moodlemobile/cordova-plugin-qrscanner.git#dist",
|
||||
"cordova-plugin-screen-orientation": "3.0.2",
|
||||
"cordova-plugin-splashscreen": "5.0.3",
|
||||
"cordova-plugin-statusbar": "2.4.3",
|
||||
"cordova-plugin-whitelist": "1.3.4",
|
||||
"cordova-plugin-wkuserscript": "git+https://github.com/moodlemobile/cordova-plugin-wkuserscript.git",
|
||||
"cordova-plugin-wkwebview-cookies": "git+https://github.com/moodlemobile/cordova-plugin-wkwebview-cookies.git",
|
||||
"cordova-plugin-zip": "3.1.0",
|
||||
"cordova-sqlite-storage": "4.0.0",
|
||||
"cordova-support-google-services": "1.3.2",
|
||||
|
@ -121,12 +136,14 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@ionic/app-scripts": "3.2.3",
|
||||
"@ionic/cli": "^6.9.3",
|
||||
"@types/cordova": "0.0.34",
|
||||
"@types/cordova-plugin-file-transfer": "0.0.3",
|
||||
"@types/cordova-plugin-globalization": "0.0.3",
|
||||
"@types/cordova-plugin-network-information": "0.0.3",
|
||||
"@types/node": "8.10.59",
|
||||
"@types/promise.prototype.finally": "2.0.4",
|
||||
"acorn": "^5.7.4",
|
||||
"electron-builder-lib": "20.23.1",
|
||||
"electron-rebuild": "1.10.0",
|
||||
"gulp": "4.0.2",
|
||||
|
@ -137,6 +154,8 @@
|
|||
"gulp-rename": "2.0.0",
|
||||
"gulp-slash": "1.1.3",
|
||||
"lodash.template": "4.5.0",
|
||||
"minimist": "^1.2.5",
|
||||
"native-run": "^1.0.0",
|
||||
"node-loader": "0.6.0",
|
||||
"through": "2.3.8",
|
||||
"typescript": "2.6.2",
|
||||
|
@ -181,11 +200,20 @@
|
|||
"nl.kingsquare.cordova.background-audio": {},
|
||||
"phonegap-plugin-push": {
|
||||
"ANDROID_SUPPORT_V13_VERSION": "27.+",
|
||||
"FCM_VERSION": "17.0.+"
|
||||
"FCM_VERSION": "17.5.+"
|
||||
},
|
||||
"cordova-plugin-geolocation": {
|
||||
"GEOLOCATION_USAGE_DESCRIPTION": "To locate you"
|
||||
}
|
||||
"GEOLOCATION_USAGE_DESCRIPTION": "We need your location so you can attach it as part of your submissions.",
|
||||
"GPS_REQUIRED": "false"
|
||||
},
|
||||
"cordova-plugin-ionic-webview": {},
|
||||
"cordova-plugin-advanced-http": {
|
||||
"OKHTTP_VERSION": "3.10.0"
|
||||
},
|
||||
"cordova-plugin-wkwebview-cookies": {},
|
||||
"cordova-plugin-qrscanner": {},
|
||||
"cordova-plugin-chooser": {},
|
||||
"cordova-plugin-wkuserscript": {}
|
||||
}
|
||||
},
|
||||
"main": "desktop/electron.js",
|
||||
|
@ -225,7 +253,7 @@
|
|||
"category": "public.app-category.education",
|
||||
"icon": "resources/desktop/icon.icns",
|
||||
"target": "mas",
|
||||
"bundleVersion": "3.8.2",
|
||||
"bundleVersion": "3.9.0",
|
||||
"extendInfo": {
|
||||
"ElectronTeamID": "2NU57U5PAW"
|
||||
}
|
||||
|
@ -244,5 +272,8 @@
|
|||
"nsis": {
|
||||
"deleteAppDataOnUninstall": true
|
||||
}
|
||||
},
|
||||
"engines": {
|
||||
"node": "11.x"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,98 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
id="Layer_1"
|
||||
data-name="Layer 1"
|
||||
viewBox="0 0 1024 1024"
|
||||
version="1.1"
|
||||
sodipodi:docname="icon-foreground.svg"
|
||||
inkscape:version="0.92.2 5c3e80d, 2017-08-06"
|
||||
inkscape:export-filename="/Users/pau/git/mm3/resources/android/icon-foreground.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96">
|
||||
<metadata
|
||||
id="metadata23">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title>MoodleApp_Icon_White_RGB</dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1306"
|
||||
inkscape:window-height="970"
|
||||
id="namedview21"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.11523438"
|
||||
inkscape:cx="-652.75324"
|
||||
inkscape:cy="-1188.1419"
|
||||
inkscape:window-x="1894"
|
||||
inkscape:window-y="73"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="Layer_1" />
|
||||
<defs
|
||||
id="defs4">
|
||||
<style
|
||||
id="style2">.cls-1{fill:#fff;}.cls-2,.cls-3,.cls-4{fill:#f48020;}.cls-3,.cls-4{stroke:#4a4a4c;}.cls-3{stroke-width:5.24px;}.cls-4{stroke-width:5.28px;}.cls-5{fill:#333;}</style>
|
||||
</defs>
|
||||
<title
|
||||
id="title6">MoodleApp_Icon_White_RGB</title>
|
||||
<g
|
||||
id="g118"
|
||||
transform="matrix(0.59052793,0,0,0.59052793,211.20967,210.89845)"
|
||||
style="opacity:1">
|
||||
<path
|
||||
transform="translate(-12,-10)"
|
||||
id="path10"
|
||||
d="M 714.85,763.42 V 524.26 q 0,-75 -62,-75 -62,0 -62,75 V 763.42 H 469.18 V 524.26 q 0,-75 -60.9,-75 -62,0 -61.95,75 V 763.42 H 224.56 V 510.14 q 0,-78.27 54.35,-118.48 47.85,-35.88 129.37,-35.9 82.64,0 121.77,42.4 33.69,-42.39 122.85,-42.4 81.54,0 129.35,35.9 54.35,40.2 54.35,118.48 v 253.28 z"
|
||||
class="cls-2"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#f48020" />
|
||||
<path
|
||||
transform="translate(-12,-10)"
|
||||
id="path12"
|
||||
d="M 77.26,402"
|
||||
class="cls-3"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#f48020;stroke:#4a4a4c;stroke-width:5.23999977px" />
|
||||
<path
|
||||
transform="translate(-12,-10)"
|
||||
id="path14"
|
||||
d="M 79.41,401"
|
||||
class="cls-4"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#f48020;stroke:#4a4a4c;stroke-width:5.28000021px" />
|
||||
<path
|
||||
transform="translate(-12,-10)"
|
||||
id="path16"
|
||||
d="m 459.3,338 121.9,-88.72 -1.56,-5.4 c -206.31,21.27 -327.1,49 -505.07,154.49 l 1.61,5.27 46.53,-1.49 c 33.56,1.16 68.26,2.79 101.7,2.93 -1.67,18.28 -0.91,39.85 2.6,65.14 v 0 l -0.81,7.1 c 114.91,38.91 224,3.38 281.36,-97.15 l -3.39,-4.62 C 494.8,365.05 475.76,349.59 459.3,338 Z"
|
||||
class="cls-5"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#333333" />
|
||||
<path
|
||||
transform="translate(-12,-10)"
|
||||
id="path18"
|
||||
d="m 326.35,322.85 c -0.67,-2.38 -4.92,-3.26 -9.48,-2 -3.49,1 -6.17,2.94 -6.95,4.86 -41,11 -108.78,30.36 -156.5,46.43 l -2.94,1 c -36.93,12.42 -54.72,18.79 -55.82,27.76 -5.06,40.82 -1.93,93.35 -1.9,94 l 0.41,14.18 c -21.54,61 0.15,109.76 18.56,154.4 0.12,-55.17 2.36,-100.08 -13.21,-157.18 -0.44,-8.46 -3.31,-67.19 1.33,-104.76 0.76,-6.09 25.79,-14.52 52.3,-23.43 l 2.94,-1 c 48.76,-16.41 118.53,-36.24 159.1,-47.1 a 14.48,14.48 0 0 0 5.08,-0.55 c 4.56,-1.27 7.73,-4.23 7.08,-6.61 z"
|
||||
class="cls-5"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#333333" />
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 28 KiB |
|
@ -1 +0,0 @@
|
|||
5e8ac0ef8768e0fad3284434d24064f8
|
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 9.7 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 6.0 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 18 KiB |
|
@ -1 +0,0 @@
|
|||
5225afcaf865b3e218501903bef688e0
|
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 608 B |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 851 B |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 851 B |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 6.1 KiB |
|
@ -1 +0,0 @@
|
|||
4d2128e5cc9659b321956c1178057980
|
|
@ -0,0 +1,32 @@
|
|||
#!/bin/bash
|
||||
source "scripts/functions.sh"
|
||||
|
||||
if [ ! -z $GIT_ORG_PRIVATE ] && [ ! -z $GIT_TOKEN ] ; then
|
||||
print_title "Run scripts"
|
||||
git clone --depth 1 https://$GIT_TOKEN@github.com/$GIT_ORG_PRIVATE/apps-scripts.git ../scripts
|
||||
cp ../scripts/*.sh scripts/
|
||||
|
||||
if [ $TRAVIS_BUILD_STAGE_NAME == 'prepare' ] && [ -f scripts/prepare.sh ] ; then
|
||||
print_title 'Prepare Build'
|
||||
./scripts/prepare.sh
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
elif [ $TRAVIS_BUILD_STAGE_NAME != 'prepare' ] && [ -f scripts/platform.sh ]; then
|
||||
print_title 'Platform Build'
|
||||
./scripts/platform.sh
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
else
|
||||
print_title "AOT Compilation"
|
||||
# Dynamic template loading without errors.
|
||||
sed -ie $'s~throw new Error("No ResourceLoader.*~url = "templates/" + url;\\\nvar resolve;\\\nvar reject;\\\nvar promise = new Promise(function (res, rej) {\\\nresolve = res;\\\nreject = rej;\\\n});\\\nvar xhr = new XMLHttpRequest();\\\nxhr.open("GET", url, true);\\\nxhr.responseType = "text";\\\nxhr.onload = function () {\\\nvar response = xhr.response || xhr.responseText;\\\nvar status = xhr.status === 1223 ? 204 : xhr.status;\\\nif (status === 0) {\\\nstatus = response ? 200 : 0;\\\n}\\\nif (200 <= status \&\& status <= 300) {\\\nresolve(response);\\\n}\\\nelse {\\\nreject("Failed to load " + url);\\\n}\\\n};\\\nxhr.onerror = function () { reject("Failed to load " + url); };\\\nxhr.send();\\\nreturn promise;\\\n~g' node_modules/@angular/platform-browser-dynamic/esm5/platform-browser-dynamic.js
|
||||
# Do not run JS optimizations to avoid problems with site plugins.
|
||||
sed -ie "s/context\.isProd || hasArg('--optimizeJs')/false/g" node_modules/@ionic/app-scripts/dist/util/config.js
|
||||
npm run ionic:build -- --prod
|
||||
fi
|
||||
|
|
@ -1,81 +0,0 @@
|
|||
#!/bin/bash
|
||||
source "scripts/functions.sh"
|
||||
|
||||
if [ "$TRAVIS_EVENT_TYPE" == 'cron' ] ; then
|
||||
# Tests scripts.
|
||||
print_error 'CRON NOT IMPLEMENTED YET'
|
||||
else
|
||||
if [ -z $GIT_ORG_PRIVATE ] || [ -z $GIT_TOKEN ]; then
|
||||
print_error "Env vars not correctly defined"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# List first level of installed libraries so we can check the installed versions.
|
||||
print_title "NPM packages list"
|
||||
npm list --depth=0
|
||||
|
||||
if [ "$TRAVIS_REPO_SLUG" == 'moodlehq/moodleapp' ]; then
|
||||
if [ "$TRAVIS_BRANCH" == 'master' ]; then
|
||||
print_title "Update langpacks"
|
||||
cd scripts
|
||||
./update_lang.sh
|
||||
cd ..
|
||||
|
||||
print_title "Update generated lang files"
|
||||
git remote set-url origin https://$GIT_TOKEN@github.com/$TRAVIS_REPO_SLUG.git
|
||||
git fetch -q origin
|
||||
git add -A src/assets/lang
|
||||
git add */en.json
|
||||
git add src/config.json
|
||||
git commit -m 'Update lang files [ci skip]'
|
||||
|
||||
print_title "Update Licenses"
|
||||
npm install -g license-checker
|
||||
|
||||
jq --version
|
||||
license-checker --json --production --relativeLicensePath > licenses.json
|
||||
jq 'del(.[].path)' licenses.json > licenses_old.json
|
||||
mv licenses_old.json licenses.json
|
||||
licenses=`jq -r 'keys[]' licenses.json`
|
||||
echo "{" > licensesurl.json
|
||||
first=1
|
||||
for license in $licenses; do
|
||||
obj=`jq --arg lic $license '.[$lic]' licenses.json`
|
||||
licensePath=`echo $obj | jq -r '.licenseFile'`
|
||||
file=""
|
||||
if [[ ! -z "$licensePath" ]] || [[ "$licensePath" != "null" ]]; then
|
||||
file=$(basename $licensePath)
|
||||
if [ $first -eq 1 ] ; then
|
||||
first=0
|
||||
echo "\"$license\" : { \"licenseFile\" : \"$file\"}" >> licensesurl.json
|
||||
else
|
||||
echo ",\"$license\" : { \"licenseFile\" : \"$file\"}" >> licensesurl.json
|
||||
fi
|
||||
fi
|
||||
done
|
||||
echo "}" >> licensesurl.json
|
||||
|
||||
jq -s '.[0] * .[1]' licenses.json licensesurl.json > licenses_old.json
|
||||
mv licenses_old.json licenses.json
|
||||
rm licensesurl.json
|
||||
|
||||
git add licenses.json
|
||||
git commit -m 'Update licenses [ci skip]'
|
||||
|
||||
git push origin HEAD:$TRAVIS_BRANCH
|
||||
fi
|
||||
|
||||
if [ "$TRAVIS_BRANCH" == 'integration' ] || [ "$TRAVIS_BRANCH" == 'master' ] || [ "$TRAVIS_BRANCH" == 'desktop' ] ; then
|
||||
print_title "Mirror repository"
|
||||
git remote add mirror https://$GIT_TOKEN@github.com/$GIT_ORG_PRIVATE/moodleapp.git
|
||||
git fetch -q --unshallow mirror
|
||||
git push -f mirror HEAD:$TRAVIS_BRANCH
|
||||
git push mirror --tags
|
||||
fi
|
||||
elif [ "$TRAVIS_REPO_SLUG" == "$GIT_ORG_PRIVATE/moodleapp" ]; then
|
||||
print_title "Run scripts"
|
||||
git clone --depth 1 https://$GIT_TOKEN@github.com/$GIT_ORG_PRIVATE/apps-scripts.git ../scripts
|
||||
cp ../scripts/build.sh scripts/
|
||||
./scripts/build.sh
|
||||
fi
|
||||
fi
|
|
@ -1,6 +1,16 @@
|
|||
#!/bin/bash
|
||||
|
||||
LANGPACKSFOLDER='../../moodle-langpacks'
|
||||
stepnumber=$1
|
||||
|
||||
function check_success_exit {
|
||||
if [ $? -ne 0 ]; then
|
||||
print_error "$1"
|
||||
exit 1
|
||||
elif [ "$#" -gt 1 ]; then
|
||||
print_ok "$2"
|
||||
fi
|
||||
}
|
||||
|
||||
function check_success {
|
||||
if [ $? -ne 0 ]; then
|
||||
|
@ -38,4 +48,21 @@ function print_title {
|
|||
echo
|
||||
tput setaf 5; echo "$stepnumber $1"; tput sgr0
|
||||
tput setaf 5; echo '=================='; tput sgr0
|
||||
}
|
||||
}
|
||||
|
||||
function telegram_notify {
|
||||
if [ ! -z $TELEGRAM_APIKEY ] && [ ! -z $TELEGRAM_CHATID ] ; then
|
||||
MESSAGE="Travis error: $1%0ABranch: $TRAVIS_BRANCH%0ARepo: $TRAVIS_REPO_SLUG"
|
||||
URL="https://api.telegram.org/bot$TELEGRAM_APIKEY/sendMessage"
|
||||
|
||||
curl -s -X POST $URL -d chat_id=$TELEGRAM_CHATID -d text="$MESSAGE"
|
||||
fi
|
||||
}
|
||||
|
||||
function notify_on_error_exit {
|
||||
if [ $? -ne 0 ]; then
|
||||
print_error "$1"
|
||||
telegram_notify "$1"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
|
|
@ -0,0 +1,99 @@
|
|||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Script for detecting changes in a WS params or return data, version by version.
|
||||
*
|
||||
* The first parameter (required) is the path to the Moodle installation to use.
|
||||
* The second parameter (required) is the name to the WS to convert.
|
||||
* The third parameter (optional) is a number: 1 to convert the params structure,
|
||||
* 0 to convert the returns structure. Defaults to 0.
|
||||
*/
|
||||
|
||||
if (!isset($argv[1])) {
|
||||
echo "ERROR: Please pass the path to the folder containing the Moodle installations as the first parameter.\n";
|
||||
die();
|
||||
}
|
||||
|
||||
|
||||
if (!isset($argv[2])) {
|
||||
echo "ERROR: Please pass the WS name as the second parameter.\n";
|
||||
die();
|
||||
}
|
||||
|
||||
define('CLI_SCRIPT', true);
|
||||
require_once('ws_to_ts_functions.php');
|
||||
|
||||
$versions = array('master', '38', '37', '36', '35', '34', '33', '32', '31');
|
||||
|
||||
$moodlespath = $argv[1];
|
||||
$wsname = $argv[2];
|
||||
$useparams = !!(isset($argv[3]) && $argv[3]);
|
||||
$pathseparator = '/';
|
||||
|
||||
// Get the path to the script.
|
||||
$index = strrpos(__FILE__, $pathseparator);
|
||||
if ($index === false) {
|
||||
$pathseparator = '\\';
|
||||
$index = strrpos(__FILE__, $pathseparator);
|
||||
}
|
||||
$scriptfolder = substr(__FILE__, 0, $index);
|
||||
$scriptpath = concatenate_paths($scriptfolder, 'get_ws_structure.php', $pathseparator);
|
||||
|
||||
$previousstructure = null;
|
||||
$previousversion = null;
|
||||
$libsloaded = false;
|
||||
|
||||
foreach ($versions as $version) {
|
||||
$moodlepath = concatenate_paths($moodlespath, 'stable_' . $version, $pathseparator);
|
||||
|
||||
if (!$libsloaded) {
|
||||
$libsloaded = true;
|
||||
|
||||
require($moodlepath . '/config.php');
|
||||
require($CFG->dirroot . '/webservice/lib.php');
|
||||
}
|
||||
|
||||
// Get the structure in this Moodle version.
|
||||
$structure = shell_exec("php $scriptpath $moodlepath $wsname " . ($useparams ? 'true' : ''));
|
||||
|
||||
if (strpos($structure, 'ERROR:') === 0) {
|
||||
echo "WS not found in version $version. Stop.\n";
|
||||
break;
|
||||
}
|
||||
|
||||
$structure = unserialize($structure);
|
||||
|
||||
if ($previousstructure != null) {
|
||||
echo "*** Check changes from version $version to $previousversion ***\n";
|
||||
|
||||
$messages = detect_ws_changes($previousstructure, $structure);
|
||||
|
||||
if (count($messages) > 0) {
|
||||
$haschanged = true;
|
||||
|
||||
foreach($messages as $message) {
|
||||
echo "$message\n";
|
||||
}
|
||||
} else {
|
||||
echo "No changes found.\n";
|
||||
}
|
||||
echo "\n";
|
||||
}
|
||||
|
||||
$previousstructure = $structure;
|
||||
$previousversion = $version;
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Script for getting the PHP structure of a WS returns or params.
|
||||
*
|
||||
* The first parameter (required) is the path to the Moodle installation to use.
|
||||
* The second parameter (required) is the name to the WS to convert.
|
||||
* The third parameter (optional) is a number: 1 to convert the params structure,
|
||||
* 0 to convert the returns structure. Defaults to 0.
|
||||
*/
|
||||
|
||||
if (!isset($argv[1])) {
|
||||
echo "ERROR: Please pass the Moodle path as the first parameter.\n";
|
||||
die();
|
||||
}
|
||||
|
||||
|
||||
if (!isset($argv[2])) {
|
||||
echo "ERROR: Please pass the WS name as the second parameter.\n";
|
||||
die();
|
||||
}
|
||||
|
||||
$moodlepath = $argv[1];
|
||||
$wsname = $argv[2];
|
||||
$useparams = !!(isset($argv[3]) && $argv[3]);
|
||||
|
||||
define('CLI_SCRIPT', true);
|
||||
|
||||
require($moodlepath . '/config.php');
|
||||
require($CFG->dirroot . '/webservice/lib.php');
|
||||
require_once('ws_to_ts_functions.php');
|
||||
|
||||
$structure = get_ws_structure($wsname, $useparams);
|
||||
|
||||
if ($structure === false) {
|
||||
echo "ERROR: The WS wasn't found in this Moodle installation.\n";
|
||||
die();
|
||||
}
|
||||
|
||||
remove_default_closures($structure);
|
||||
echo serialize($structure);
|
|
@ -0,0 +1,62 @@
|
|||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Script for converting a PHP WS structure to a TS type.
|
||||
*
|
||||
* The first parameter (required) is the path to the Moodle installation to use.
|
||||
* The second parameter (required) is the name to the WS to convert.
|
||||
* The third parameter (optional) is the name to put to the TS type. Defaults to "TypeName".
|
||||
* The fourth parameter (optional) is a number: 1 to convert the params structure,
|
||||
* 0 to convert the returns structure. Defaults to 0.
|
||||
*/
|
||||
|
||||
if (!isset($argv[1])) {
|
||||
echo "ERROR: Please pass the Moodle path as the first parameter.\n";
|
||||
die();
|
||||
}
|
||||
|
||||
|
||||
if (!isset($argv[2])) {
|
||||
echo "ERROR: Please pass the WS name as the second parameter.\n";
|
||||
die();
|
||||
}
|
||||
|
||||
$moodlepath = $argv[1];
|
||||
$wsname = $argv[2];
|
||||
$typename = isset($argv[3]) ? $argv[3] : 'TypeName';
|
||||
$useparams = !!(isset($argv[4]) && $argv[4]);
|
||||
|
||||
define('CLI_SCRIPT', true);
|
||||
|
||||
require($moodlepath . '/config.php');
|
||||
require($CFG->dirroot . '/webservice/lib.php');
|
||||
require_once('ws_to_ts_functions.php');
|
||||
|
||||
$structure = get_ws_structure($wsname, $useparams);
|
||||
|
||||
if ($structure === false) {
|
||||
echo "ERROR: The WS wasn't found in this Moodle installation.\n";
|
||||
die();
|
||||
}
|
||||
|
||||
if ($useparams) {
|
||||
$description = "Params of WS $wsname.";
|
||||
} else {
|
||||
$description = "Result of WS $wsname.";
|
||||
}
|
||||
|
||||
echo get_ts_doc(null, $description, '') . "export type $typename = " . convert_to_ts(null, $structure, $useparams) . ";\n";
|
|
@ -27,6 +27,7 @@
|
|||
"addon.badges.version": "badges",
|
||||
"addon.badges.warnexpired": "badges",
|
||||
"addon.block_activitymodules.pluginname": "block_activity_modules",
|
||||
"addon.block_activityresults.pluginname": "block_activity_results",
|
||||
"addon.block_badges.pluginname": "block_badges",
|
||||
"addon.block_blogmenu.pluginname": "block_blog_menu",
|
||||
"addon.block_blogrecent.pluginname": "block_blog_recent",
|
||||
|
@ -48,6 +49,7 @@
|
|||
"addon.block_myoverview.nocourses": "block_myoverview",
|
||||
"addon.block_myoverview.past": "block_myoverview",
|
||||
"addon.block_myoverview.pluginname": "block_myoverview",
|
||||
"addon.block_myoverview.shortname": "block_myoverview",
|
||||
"addon.block_myoverview.title": "block_myoverview",
|
||||
"addon.block_newsitems.pluginname": "block_news_items",
|
||||
"addon.block_onlineusers.pluginname": "block_online_users",
|
||||
|
@ -657,6 +659,40 @@
|
|||
"addon.mod_glossary.noentriesfound": "local_moodlemobileapp",
|
||||
"addon.mod_glossary.searchquery": "local_moodlemobileapp",
|
||||
"addon.mod_glossary.tagarea_glossary_entries": "glossary",
|
||||
"addon.mod_h5pactivity.all_attempts": "h5pactivity",
|
||||
"addon.mod_h5pactivity.answer_checked": "h5pactivity",
|
||||
"addon.mod_h5pactivity.answer_correct": "h5pactivity",
|
||||
"addon.mod_h5pactivity.answer_fail": "h5pactivity",
|
||||
"addon.mod_h5pactivity.answer_incorrect": "h5pactivity",
|
||||
"addon.mod_h5pactivity.answer_pass": "h5pactivity",
|
||||
"addon.mod_h5pactivity.attempt": "h5pactivity",
|
||||
"addon.mod_h5pactivity.attempt_completion_no": "h5pactivity",
|
||||
"addon.mod_h5pactivity.attempt_completion_yes": "h5pactivity",
|
||||
"addon.mod_h5pactivity.attempt_success_fail": "h5pactivity",
|
||||
"addon.mod_h5pactivity.attempt_success_pass": "h5pactivity",
|
||||
"addon.mod_h5pactivity.attempt_success_unknown": "h5pactivity",
|
||||
"addon.mod_h5pactivity.attempts_none": "h5pactivity",
|
||||
"addon.mod_h5pactivity.completion": "h5pactivity",
|
||||
"addon.mod_h5pactivity.downloadh5pfile": "local_moodlemobileapp",
|
||||
"addon.mod_h5pactivity.duration": "h5pactivity",
|
||||
"addon.mod_h5pactivity.errorgetactivity": "local_moodlemobileapp",
|
||||
"addon.mod_h5pactivity.filestatenotdownloaded": "local_moodlemobileapp",
|
||||
"addon.mod_h5pactivity.filestateoutdated": "local_moodlemobileapp",
|
||||
"addon.mod_h5pactivity.maxscore": "h5pactivity",
|
||||
"addon.mod_h5pactivity.modulenameplural": "h5pactivity",
|
||||
"addon.mod_h5pactivity.myattempts": "h5pactivity",
|
||||
"addon.mod_h5pactivity.no_compatible_track": "h5pactivity",
|
||||
"addon.mod_h5pactivity.offlinedisabledwarning": "local_moodlemobileapp",
|
||||
"addon.mod_h5pactivity.outcome": "h5pactivity",
|
||||
"addon.mod_h5pactivity.previewmode": "h5pactivity",
|
||||
"addon.mod_h5pactivity.result_fill-in": "h5pactivity",
|
||||
"addon.mod_h5pactivity.result_other": "h5pactivity",
|
||||
"addon.mod_h5pactivity.review_my_attempts": "h5pactivity",
|
||||
"addon.mod_h5pactivity.score": "h5pactivity",
|
||||
"addon.mod_h5pactivity.score_out_of": "h5pactivity",
|
||||
"addon.mod_h5pactivity.startdate": "h5pactivity",
|
||||
"addon.mod_h5pactivity.totalscore": "h5pactivity",
|
||||
"addon.mod_h5pactivity.viewattempt": "local_moodlemobileapp",
|
||||
"addon.mod_imscp.deploymenterror": "imscp",
|
||||
"addon.mod_imscp.modulenameplural": "imscp",
|
||||
"addon.mod_imscp.showmoduledescription": "local_moodlemobileapp",
|
||||
|
@ -870,12 +906,10 @@
|
|||
"addon.mod_scorm.highestattempt": "scorm",
|
||||
"addon.mod_scorm.incomplete": "scorm",
|
||||
"addon.mod_scorm.lastattempt": "scorm",
|
||||
"addon.mod_scorm.mode": "scorm",
|
||||
"addon.mod_scorm.modulenameplural": "scorm",
|
||||
"addon.mod_scorm.newattempt": "scorm",
|
||||
"addon.mod_scorm.noattemptsallowed": "scorm",
|
||||
"addon.mod_scorm.noattemptsmade": "scorm",
|
||||
"addon.mod_scorm.normal": "scorm",
|
||||
"addon.mod_scorm.notattempted": "scorm",
|
||||
"addon.mod_scorm.offlineattemptnote": "local_moodlemobileapp",
|
||||
"addon.mod_scorm.offlineattemptovermax": "local_moodlemobileapp",
|
||||
|
@ -1012,6 +1046,7 @@
|
|||
"addon.notifications.playsound": "local_moodlemobileapp",
|
||||
"addon.notifications.therearentnotificationsyet": "local_moodlemobileapp",
|
||||
"addon.storagemanager.deletecourse": "local_moodlemobileapp",
|
||||
"addon.storagemanager.deletecourses": "local_moodlemobileapp",
|
||||
"addon.storagemanager.deletedatafrom": "local_moodlemobileapp",
|
||||
"addon.storagemanager.info": "local_moodlemobileapp",
|
||||
"addon.storagemanager.managestorage": "local_moodlemobileapp",
|
||||
|
@ -1332,6 +1367,8 @@
|
|||
"core.browser": "local_moodlemobileapp",
|
||||
"core.cancel": "moodle",
|
||||
"core.cannotconnect": "local_moodlemobileapp",
|
||||
"core.cannotconnecttrouble": "local_moodlemobileapp",
|
||||
"core.cannotconnectverify": "local_moodlemobileapp",
|
||||
"core.cannotdownloadfiles": "local_moodlemobileapp",
|
||||
"core.captureaudio": "local_moodlemobileapp",
|
||||
"core.capturedimage": "local_moodlemobileapp",
|
||||
|
@ -1370,6 +1407,7 @@
|
|||
"core.confirmdeletefile": "repository",
|
||||
"core.confirmgotabroot": "local_moodlemobileapp",
|
||||
"core.confirmgotabrootdefault": "local_moodlemobileapp",
|
||||
"core.confirmleaveunknownchanges": "local_moodlemobileapp",
|
||||
"core.confirmloss": "local_moodlemobileapp",
|
||||
"core.confirmopeninbrowser": "local_moodlemobileapp",
|
||||
"core.considereddigitalminor": "moodle",
|
||||
|
@ -1383,6 +1421,7 @@
|
|||
"core.contentlinks.errorredirectothersite": "local_moodlemobileapp",
|
||||
"core.continue": "moodle",
|
||||
"core.copiedtoclipboard": "local_moodlemobileapp",
|
||||
"core.copytoclipboard": "local_moodlemobileapp",
|
||||
"core.course": "moodle",
|
||||
"core.course.activitydisabled": "local_moodlemobileapp",
|
||||
"core.course.activitynotyetviewableremoteaddon": "local_moodlemobileapp",
|
||||
|
@ -1390,6 +1429,7 @@
|
|||
"core.course.allsections": "local_moodlemobileapp",
|
||||
"core.course.askadmintosupport": "local_moodlemobileapp",
|
||||
"core.course.availablespace": "local_moodlemobileapp",
|
||||
"core.course.cannotdeletewhiledownloading": "local_moodlemobileapp",
|
||||
"core.course.confirmdeletemodulefiles": "local_moodlemobileapp",
|
||||
"core.course.confirmdownload": "local_moodlemobileapp",
|
||||
"core.course.confirmdownloadunknownsize": "local_moodlemobileapp",
|
||||
|
@ -1611,6 +1651,7 @@
|
|||
"core.h5p.editor": "h5p",
|
||||
"core.h5p.embed": "h5p",
|
||||
"core.h5p.embedtitle": "h5p",
|
||||
"core.h5p.errorgetemail": "local_moodlemobileapp",
|
||||
"core.h5p.fullscreen": "h5p",
|
||||
"core.h5p.gpl": "h5p",
|
||||
"core.h5p.h5ptitle": "h5p",
|
||||
|
@ -1707,7 +1748,21 @@
|
|||
"core.login.emailnotmatch": "local_moodlemobileapp",
|
||||
"core.login.erroraccesscontrolalloworigin": "local_moodlemobileapp",
|
||||
"core.login.errordeletesite": "local_moodlemobileapp",
|
||||
"core.login.errorexampleurl": "local_moodlemobileapp",
|
||||
"core.login.errorupdatesite": "local_moodlemobileapp",
|
||||
"core.login.faqcannotconnectanswer": "local_moodlemobileapp",
|
||||
"core.login.faqcannotconnectquestion": "local_moodlemobileapp",
|
||||
"core.login.faqcannotfindmysiteanswer": "local_moodlemobileapp",
|
||||
"core.login.faqcannotfindmysitequestion": "local_moodlemobileapp",
|
||||
"core.login.faqsetupsiteanswer": "local_moodlemobileapp",
|
||||
"core.login.faqsetupsitelinktitle": "local_moodlemobileapp",
|
||||
"core.login.faqsetupsitequestion": "local_moodlemobileapp",
|
||||
"core.login.faqtestappanswer": "local_moodlemobileapp",
|
||||
"core.login.faqtestappquestion": "local_moodlemobileapp",
|
||||
"core.login.faqwhatisurlanswer": "local_moodlemobileapp",
|
||||
"core.login.faqwhatisurlquestion": "local_moodlemobileapp",
|
||||
"core.login.faqwhereisqrcode": "local_moodlemobileapp",
|
||||
"core.login.faqwhereisqrcodeanswer": "local_moodlemobileapp",
|
||||
"core.login.findyoursite": "local_moodlemobileapp",
|
||||
"core.login.firsttime": "moodle",
|
||||
"core.login.forcepasswordchangenotice": "moodle",
|
||||
|
@ -1736,8 +1791,18 @@
|
|||
"core.login.mobileservicesnotenabled": "local_moodlemobileapp",
|
||||
"core.login.mustconfirm": "moodle",
|
||||
"core.login.newaccount": "moodle",
|
||||
"core.login.newsitedescription": "local_moodlemobileapp",
|
||||
"core.login.notloggedin": "local_moodlemobileapp",
|
||||
"core.login.onboardingcreatemanagecourses": "local_moodlemobileapp",
|
||||
"core.login.onboardingenrolmanagestudents": "local_moodlemobileapp",
|
||||
"core.login.onboardinggetstarted": "local_moodlemobileapp",
|
||||
"core.login.onboardingialreadyhaveasite": "local_moodlemobileapp",
|
||||
"core.login.onboardingimalearner": "local_moodlemobileapp",
|
||||
"core.login.onboardingimaneducator": "local_moodlemobileapp",
|
||||
"core.login.onboardingineedasite": "local_moodlemobileapp",
|
||||
"core.login.onboardingprovidefeedback": "local_moodlemobileapp",
|
||||
"core.login.onboardingtoconnect": "local_moodlemobileapp",
|
||||
"core.login.onboardingwelcome": "local_moodlemobileapp",
|
||||
"core.login.or": "local_moodlemobileapp",
|
||||
"core.login.password": "moodle",
|
||||
"core.login.passwordforgotten": "moodle",
|
||||
"core.login.passwordforgotteninstructions2": "moodle",
|
||||
|
@ -1747,8 +1812,6 @@
|
|||
"core.login.policyagreement": "moodle",
|
||||
"core.login.policyagreementclick": "moodle",
|
||||
"core.login.potentialidps": "auth",
|
||||
"core.login.problemconnectingerror": "local_moodlemobileapp",
|
||||
"core.login.problemconnectingerrorcontinue": "local_moodlemobileapp",
|
||||
"core.login.profileinvaliddata": "admin",
|
||||
"core.login.recaptchachallengeimage": "local_moodlemobileapp",
|
||||
"core.login.recaptchaexpired": "local_moodlemobileapp",
|
||||
|
@ -1777,6 +1840,8 @@
|
|||
"core.login.usernotaddederror": "error",
|
||||
"core.login.visitchangepassword": "local_moodlemobileapp",
|
||||
"core.login.webservicesnotenabled": "local_moodlemobileapp",
|
||||
"core.login.youcanstillconnectwithcredentials": "local_moodlemobileapp",
|
||||
"core.login.yourenteredsite": "local_moodlemobileapp",
|
||||
"core.lostconnection": "local_moodlemobileapp",
|
||||
"core.mainmenu.changesite": "local_moodlemobileapp",
|
||||
"core.mainmenu.help": "moodle",
|
||||
|
@ -1799,6 +1864,7 @@
|
|||
"core.mod_folder": "folder/pluginname",
|
||||
"core.mod_forum": "forum/pluginname",
|
||||
"core.mod_glossary": "glossary/pluginname",
|
||||
"core.mod_h5pactivity": "h5pactivity/pluginname",
|
||||
"core.mod_ims": "imscp/pluginname",
|
||||
"core.mod_imscp": "imscp/pluginname",
|
||||
"core.mod_label": "label/pluginname",
|
||||
|
@ -1816,6 +1882,7 @@
|
|||
"core.more": "moodle",
|
||||
"core.mygroups": "group",
|
||||
"core.name": "moodle",
|
||||
"core.needhelp": "local_moodlemobileapp",
|
||||
"core.networkerroriframemsg": "local_moodlemobileapp",
|
||||
"core.networkerrormsg": "local_moodlemobileapp",
|
||||
"core.never": "moodle",
|
||||
|
@ -1843,6 +1910,7 @@
|
|||
"core.online": "message",
|
||||
"core.openfullimage": "local_moodlemobileapp",
|
||||
"core.openinbrowser": "local_moodlemobileapp",
|
||||
"core.openmodinbrowser": "local_moodlemobileapp",
|
||||
"core.othergroups": "group",
|
||||
"core.pagea": "moodle",
|
||||
"core.parentlanguage": "langconfig",
|
||||
|
@ -1853,6 +1921,7 @@
|
|||
"core.previous": "moodle",
|
||||
"core.proceed": "moodle",
|
||||
"core.pulltorefresh": "local_moodlemobileapp",
|
||||
"core.qrscanner": "local_moodlemobileapp",
|
||||
"core.question.answer": "question",
|
||||
"core.question.answersaved": "question",
|
||||
"core.question.cannotdeterminestatus": "local_moodlemobileapp",
|
||||
|
@ -1895,6 +1964,7 @@
|
|||
"core.retry": "local_moodlemobileapp",
|
||||
"core.save": "moodle",
|
||||
"core.savechanges": "assign",
|
||||
"core.scanqr": "local_moodlemobileapp",
|
||||
"core.search": "moodle",
|
||||
"core.searching": "local_moodlemobileapp",
|
||||
"core.searchresults": "moodle",
|
||||
|
@ -1998,10 +2068,12 @@
|
|||
"core.sizekb": "moodle",
|
||||
"core.sizemb": "moodle",
|
||||
"core.sizetb": "local_moodlemobileapp",
|
||||
"core.skip": "tool_usertours",
|
||||
"core.sorry": "local_moodlemobileapp",
|
||||
"core.sort": "moodle",
|
||||
"core.sortby": "moodle",
|
||||
"core.start": "grouptool",
|
||||
"core.storingfiles": "local_moodlemobileapp",
|
||||
"core.strftimedate": "langconfig",
|
||||
"core.strftimedatefullshort": "langconfig",
|
||||
"core.strftimedateshort": "langconfig",
|
||||
|
@ -2090,6 +2162,7 @@
|
|||
"core.warningofflinedatadeleted": "local_moodlemobileapp",
|
||||
"core.whatisyourage": "moodle",
|
||||
"core.wheredoyoulive": "moodle",
|
||||
"core.whoissiteadmin": "local_moodlemobileapp",
|
||||
"core.whoops": "local_moodlemobileapp",
|
||||
"core.whyisthishappening": "local_moodlemobileapp",
|
||||
"core.whyisthisrequired": "moodle",
|
||||
|
|
|
@ -0,0 +1,80 @@
|
|||
#!/bin/bash
|
||||
source "scripts/functions.sh"
|
||||
|
||||
npm run build --bailOnLintError true --typeCheckOnLint true
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z $GIT_ORG_PRIVATE ] || [ -z $GIT_TOKEN ]; then
|
||||
print_error "Env vars not correctly defined"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# List first level of installed libraries so we can check the installed versions.
|
||||
print_title "NPM packages list"
|
||||
npm list --depth=0
|
||||
|
||||
if [ "$TRAVIS_BRANCH" == 'master' ]; then
|
||||
print_title "Update langpacks"
|
||||
cd scripts
|
||||
./update_lang.sh
|
||||
cd ..
|
||||
|
||||
print_title "Update generated lang files"
|
||||
git remote set-url origin https://$GIT_TOKEN@github.com/$TRAVIS_REPO_SLUG.git
|
||||
git fetch -q origin
|
||||
git add -A src/assets/lang
|
||||
git add */en.json
|
||||
git add src/config.json
|
||||
git commit -m 'Update lang files [ci skip]'
|
||||
|
||||
print_title "Update Licenses"
|
||||
npm install -g license-checker
|
||||
|
||||
jq --version
|
||||
license-checker --json --production --relativeLicensePath > licenses.json
|
||||
jq 'del(.[].path)' licenses.json > licenses_old.json
|
||||
mv licenses_old.json licenses.json
|
||||
licenses=`jq -r 'keys[]' licenses.json`
|
||||
echo "{" > licensesurl.json
|
||||
first=1
|
||||
for license in $licenses; do
|
||||
obj=`jq --arg lic $license '.[$lic]' licenses.json`
|
||||
licensePath=`echo $obj | jq -r '.licenseFile'`
|
||||
file=""
|
||||
if [[ ! -z "$licensePath" ]] || [[ "$licensePath" != "null" ]]; then
|
||||
file=$(basename $licensePath)
|
||||
if [ $first -eq 1 ] ; then
|
||||
first=0
|
||||
echo "\"$license\" : { \"licenseFile\" : \"$file\"}" >> licensesurl.json
|
||||
else
|
||||
echo ",\"$license\" : { \"licenseFile\" : \"$file\"}" >> licensesurl.json
|
||||
fi
|
||||
fi
|
||||
done
|
||||
echo "}" >> licensesurl.json
|
||||
|
||||
jq -s '.[0] * .[1]' licenses.json licensesurl.json > licenses_old.json
|
||||
mv licenses_old.json licenses.json
|
||||
rm licensesurl.json
|
||||
|
||||
git add licenses.json
|
||||
git commit -m 'Update licenses [ci skip]'
|
||||
|
||||
git push origin HEAD:$TRAVIS_BRANCH
|
||||
notify_on_error_exit "MIRROR: Unsuccessful push, stopping..."
|
||||
fi
|
||||
|
||||
if [ "$TRAVIS_BRANCH" == 'integration' ] || [ "$TRAVIS_BRANCH" == 'master' ] || [ "$TRAVIS_BRANCH" == 'desktop' ] ; then
|
||||
print_title "Mirror repository"
|
||||
git remote add mirror https://$GIT_TOKEN@github.com/$GIT_ORG_PRIVATE/moodleapp.git
|
||||
git fetch -q --unshallow mirror
|
||||
notify_on_error_exit "MIRROR: Unsuccessful fetch of mirror, stopping..."
|
||||
git fetch -q origin --depth=100
|
||||
notify_on_error_exit "MIRROR: Unsuccessful fetch of origin, stopping..."
|
||||
git push -f mirror HEAD:$TRAVIS_BRANCH
|
||||
notify_on_error_exit "MIRROR: Unsuccessful mirror, stopping..."
|
||||
git push -f mirror --tags
|
||||
notify_on_error_exit "MIRROR: Unsuccessful mirror tags, stopping..."
|
||||
fi
|
|
@ -0,0 +1,58 @@
|
|||
#!/bin/bash
|
||||
|
||||
source "scripts/functions.sh"
|
||||
|
||||
# Prepare variables
|
||||
basedir="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../" && pwd )"
|
||||
dockerscripts="$HOME/moodle-docker/bin/"
|
||||
dockercompose="$dockerscripts/moodle-docker-compose"
|
||||
|
||||
export MOODLE_DOCKER_DB=pgsql
|
||||
export MOODLE_DOCKER_BROWSER=chrome
|
||||
export MOODLE_DOCKER_WWWROOT="$HOME/moodle"
|
||||
export MOODLE_DOCKER_PHP_VERSION=7.3
|
||||
export MOODLE_DOCKER_APP_PATH=$basedir
|
||||
|
||||
# Prepare dependencies
|
||||
print_title "Preparing dependencies"
|
||||
git clone --branch master --depth 1 git://github.com/moodle/moodle $HOME/moodle
|
||||
git clone --branch master --depth 1 git://github.com/moodlehq/moodle-local_moodlemobileapp $HOME/moodle/local/moodlemobileapp
|
||||
# git clone --branch master --depth 1 git://github.com/moodlehq/moodle-docker $HOME/moodle-docker
|
||||
|
||||
# TODO replace with commented line above once https://github.com/moodlehq/moodle-docker/pull/126 is merged
|
||||
mkdir $HOME/moodle-docker
|
||||
cd $HOME/moodle-docker
|
||||
git init
|
||||
git remote add origin git://github.com/moodlehq/moodle-docker
|
||||
git fetch --depth 1 origin c604d5f9792c72fb9d83f6fec1f4b1defd778e9a
|
||||
git checkout FETCH_HEAD
|
||||
cd -
|
||||
|
||||
cp $HOME/moodle-docker/config.docker-template.php $HOME/moodle/config.php
|
||||
|
||||
# Build app
|
||||
print_title "Building app"
|
||||
npm install
|
||||
npm run setup
|
||||
|
||||
# Start containers
|
||||
print_title "Starting containers"
|
||||
$dockercompose pull
|
||||
$dockercompose up -d
|
||||
$dockerscripts/moodle-docker-wait-for-db
|
||||
$dockerscripts/moodle-docker-wait-for-app
|
||||
|
||||
$dockercompose exec -T webserver sh -c "php admin/tool/behat/cli/init.php"
|
||||
notify_on_error_exit "e2e failed initializing behat"
|
||||
|
||||
print_title "Running e2e tests"
|
||||
|
||||
# Run tests
|
||||
for tags in "$@"
|
||||
do
|
||||
$dockercompose exec -T webserver sh -c "php admin/tool/behat/cli/run.php --tags=\"$tags\""
|
||||
notify_on_error_exit "Some e2e tests are failing, please review"
|
||||
done
|
||||
|
||||
# Clean up
|
||||
$dockercompose down
|
|
@ -0,0 +1,244 @@
|
|||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Helper functions for converting a Moodle WS structure to a TS type.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Get the structure of a WS params or returns.
|
||||
*/
|
||||
function get_ws_structure($wsname, $useparams) {
|
||||
global $DB;
|
||||
|
||||
// get all the function descriptions
|
||||
$functions = $DB->get_records('external_functions', array(), 'name');
|
||||
$functiondescs = array();
|
||||
foreach ($functions as $function) {
|
||||
$functiondescs[$function->name] = external_api::external_function_info($function);
|
||||
}
|
||||
|
||||
if (!isset($functiondescs[$wsname])) {
|
||||
return false;
|
||||
} else if ($useparams) {
|
||||
return $functiondescs[$wsname]->parameters_desc;
|
||||
} else {
|
||||
return $functiondescs[$wsname]->returns_desc;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fix a comment: make sure first letter is uppercase and add a dot at the end if needed.
|
||||
*/
|
||||
function fix_comment($desc) {
|
||||
$desc = trim($desc);
|
||||
$desc = ucfirst($desc);
|
||||
|
||||
if (substr($desc, -1) !== '.') {
|
||||
$desc .= '.';
|
||||
}
|
||||
|
||||
return $desc;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an inline comment based on a certain text.
|
||||
*/
|
||||
function get_inline_comment($desc) {
|
||||
if (empty($desc)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return ' // ' . fix_comment($desc);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the TS documentation of a certain element.
|
||||
*/
|
||||
function get_ts_doc($type, $desc, $indentation) {
|
||||
if (empty($desc)) {
|
||||
// If no key, it's probably in an array. We only document object properties.
|
||||
return '';
|
||||
}
|
||||
|
||||
return $indentation . "/**\n" .
|
||||
$indentation . " * " . fix_comment($desc) . "\n" .
|
||||
(!empty($type) ? ($indentation . " * @type {" . $type . "}\n") : '') .
|
||||
$indentation . " */\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* Specify a certain type, with or without a key.
|
||||
*/
|
||||
function convert_key_type($key, $type, $required, $indentation) {
|
||||
if ($key) {
|
||||
// It has a key, it's inside an object.
|
||||
return $indentation . "$key" . ($required == VALUE_OPTIONAL ? '?' : '') . ": $type";
|
||||
} else {
|
||||
// No key, it's probably in an array. Just include the type.
|
||||
return $type;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a certain element into a TS structure.
|
||||
*/
|
||||
function convert_to_ts($key, $value, $boolisnumber = false, $indentation = '', $arraydesc = '') {
|
||||
if ($value instanceof external_value || $value instanceof external_warnings || $value instanceof external_files) {
|
||||
// It's a basic field or a pre-defined type like warnings.
|
||||
$type = 'string';
|
||||
|
||||
if ($value instanceof external_warnings) {
|
||||
$type = 'CoreWSExternalWarning[]';
|
||||
} else if ($value instanceof external_files) {
|
||||
$type = 'CoreWSExternalFile[]';
|
||||
} else if ($value->type == PARAM_BOOL && !$boolisnumber) {
|
||||
$type = 'boolean';
|
||||
} else if (($value->type == PARAM_BOOL && $boolisnumber) || $value->type == PARAM_INT || $value->type == PARAM_FLOAT ||
|
||||
$value->type == PARAM_LOCALISEDFLOAT || $value->type == PARAM_PERMISSION || $value->type == PARAM_INTEGER ||
|
||||
$value->type == PARAM_NUMBER) {
|
||||
$type = 'number';
|
||||
}
|
||||
|
||||
$result = convert_key_type($key, $type, $value->required, $indentation);
|
||||
|
||||
return $result;
|
||||
|
||||
} else if ($value instanceof external_single_structure) {
|
||||
// It's an object.
|
||||
$result = convert_key_type($key, '{', $value->required, $indentation);
|
||||
|
||||
if ($arraydesc) {
|
||||
// It's an array of objects. Print the array description now.
|
||||
$result .= get_inline_comment($arraydesc);
|
||||
}
|
||||
|
||||
$result .= "\n";
|
||||
|
||||
foreach ($value->keys as $key => $value) {
|
||||
$result .= convert_to_ts($key, $value, $boolisnumber, $indentation . ' ') . ';';
|
||||
|
||||
if (!$value instanceof external_multiple_structure || !$value->content instanceof external_single_structure) {
|
||||
// Add inline comments after the field, except for arrays of objects where it's added at the start.
|
||||
$result .= get_inline_comment($value->desc);
|
||||
}
|
||||
|
||||
$result .= "\n";
|
||||
}
|
||||
|
||||
$result .= "$indentation}";
|
||||
|
||||
return $result;
|
||||
|
||||
} else if ($value instanceof external_multiple_structure) {
|
||||
// It's an array.
|
||||
$result = convert_key_type($key, '', $value->required, $indentation);
|
||||
|
||||
$result .= convert_to_ts(null, $value->content, $boolisnumber, $indentation, $value->desc);
|
||||
|
||||
$result .= "[]";
|
||||
|
||||
return $result;
|
||||
} else {
|
||||
echo "WARNING: Unknown structure: $key " . get_class($value) . " \n";
|
||||
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Concatenate two paths.
|
||||
*/
|
||||
function concatenate_paths($left, $right, $separator = '/') {
|
||||
if (!is_string($left) || $left == '') {
|
||||
return $right;
|
||||
} else if (!is_string($right) || $right == '') {
|
||||
return $left;
|
||||
}
|
||||
|
||||
$lastCharLeft = substr($left, -1);
|
||||
$firstCharRight = $right[0];
|
||||
|
||||
if ($lastCharLeft === $separator && $firstCharRight === $separator) {
|
||||
return $left . substr($right, 1);
|
||||
} else if ($lastCharLeft !== $separator && $firstCharRight !== '/') {
|
||||
return $left . '/' . $right;
|
||||
} else {
|
||||
return $left . $right;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Detect changes between 2 WS structures. We only detect fields that have been added or modified, not removed fields.
|
||||
*/
|
||||
function detect_ws_changes($new, $old, $key = '', $path = '') {
|
||||
$messages = [];
|
||||
|
||||
if (gettype($new) != gettype($old)) {
|
||||
// The type has changed.
|
||||
$messages[] = "Property '$key' has changed type, from '" . gettype($old) . "' to '" . gettype($new) .
|
||||
($path != '' ? "' inside $path." : "'.");
|
||||
|
||||
} else if ($new instanceof external_value && $new->type != $old->type) {
|
||||
// The type has changed.
|
||||
$messages[] = "Property '$key' has changed type, from '" . $old->type . "' to '" . $new->type .
|
||||
($path != '' ? "' inside $path." : "'.");
|
||||
|
||||
} else if ($new instanceof external_warnings || $new instanceof external_files) {
|
||||
// Ignore these types.
|
||||
|
||||
} else if ($new instanceof external_single_structure) {
|
||||
// Check each subproperty.
|
||||
$newpath = ($path != '' ? "$path." : '') . $key;
|
||||
|
||||
foreach ($new->keys as $subkey => $value) {
|
||||
if (!isset($old->keys[$subkey])) {
|
||||
// New property.
|
||||
$messages[] = "New property '$subkey' found" . ($newpath != '' ? " inside '$newpath'." : '.');
|
||||
} else {
|
||||
$messages = array_merge($messages, detect_ws_changes($value, $old->keys[$subkey], $subkey, $newpath));
|
||||
}
|
||||
}
|
||||
} else if ($new instanceof external_multiple_structure) {
|
||||
// Recursive call with the content.
|
||||
$messages = array_merge($messages, detect_ws_changes($new->content, $old->content, $key, $path));
|
||||
}
|
||||
|
||||
return $messages;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove all closures (anonymous functions) in the default values so the object can be serialized.
|
||||
*/
|
||||
function remove_default_closures($value) {
|
||||
if ($value instanceof external_warnings || $value instanceof external_files) {
|
||||
// Ignore these types.
|
||||
|
||||
} else if ($value instanceof external_value) {
|
||||
if ($value->default instanceof Closure) {
|
||||
$value->default = null;
|
||||
}
|
||||
|
||||
} else if ($value instanceof external_single_structure) {
|
||||
|
||||
foreach ($value->keys as $key => $subvalue) {
|
||||
remove_default_closures($subvalue);
|
||||
}
|
||||
|
||||
} else if ($value instanceof external_multiple_structure) {
|
||||
remove_default_closures($value->content);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
// (C) Copyright 2015 Moodle Pty Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
import { IonicModule } from 'ionic-angular';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { CoreBlockDelegate } from '@core/block/providers/delegate';
|
||||
import { AddonBlockActivityResultsHandler } from './providers/block-handler';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
],
|
||||
imports: [
|
||||
IonicModule,
|
||||
TranslateModule.forChild()
|
||||
],
|
||||
exports: [
|
||||
],
|
||||
providers: [
|
||||
AddonBlockActivityResultsHandler
|
||||
]
|
||||
})
|
||||
export class AddonBlockActivityResultsModule {
|
||||
constructor(blockDelegate: CoreBlockDelegate, blockHandler: AddonBlockActivityResultsHandler) {
|
||||
blockDelegate.registerHandler(blockHandler);
|
||||
}
|
||||
}
|