Skip to content

Commit 5dfccb1

Browse files
authored
Merge pull request #2326 from moodlehq/integration
Integration
2 parents 4ed3108 + 1005690 commit 5dfccb1

File tree

366 files changed

+12491
-6034
lines changed

Some content is hidden

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

366 files changed

+12491
-6034
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
sudo: required
1+
os: linux
22
dist: bionic
33
group: edge
44

@@ -23,4 +23,3 @@ script:
2323

2424
after_success:
2525
- scripts/ci.sh
26-

GoogleService-Info.plist

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,39 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5-
<key>AD_UNIT_ID_FOR_BANNER_TEST</key>
6-
<string>ca-app-pub-3940256099942544/2934735716</string>
7-
<key>AD_UNIT_ID_FOR_INTERSTITIAL_TEST</key>
8-
<string>ca-app-pub-3940256099942544/4411468910</string>
9-
<key>CLIENT_ID</key>
10-
<string>694767596569-c2cjrca92k99f6nkp3363lsb7ljhdgdr.apps.googleusercontent.com</string>
11-
<key>REVERSED_CLIENT_ID</key>
12-
<string>com.googleusercontent.apps.694767596569-c2cjrca92k99f6nkp3363lsb7ljhdgdr</string>
13-
<key>API_KEY</key>
14-
<string>AIzaSyA-77ZjkxII6GV97CC9rdUl83rzdEXu_rM</string>
15-
<key>GCM_SENDER_ID</key>
16-
<string>694767596569</string>
17-
<key>PLIST_VERSION</key>
18-
<string>1</string>
19-
<key>BUNDLE_ID</key>
20-
<string>com.moodle.moodlemobile</string>
21-
<key>PROJECT_ID</key>
22-
<string>moodlemobile-push</string>
23-
<key>STORAGE_BUCKET</key>
24-
<string>moodlemobile-push.appspot.com</string>
25-
<key>IS_ADS_ENABLED</key>
26-
<true></true>
27-
<key>IS_ANALYTICS_ENABLED</key>
28-
<false></false>
29-
<key>IS_APPINVITE_ENABLED</key>
30-
<true></true>
31-
<key>IS_GCM_ENABLED</key>
32-
<true></true>
33-
<key>IS_SIGNIN_ENABLED</key>
34-
<true></true>
35-
<key>GOOGLE_APP_ID</key>
36-
<string>1:694767596569:ios:a4cdad4d168c9d1a</string>
37-
<key>DATABASE_URL</key>
38-
<string>https://moodlemobile-push.firebaseio.com</string>
5+
<key>AD_UNIT_ID_FOR_BANNER_TEST</key>
6+
<string></string>
7+
<key>AD_UNIT_ID_FOR_INTERSTITIAL_TEST</key>
8+
<string></string>
9+
<key>CLIENT_ID</key>
10+
<string></string>
11+
<key>REVERSED_CLIENT_ID</key>
12+
<string></string>
13+
<key>API_KEY</key>
14+
<string></string>
15+
<key>GCM_SENDER_ID</key>
16+
<string></string>
17+
<key>PLIST_VERSION</key>
18+
<string>1</string>
19+
<key>BUNDLE_ID</key>
20+
<string>com.moodle.moodlemobile</string>
21+
<key>PROJECT_ID</key>
22+
<string>moodlemobile-push</string>
23+
<key>STORAGE_BUCKET</key>
24+
<string></string>
25+
<key>IS_ADS_ENABLED</key>
26+
<false></false>
27+
<key>IS_ANALYTICS_ENABLED</key>
28+
<false></false>
29+
<key>IS_APPINVITE_ENABLED</key>
30+
<false></false>
31+
<key>IS_GCM_ENABLED</key>
32+
<false></false>
33+
<key>IS_SIGNIN_ENABLED</key>
34+
<false></false>
35+
<key>GOOGLE_APP_ID</key>
36+
<string></string>
37+
<key>DATABASE_URL</key>
38+
<string></string>
3939
</dict>
4040
</plist>

PACKAGE_PROBLEMS.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Package updates known problems
2+
=================
3+
4+
@ionic/app-scripts 3.2.3 shows error Cannot find type definition file for '@types'. on ngc build.
5+
6+
com-darryncampbell-cordova-plugin-intent 2.0.0 onwards needs Android X Support. Unsupported on PGB.
7+
8+
typescript is needed to be less than 2.7 for @angular/compiler-cli
9+
10+
cordova-plugin-ionic-keyboard has problems on greater versions than 2.1.3
11+
12+
jszip has problems with "lie" dependency on greater versions than 3.1
13+
14+
promise.prototype.finally has problems on greater versions than 3.1
15+

config.xml

