Skip to content

Commit c3b4b1f

Browse files
authored
Merge pull request #2223 from moodlehq/integration
Integration
2 parents 3cefd6b + c6dee63 commit c3b4b1f

File tree

1,707 files changed

+50441
-27305
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,707 files changed

+50441
-27305
lines changed

MainActivity.java

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
// (C) Copyright 2015 Moodle Pty Ltd.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// Based on the template node_modules/cordova-android/bin/templates/project/Activity.java
16+
17+
package com.moodle.moodlemobile;
18+
19+
import android.os.Bundle;
20+
import android.view.KeyEvent;
21+
import android.view.View;
22+
import org.apache.cordova.*;
23+
24+
public class MainActivity extends CordovaActivity
25+
{
26+
@Override
27+
public void onCreate(Bundle savedInstanceState)
28+
{
29+
super.onCreate(savedInstanceState);
30+
31+
// enable Cordova apps to be started in the background
32+
Bundle extras = getIntent().getExtras();
33+
if (extras != null && extras.getBoolean("cdvStartInBackground", false)) {
34+
moveTaskToBack(true);
35+
}
36+
37+
// Set by <content src="index.html" /> in config.xml
38+
loadUrl(launchUrl);
39+
}
40+
41+
@Override
42+
public boolean dispatchKeyEvent(KeyEvent event) {
43+
// Forward back key events to the web view.
44+
if (this.appView != null && event.getKeyCode() == KeyEvent.KEYCODE_BACK) {
45+
View webview = this.appView.getView();
46+
47+
if (webview != null) {
48+
webview.dispatchKeyEvent(event);
49+
}
50+
51+
return true;
52+
}
53+
54+
return super.dispatchKeyEvent(event);
55+
}
56+
}

NOTICE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(C) Copyright 2015 Martin Dougiamas
1+
(C) Copyright 2015 Moodle Pty Ltd.
22

33
Licensed under the Apache License, Version 2.0 (the "License");
44
you may not use this file except in compliance with the License.

config.xml

Lines changed: 55 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version='1.0' encoding='utf-8'?>
2-
<widget id="com.moodle.moodlemobile" version="3.7.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">
2+
<widget id="com.moodle.moodlemobile" version="3.8.0" 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">
33
<name>Moodle</name>
44
<description>Moodle official app</description>
55
<author email="[email protected]" href="http://moodle.com">Moodle Mobile team</author>
@@ -42,25 +42,20 @@
4242
<param name="ios-package" onload="true" value="CDVStatusBar" />
4343
</feature>
4444
<platform name="android">
45+
<resource-file src="MainActivity.java" target="app/src/main/java/com/moodle/moodlemobile/MainActivity.java" />
4546
<resource-file src="google-services.json" target="app/google-services.json" />
46-
<splash qualifier="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
47-
<splash qualifier="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
48-
<splash qualifier="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
49-
<splash qualifier="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
50-
<splash qualifier="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
51-
<splash qualifier="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
52-
<splash qualifier="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
53-
<splash qualifier="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
54-
<splash qualifier="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
55-
<splash qualifier="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
56-
<splash qualifier="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
57-
<splash qualifier="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
58-
<icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
59-
<icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
60-
<icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
61-
<icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
62-
<icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
63-
<icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
47+
<splash density="land-ldpi" qualifier="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
48+
<splash density="land-mdpi" qualifier="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
49+
<splash density="land-hdpi" qualifier="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
50+
<splash density="land-xhdpi" qualifier="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
51+
<splash density="land-xxhdpi" qualifier="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
52+
<splash density="land-xxxhdpi" qualifier="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
53+
<splash density="port-ldpi" qualifier="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
54+
<splash density="port-mdpi" qualifier="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
55+
<splash density="port-hdpi" qualifier="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
56+
<splash density="port-xhdpi" qualifier="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
57+
<splash density="port-xxhdpi" qualifier="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
58+
<splash density="port-xxxhdpi" qualifier="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
6459
<resource-file src="resources/android/icon/drawable-ldpi-smallicon.png" target="app/src/main/res/mipmap-ldpi/smallicon.png" />
6560
<resource-file src="resources/android/icon/drawable-mdpi-smallicon.png" target="app/src/main/res/mipmap-mdpi/smallicon.png" />
6661
<resource-file src="resources/android/icon/drawable-hdpi-smallicon.png" target="app/src/main/res/mipmap-hdpi/smallicon.png" />
@@ -77,6 +72,18 @@
7772
<resource-file src="resources/android/splash/drawable-port-xhdpi-screen.png" target="app/src/main/res/drawable-port-xhdpi/screen.png" />
7873
<resource-file src="resources/android/splash/drawable-port-xxhdpi-screen.png" target="app/src/main/res/drawable-port-xxhdpi/screen.png" />
7974
<resource-file src="resources/android/splash/drawable-port-xxxhdpi-screen.png" target="app/src/main/res/drawable-port-xxxhdpi/screen.png" />
75+
<resource-file src="resources/values/colors.xml" target="/app/src/main/res/values/colors.xml" />
76+
<icon background="@color/background" density="ldpi" foreground="resources/android/icon/ldpi-foreground.png" src="resources/android/icon/drawable-ldpi-icon.png" />
77+
<icon background="@color/background" density="mdpi" foreground="resources/android/icon/mdpi-foreground.png" src="resources/android/icon/drawable-mdpi-icon.png" />
78+
<icon background="@color/background" density="hdpi" foreground="resources/android/icon/hdpi-foreground.png" src="resources/android/icon/drawable-hdpi-icon.png" />
79+
<icon background="@color/background" density="xhdpi" foreground="resources/android/icon/xhdpi-foreground.png" src="resources/android/icon/drawable-xhdpi-icon.png" />
80+
<icon background="@color/background" density="xxhdpi" foreground="resources/android/icon/xxhdpi-foreground.png" src="resources/android/icon/drawable-xxhdpi-icon.png" />
81+
<icon background="@color/background" density="xxxhdpi" foreground="resources/android/icon/xxxhdpi-foreground.png" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
82+
<config-file parent="/manifest/application" target="AndroidManifest.xml">
83+
<provider android:authorities="${applicationId}.opener.provider" android:exported="false" android:grantUriPermissions="true" android:name="io.github.pwlin.cordova.plugins.fileopener2.FileProvider">
84+
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/opener_paths" />
85+
</provider>
86+
</config-file>
8087
</platform>
8188
<platform name="ios">
8289
<resource-file src="GoogleService-Info.plist" />
@@ -112,8 +119,29 @@
112119
<splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
113120
<icon height="1024" src="resources/ios/icon/icon-1024.png" width="1024" />
114121
<splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" />
122+
<edit-config file="*-Info.plist" mode="merge" target="NSLocationWhenInUseUsageDescription">
123+
<string>We need your location so you can attach it as part of your submissions.</string>
124+
</edit-config>
125+
<icon height="20" src="resources/ios/icon/icon-20.png" width="20" />
126+
<icon height="40" src="resources/ios/icon/[email protected]" width="40" />
127+
<icon height="60" src="resources/ios/icon/[email protected]" width="60" />
128+
<icon height="29" src="resources/ios/icon/icon-29.png" width="29" />
129+
<icon height="58" src="resources/ios/icon/[email protected]" width="58" />
130+
<icon height="87" src="resources/ios/icon/[email protected]" width="87" />
131+
<icon height="48" src="resources/ios/icon/[email protected]" width="48" />
132+
<icon height="55" src="resources/ios/icon/[email protected]" width="55" />
133+
<icon height="88" src="resources/ios/icon/[email protected]" width="88" />
134+
<icon height="172" src="resources/ios/icon/[email protected]" width="172" />
135+
<icon height="196" src="resources/ios/icon/[email protected]" width="196" />
136+
<icon height="216" src="resources/ios/icon/[email protected]" width="216" />
137+
<splash height="2688" src="resources/ios/splash/Default-2688h~iphone.png" width="1242" />
138+
<splash height="1242" src="resources/ios/splash/Default-Landscape-2688h~iphone.png" width="2688" />
139+
<splash height="1792" src="resources/ios/splash/Default-1792h~iphone.png" width="828" />
140+
<splash height="828" src="resources/ios/splash/Default-Landscape-1792h~iphone.png" width="1792" />
141+
<splash height="2436" src="resources/ios/splash/Default-2436h.png" width="1125" />
142+
<splash height="1125" src="resources/ios/splash/Default-Landscape-2436h.png" width="2436" />
115143
</platform>
116-
<plugin name="com-darryncampbell-cordova-plugin-intent" spec="1.1.8" />
144+
<plugin name="com-darryncampbell-cordova-plugin-intent" spec="1.3.0" />
117145
<plugin name="cordova-android-support-gradle-release" spec="3.0.1">
118146
<variable name="ANDROID_SUPPORT_VERSION" value="27.1.0" />
119147
</plugin>
@@ -125,8 +153,11 @@
125153
</plugin>
126154
<plugin name="cordova-plugin-device" spec="2.0.3" />
127155
<plugin name="cordova-plugin-file" spec="6.0.2" />
128-
<plugin name="cordova-plugin-file-opener2" spec="2.0.19" />
156+
<plugin name="cordova-plugin-file-opener2" spec="2.2.1" />
129157
<plugin name="cordova-plugin-file-transfer" spec="1.7.1" />
158+
<plugin name="cordova-plugin-geolocation" spec="4.0.2">
159+
<variable name="GEOLOCATION_USAGE_DESCRIPTION" value="We need your location so you can attach it as part of your submissions." />
160+
</plugin>
130161
<plugin name="cordova-plugin-globalization" spec="1.11.0" />
131162
<plugin name="cordova-plugin-inappbrowser" spec="3.1.0" />
132163
<plugin name="cordova-plugin-ionic-keyboard" spec="2.1.3" />
@@ -138,7 +169,7 @@
138169
<plugin name="cordova-plugin-statusbar" spec="2.4.3" />
139170
<plugin name="cordova-plugin-whitelist" spec="1.3.4" />
140171
<plugin name="cordova-plugin-zip" spec="3.1.0" />
141-
<plugin name="cordova-sqlite-storage" spec="2.6.0" />
172+
<plugin name="cordova-sqlite-storage" spec="3.4.0" />
142173
<plugin name="nl.kingsquare.cordova.background-audio" spec="1.0.1" />
143174
<plugin name="phonegap-plugin-push" spec="https://github.com/moodlemobile/phonegap-plugin-push.git#moodle-v3">
144175
<variable name="ANDROID_SUPPORT_V13_VERSION" value="27.+" />
@@ -156,6 +187,6 @@
156187
<config-file parent="FIREBASE_ANALYTICS_COLLECTION_DEACTIVATED" target="*-Info.plist">
157188
<string>YES</string>
158189
</config-file>
159-
<engine name="android" spec="7.1.2" />
160-
<engine name="ios" spec="4.5.5" />
190+
<engine name="android" spec="8.0.0" />
191+
<engine name="ios" spec="5.0.1" />
161192
</widget>