Lines changed: 5 additions & 5 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.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">
2+
<widget id="com.moodle.moodlemobile" version="3.8.1" 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="mobile@moodle.com" href="http://moodle.com">Moodle Mobile team</author>
@@ -23,7 +23,7 @@
2323
<preference name="webviewbounce" value="false" />
2424
<preference name="AppendUserAgent" value="MoodleMobile" />
2525
<preference name="android-minSdkVersion" value="19" />
26-
<preference name="android-targetSdkVersion" value="28" />
26+
<preference name="android-targetSdkVersion" value="29" />
2727
<preference name="UIWebViewBounce" value="false" />
2828
<preference name="DisallowOverscroll" value="true" />
2929
<preference name="BackupWebStorage" value="none" />
@@ -122,6 +122,9 @@
122122
<edit-config file="*-Info.plist" mode="merge" target="NSLocationWhenInUseUsageDescription">
123123
<string>We need your location so you can attach it as part of your submissions.</string>
124124
</edit-config>
125+
<edit-config file="*-Info.plist" mode="merge" target="NSLocationAlwaysUsageDescription">
126+
<string>We need your location so you can attach it as part of your submissions.</string>
127+
</edit-config>
125128
<icon height="20" src="resources/ios/icon/icon-20.png" width="20" />
126129
<icon height="40" src="resources/ios/icon/icon-20@2x.png" width="40" />
127130
<icon height="60" src="resources/ios/icon/icon-20@3x.png" width="60" />
@@ -181,9 +184,6 @@
181184
<edit-config file="AndroidManifest.xml" mode="merge" target="/manifest/application">
182185
<application android:usesCleartextTraffic="true" />
183186
</edit-config>
184-
<edit-config file="AndroidManifest.xml" mode="overwrite" target="/manifest/uses-feature[@android:name='android.hardware.location.gps']">
185-
<uses-feature android:name="android.hardware.location.gps" android:required="false" />
186-
</edit-config>
187187
<config-file parent="/manifest/application" target="AndroidManifest.xml">
188188
<meta-data android:name="firebase_analytics_collection_deactivated" android:value="true" />
189189
</config-file>

config/sass.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,11 @@ module.exports = {
55
'node_modules/ionicons/dist/scss',
66
'node_modules/ionic-angular/fonts',
77
'node_modules/font-awesome/scss'
8+
],
9+
includeFiles: [
10+
/\.(s(c|a)ss)$/i
11+
],
12+
excludeFiles: [
13+
/\.(wp).(scss)$/i
814
]
915
};

config/uglifyjs.config.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Check https://github.com/mishoo/UglifyJS2/tree/harmony#minify-options-structure
2+
module.exports = {
3+
/**
4+
* mangle: uglify 2's mangle option
5+
*/
6+
mangle: {
7+
keep_classnames: true,
8+
keep_fnames: true
9+
},
10+
/**
11+
* compress: uglify 2's compress option
12+
*/
13+
compress: {
14+
toplevel: true,
15+
pure_getters: true
16+
},
17+
keep_classnames: true,
18+
keep_fnames: true
19+
}

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.8.0.0" />
9+
Version="3.8.1.0" />
1010
<Properties>
1111
<DisplayName>Moodle Desktop</DisplayName>
1212
<PublisherDisplayName>Moodle Pty Ltd.</PublisherDisplayName>

google-services.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
{
22
"project_info": {
3-
"project_number": "694767596569",
4-
"firebase_url": "https://moodlemobile-push.firebaseio.com",
5-
"project_id": "moodlemobile-push",
6-
"storage_bucket": "moodlemobile-push.appspot.com"
3+
"project_number": "",
4+
"firebase_url": "",
5+
"project_id": "",
6+
"storage_bucket": ""
77
},
88
"client": [
99
{
1010
"client_info": {
11-
"mobilesdk_app_id": "1:694767596569:android:a4cdad4d168c9d1a",
11+
"mobilesdk_app_id": "1:111111111111:android:1111111111111111",
1212
"android_client_info": {
1313
"package_name": "com.moodle.moodlemobile"
1414
}
1515
},
1616
"oauth_client": [
1717
{
18-
"client_id": "694767596569-icveqqa2n56oh44l6ev1dr2oh67nh8il.apps.googleusercontent.com",
18+
"client_id": "",
1919
"client_type": 3
2020
}
2121
],
2222
"api_key": [
2323
{
24-
"current_key": "AIzaSyCb2zogu0P_aZ2LNgdwzshWExITPKTXJyk"
24+
"current_key": ""
2525
},
2626
{
27-
"current_key": "AIzaSyDRT1HwT0gSsTty0whOVtoNKAh8SPrJXLE"
27+
"current_key": ""
2828
}
2929
],
3030
"services": {

gulpfile.js

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ var gulp = require('gulp'),
55
path = require('path'),
66
slash = require('gulp-slash'),
77
clipEmptyFiles = require('gulp-clip-empty-files'),
8-
gutil = require('gulp-util'),
8+
File = require('vinyl'),
99
flatten = require('gulp-flatten'),
1010
npmPath = require('path'),
1111
concat = require('gulp-concat'),
12-
bufferFrom = require('buffer-from')
13-
File = gutil.File,
12+
htmlmin = require('gulp-htmlmin'),
13+
bufferFrom = require('buffer-from'),
1414
exec = require('child_process').exec,
1515
license = '' +
1616
'// (C) Copyright 2015 Moodle Pty Ltd.\n' +
@@ -294,6 +294,12 @@ gulp.task('copy-component-templates', function(done) {
294294

295295
gulp.src(templatesSrc, { allowEmpty: true })
296296
.pipe(flatten())
297+
// Check options here: https://github.com/kangax/html-minifier
298+
.pipe(htmlmin({
299+
collapseWhitespace: true,
300+
removeComments: true,
301+
caseSensitive: true
302+
}))
297303
.pipe(gulp.dest(templatesDest))
298304
.on('end', done);
299305
});
@@ -311,6 +317,11 @@ function getReplace(capture, baseDir, paths, parsedFiles) {
311317
var parse = path.parse(path.resolve(baseDir, capture + '.scss'));
312318
var file = parse.dir + '/' + parse.name;
313319

320+
if (file.slice(-3) === '.wp') {
321+
console.log('Windows Phone not supported "' + capture);
322+
// File was already parsed, leave the import commented.
323+
return '// @import "' + capture + '";';
324+
}
314325

315326
if (!fs.existsSync(file + '.scss')) {
316327
// File not found, might be a partial file.

0 commit comments

Comments
 (0)