config/copy.config.js

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,37 @@ module.exports = {
1212
copyConfig: {
1313
src: ['{{ROOT}}/src/config.json'],
1414
dest: '{{WWW}}/'
15-
}
15+
},
16+
copyMathJaxMain: {
17+
src: ['{{ROOT}}/node_modules/mathjax/MathJax.js'],
18+
dest: '{{WWW}}/lib/mathjax'
19+
},
20+
copyMathJaxExtensions: {
21+
src: ['{{ROOT}}/node_modules/mathjax/extensions/**/*'],
22+
dest: '{{WWW}}/lib/mathjax/extensions'
23+
},
24+
copyMathJaxElement: {
25+
src: ['{{ROOT}}/node_modules/mathjax/jax/element/**/*'],
26+
dest: '{{WWW}}/lib/mathjax/jax/element'
27+
},
28+
copyMathJaxInput: {
29+
src: ['{{ROOT}}/node_modules/mathjax/jax/input/**/*'],
30+
dest: '{{WWW}}/lib/mathjax/jax/input'
31+
},
32+
copyMathJaxSVGOutput: {
33+
src: ['{{ROOT}}/node_modules/mathjax/jax/output/SVG/**/*'],
34+
dest: '{{WWW}}/lib/mathjax/jax/output/SVG'
35+
},
36+
copyMathJaxPreviewHTMLOutput: {
37+
src: ['{{ROOT}}/node_modules/mathjax/jax/output/PreviewHTML/**/*'],
38+
dest: '{{WWW}}/lib/mathjax/jax/output/PreviewHTML'
39+
},
40+
copyMathJaxLocalization: {
41+
src: ['{{ROOT}}/node_modules/mathjax/localization/**/*'],
42+
dest: '{{WWW}}/lib/mathjax/localization'
43+
},
44+
copyH5P: {
45+
src: ['{{ROOT}}/src/core/h5p/assets/**/*'],
46+
dest: '{{WWW}}/h5p/'
47+
},
1648
};

desktop/assets/windows/AppXManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<Identity Name="3312ADB7.MoodleDesktop"
77
ProcessorArchitecture="x64"
88
Publisher="CN=33CDCDF6-1EB5-4827-9897-ED25C91A32F6"
9-
Version="3.7.2.0" />
9+
Version="3.8.0.0" />
1010
<Properties>
1111
<DisplayName>Moodle Desktop</DisplayName>
1212
<PublisherDisplayName>Moodle Pty Ltd.</PublisherDisplayName>

gulpfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ var gulp = require('gulp'),
1313
File = gutil.File,
1414
exec = require('child_process').exec,
1515
license = '' +
16-
'// (C) Copyright 2015 Martin Dougiamas\n' +
16+
'// (C) Copyright 2015 Moodle Pty Ltd.\n' +
1717
'//\n' +
1818
'// Licensed under the Apache License, Version 2.0 (the "License");\n' +
1919
'// you may not use this file except in compliance with the License.\n' +

0 commit comments

Comments
 (0)