Merge pull request #2460 from moodlehq/integration

Integration
main
Juan Leyva 2020-07-16 11:56:27 +02:00 committed by GitHub
commit 5c381e3623
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
48 changed files with 217 additions and 125 deletions

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<widget android-versionCode="39100" id="com.moodle.moodlemobile" ios-CFBundleVersion="3.9.1.0" version="3.9.1" versionCode="39100" 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="39200" id="com.moodle.moodlemobile" ios-CFBundleVersion="3.9.2.0" version="3.9.2" versionCode="39200" 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>
@ -241,7 +241,7 @@
<true />
</edit-config>
<edit-config file="*-Info.plist" mode="merge" target="CFBundleShortVersionString">
<string>3.9.1</string>
<string>3.9.2</string>
</edit-config>
<config-file parent="FIREBASE_ANALYTICS_COLLECTION_DEACTIVATED" target="*-Info.plist">
<string>YES</string>

View File

@ -6,7 +6,7 @@
<Identity Name="3312ADB7.MoodleDesktop"
ProcessorArchitecture="x64"
Publisher="CN=33CDCDF6-1EB5-4827-9897-ED25C91A32F6"
Version="3.9.1.0" />
Version="3.9.2.0" />
<Properties>
<DisplayName>Moodle Desktop</DisplayName>
<PublisherDisplayName>Moodle Pty Ltd.</PublisherDisplayName>

118
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "moodlemobile",
"version": "3.9.0",
"version": "3.9.2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -6236,7 +6236,8 @@
"ansi-regex": {
"version": "2.1.1",
"resolved": false,
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
"optional": true
},
"aproba": {
"version": "1.2.0",
@ -6257,12 +6258,14 @@
"balanced-match": {
"version": "1.0.0",
"resolved": false,
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
"optional": true
},
"brace-expansion": {
"version": "1.1.11",
"resolved": false,
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@ -6277,17 +6280,20 @@
"code-point-at": {
"version": "1.1.0",
"resolved": false,
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
"optional": true
},
"concat-map": {
"version": "0.0.1",
"resolved": false,
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
"optional": true
},
"console-control-strings": {
"version": "1.1.0",
"resolved": false,
"integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4="
"integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=",
"optional": true
},
"core-util-is": {
"version": "1.0.2",
@ -6412,7 +6418,8 @@
"inherits": {
"version": "2.0.3",
"resolved": false,
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
"optional": true
},
"ini": {
"version": "1.3.5",
@ -6424,6 +6431,7 @@
"version": "1.0.0",
"resolved": false,
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@ -6438,6 +6446,7 @@
"version": "3.0.4",
"resolved": false,
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@ -6481,6 +6490,7 @@
"version": "0.5.1",
"resolved": false,
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
"optional": true,
"requires": {
"minimist": "0.0.8"
},
@ -6488,7 +6498,8 @@
"minimist": {
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
"optional": true
}
}
},
@ -6587,7 +6598,8 @@
"number-is-nan": {
"version": "1.0.1",
"resolved": false,
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0="
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
"optional": true
},
"object-assign": {
"version": "4.1.1",
@ -6599,6 +6611,7 @@
"version": "1.4.0",
"resolved": false,
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"optional": true,
"requires": {
"wrappy": "1"
}
@ -6720,6 +6733,7 @@
"version": "1.0.2",
"resolved": false,
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@ -6739,6 +6753,7 @@
"version": "3.0.1",
"resolved": false,
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@ -6794,7 +6809,8 @@
"wrappy": {
"version": "1.0.2",
"resolved": false,
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
"optional": true
},
"yallist": {
"version": "3.0.3",
@ -7278,7 +7294,8 @@
"version": "2.1.1",
"resolved": false,
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
"dev": true
"dev": true,
"optional": true
},
"aproba": {
"version": "1.2.0",
@ -7302,13 +7319,15 @@
"version": "1.0.0",
"resolved": false,
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
"dev": true
"dev": true,
"optional": true
},
"brace-expansion": {
"version": "1.1.11",
"resolved": false,
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@ -7325,19 +7344,22 @@
"version": "1.1.0",
"resolved": false,
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
"dev": true
"dev": true,
"optional": true
},
"concat-map": {
"version": "0.0.1",
"resolved": false,
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
"dev": true
"dev": true,
"optional": true
},
"console-control-strings": {
"version": "1.1.0",
"resolved": false,
"integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=",
"dev": true
"dev": true,
"optional": true
},
"core-util-is": {
"version": "1.0.2",
@ -7468,7 +7490,8 @@
"version": "2.0.3",
"resolved": false,
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
"dev": true
"dev": true,
"optional": true
},
"ini": {
"version": "1.3.5",
@ -7482,6 +7505,7 @@
"resolved": false,
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@ -7498,6 +7522,7 @@
"resolved": false,
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@ -7506,13 +7531,15 @@
"version": "0.0.8",
"resolved": false,
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
"dev": true
"dev": true,
"optional": true
},
"minipass": {
"version": "2.3.5",
"resolved": false,
"integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==",
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
@ -7533,6 +7560,7 @@
"resolved": false,
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
@ -7621,7 +7649,8 @@
"version": "1.0.1",
"resolved": false,
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
"dev": true
"dev": true,
"optional": true
},
"object-assign": {
"version": "4.1.1",
@ -7635,6 +7664,7 @@
"resolved": false,
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
@ -7730,7 +7760,8 @@
"version": "5.1.2",
"resolved": false,
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
"dev": true
"dev": true,
"optional": true
},
"safer-buffer": {
"version": "2.1.2",
@ -7772,6 +7803,7 @@
"resolved": false,
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@ -7793,6 +7825,7 @@
"resolved": false,
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@ -7841,13 +7874,15 @@
"version": "1.0.2",
"resolved": false,
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
"dev": true
"dev": true,
"optional": true
},
"yallist": {
"version": "3.0.3",
"resolved": false,
"integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==",
"dev": true
"dev": true,
"optional": true
}
}
},
@ -14909,7 +14944,8 @@
"version": "2.1.1",
"resolved": false,
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
"dev": true
"dev": true,
"optional": true
},
"aproba": {
"version": "1.2.0",
@ -14933,13 +14969,15 @@
"version": "1.0.0",
"resolved": false,
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
"dev": true
"dev": true,
"optional": true
},
"brace-expansion": {
"version": "1.1.11",
"resolved": false,
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@ -14956,19 +14994,22 @@
"version": "1.1.0",
"resolved": false,
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
"dev": true
"dev": true,
"optional": true
},
"concat-map": {
"version": "0.0.1",
"resolved": false,
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
"dev": true
"dev": true,
"optional": true
},
"console-control-strings": {
"version": "1.1.0",
"resolved": false,
"integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=",
"dev": true
"dev": true,
"optional": true
},
"core-util-is": {
"version": "1.0.2",
@ -15099,7 +15140,8 @@
"version": "2.0.3",
"resolved": false,
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
"dev": true
"dev": true,
"optional": true
},
"ini": {
"version": "1.3.5",
@ -15113,6 +15155,7 @@
"resolved": false,
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@ -15129,6 +15172,7 @@
"resolved": false,
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@ -15137,13 +15181,15 @@
"version": "0.0.8",
"resolved": false,
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
"dev": true
"dev": true,
"optional": true
},
"minipass": {
"version": "2.3.5",
"resolved": false,
"integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==",
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
@ -15164,6 +15210,7 @@
"resolved": false,
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
@ -15252,7 +15299,8 @@
"version": "1.0.1",
"resolved": false,
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
"dev": true
"dev": true,
"optional": true
},
"object-assign": {
"version": "4.1.1",
@ -15266,6 +15314,7 @@
"resolved": false,
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
@ -15361,7 +15410,8 @@
"version": "5.1.2",
"resolved": false,
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
"dev": true
"dev": true,
"optional": true
},
"safer-buffer": {
"version": "2.1.2",
@ -15403,6 +15453,7 @@
"resolved": false,
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@ -15424,6 +15475,7 @@
"resolved": false,
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@ -15472,13 +15524,15 @@
"version": "1.0.2",
"resolved": false,
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
"dev": true
"dev": true,
"optional": true
},
"yallist": {
"version": "3.0.3",
"resolved": false,
"integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==",
"dev": true
"dev": true,
"optional": true
}
}
},

View File

@ -1,6 +1,6 @@
{
"name": "moodlemobile",
"version": "3.9.1",
"version": "3.9.2",
"description": "The official app for Moodle.",
"author": {
"name": "Moodle Pty Ltd.",
@ -253,7 +253,7 @@
"category": "public.app-category.education",
"icon": "resources/desktop/icon.icns",
"target": "mas",
"bundleVersion": "3.9.1",
"bundleVersion": "3.9.2",
"extendInfo": {
"ElectronTeamID": "2NU57U5PAW"
}

View File

@ -1,7 +1,6 @@
#!/bin/bash
LANGPACKSFOLDER='../../moodle-langpacks'
stepnumber=$1
function check_success_exit {
if [ $? -ne 0 ]; then

View File

@ -186,7 +186,7 @@ function build_lang($lang, $keys) {
$local = 0;
$langparts = explode('-', $lang, 2);
$parentname = $langparts[0] ?? "";
$parentname = $langparts[0] ? $langparts[0] : "";
$parent = "";
echo "Processing $lang";
@ -307,8 +307,6 @@ function detect_lang($lang, $keys) {
$langname = $string['thislanguage'];
$title .= " ".$langname." -D";
// Add the translation to the array.
foreach ($keys as $key => $value) {
$string = get_translation_strings($langfoldername, $value->file);

View File

@ -1557,6 +1557,7 @@
"core.errorsomedatanotdownloaded": "local_moodlemobileapp",
"core.errorsync": "local_moodlemobileapp",
"core.errorsyncblocked": "local_moodlemobileapp",
"core.errorurlschemeinvalidsite": "local_moodlemobileapp",
"core.explanationdigitalminor": "moodle",
"core.favourites": "moodle",
"core.filename": "repository",
@ -2096,6 +2097,7 @@
"core.tag.errorareanotsupported": "local_moodlemobileapp",
"core.tag.inalltagcoll": "tag",
"core.tag.itemstaggedwith": "tag",
"core.tag.noresultsfor": "tag",
"core.tag.notagsfound": "tag",
"core.tag.searchtags": "tag",
"core.tag.showingfirsttags": "tag",

View File

@ -37,7 +37,7 @@ export class AddonBlockMyOverviewHandler extends CoreBlockBaseHandler {
* @return Whether or not the handler is enabled on a site level.
*/
isEnabled(): boolean | Promise<boolean> {
return this.sitesProvider.getCurrentSite().isVersionGreaterEqualThan('3.6') ||
return (this.sitesProvider.getCurrentSite() && this.sitesProvider.getCurrentSite().isVersionGreaterEqualThan('3.6')) ||
!this.coursesProvider.isMyCoursesDisabledInSite();
}

View File

@ -41,7 +41,9 @@ export class AddonBlockTimelineHandler extends CoreBlockBaseHandler {
*/
isEnabled(): boolean | Promise<boolean> {
return this.timelineProvider.isAvailable().then((enabled) => {
return enabled && (this.sitesProvider.getCurrentSite().isVersionGreaterEqualThan('3.6') ||
const currentSite = this.sitesProvider.getCurrentSite();
return enabled && ((currentSite && currentSite.isVersionGreaterEqualThan('3.6')) ||
!this.coursesProvider.isMyCoursesDisabledInSite());
});
}

View File

@ -222,7 +222,7 @@ export class AddonCalendarCalendarComponent implements OnInit, OnChanges, DoChec
let isPast = true;
this.weeks.forEach((week) => {
week.days.some((day) => {
week.days.forEach((day) => {
day.istoday = day.mday == currentDay;
day.ispast = isPast && !day.istoday;
isPast = day.ispast;
@ -231,11 +231,7 @@ export class AddonCalendarCalendarComponent implements OnInit, OnChanges, DoChec
day.events.forEach((event) => {
event.ispast = this.isEventPast(event);
});
return true;
}
return day.istoday;
});
});
}

View File

@ -393,7 +393,7 @@ export class AddonCalendarProvider {
site = site || this.sitesProvider.getCurrentSite();
// The WS to create/edit events requires a fix that was integrated in 3.7.1.
return site.isVersionGreaterEqualThan('3.7.1');
return site && site.isVersionGreaterEqualThan('3.7.1');
}
/**

View File

@ -83,6 +83,6 @@ export class AddonFilterMultilangHandler extends CoreFilterDefaultHandler {
*/
shouldBeApplied(options: CoreFilterFormatTextOptions, site?: CoreSite): boolean {
// The filter should be applied if site is older than 3.7 or the WS didn't filter the text.
return options.wsNotFiltered || !site.isVersionGreaterEqualThan('3.7');
return options.wsNotFiltered || (site && !site.isVersionGreaterEqualThan('3.7'));
}
}

View File

@ -207,9 +207,10 @@ export class AddonModAssignIndexComponent extends CoreCourseModuleMainActivityCo
// Check if groupmode is enabled to avoid showing wrong numbers.
return this.groupsProvider.getActivityGroupInfo(this.assign.cmid, false).then((groupInfo) => {
const currentSite = this.sitesProvider.getCurrentSite();
this.groupInfo = groupInfo;
this.showNumbers = groupInfo.groups.length == 0 ||
this.sitesProvider.getCurrentSite().isVersionGreaterEqualThan('3.5');
(currentSite && currentSite.isVersionGreaterEqualThan('3.5'));
return this.setGroup(this.groupsProvider.validateGroupId(this.group, groupInfo));
});
@ -258,8 +259,10 @@ export class AddonModAssignIndexComponent extends CoreCourseModuleMainActivityCo
}
}
const currentSite = this.sitesProvider.getCurrentSite();
this.needsGradingAvalaible = response.gradingsummary && response.gradingsummary.submissionsneedgradingcount > 0 &&
this.sitesProvider.getCurrentSite().isVersionGreaterEqualThan('3.2');
currentSite && currentSite.isVersionGreaterEqualThan('3.2');
});
}

View File

@ -225,7 +225,7 @@ export class AddonModAssignSubmissionOnlineTextHandler implements AddonModAssign
// Bug was fixed in 3.1.1 minor release and in 3.2.
const currentSite = this.sitesProvider.getCurrentSite();
return currentSite.isVersionGreaterEqualThan('3.1.1') || currentSite.checkIfAppUsesLocalMobile();
return currentSite && (currentSite.isVersionGreaterEqualThan('3.1.1') || currentSite.checkIfAppUsesLocalMobile());
}
/**

View File

@ -291,7 +291,8 @@ export class AddonModForumProvider {
* @return True if fixed, false otherwise.
*/
isAllParticipantsFixed(): boolean {
return this.sitesProvider.getCurrentSite().isVersionGreaterEqualThan(['3.1.5', '3.2.2']);
return this.sitesProvider.getCurrentSite() &&
this.sitesProvider.getCurrentSite().isVersionGreaterEqualThan(['3.1.5', '3.2.2']);
}
/**
@ -543,7 +544,7 @@ export class AddonModForumProvider {
isDiscussionListSortingAvailable(site?: CoreSite): boolean {
site = site || this.sitesProvider.getCurrentSite();
return site.isVersionGreaterEqualThan('3.7');
return site && site.isVersionGreaterEqualThan('3.7');
}
/**

View File

@ -87,7 +87,8 @@ export class AddonModForumPrefetchHandler extends CoreCourseActivityPrefetchHand
*/
protected getPostsFiles(posts: any[]): any[] {
let files = [];
const getInlineFiles = this.sitesProvider.getCurrentSite().isVersionGreaterEqualThan('3.2');
const getInlineFiles = this.sitesProvider.getCurrentSite() &&
this.sitesProvider.getCurrentSite().isVersionGreaterEqualThan('3.2');
posts.forEach((post) => {
if (post.attachments && post.attachments.length) {

View File

@ -86,7 +86,8 @@ export class AddonModGlossaryPrefetchHandler extends CoreCourseActivityPrefetchH
*/
protected getFilesFromGlossaryAndEntries(module: any, glossary: any, entries: any[]): any[] {
let files = this.getIntroFilesFromInstance(module, glossary);
const getInlineFiles = this.sitesProvider.getCurrentSite().isVersionGreaterEqualThan('3.2');
const getInlineFiles = this.sitesProvider.getCurrentSite() &&
this.sitesProvider.getCurrentSite().isVersionGreaterEqualThan('3.2');
// Get entries files.
entries.forEach((entry) => {

View File

@ -110,8 +110,9 @@ export class AddonModQuizPrefetchHandler extends CoreCourseActivityPrefetchHandl
*/
protected getAttemptsFeedbackFiles(quiz: any, attempts: any[]): Promise<any[]> {
// We have quiz data, now we'll get specific data for each attempt.
const promises = [],
getInlineFiles = this.sitesProvider.getCurrentSite().isVersionGreaterEqualThan('3.2');
const promises = [];
const getInlineFiles = this.sitesProvider.getCurrentSite() &&
this.sitesProvider.getCurrentSite().isVersionGreaterEqualThan('3.2');
let files = [];
attempts.forEach((attempt) => {

View File

@ -104,8 +104,10 @@ export class AddonModResourceHelperProvider {
* @return Whether the resource should be displayed embeded.
*/
isDisplayedEmbedded(module: any, display: number): boolean {
const currentSite = this.sitesProvider.getCurrentSite();
if ((!module.contents.length && !module.contentsinfo) || !this.fileProvider.isAvailable() ||
(!this.sitesProvider.getCurrentSite().isVersionGreaterEqualThan('3.7') && this.isNextcloudFile(module))) {
(currentSite && !currentSite.isVersionGreaterEqualThan('3.7') && this.isNextcloudFile(module))) {
return false;
}

View File

@ -147,7 +147,7 @@ export class AddonModResourcePrefetchHandler extends CoreCourseResourcePrefetchH
* @return Promise resolved with true if downloadable, resolved with false otherwise.
*/
isDownloadable(module: any, courseId: number): Promise<boolean> {
if (this.sitesProvider.getCurrentSite().isVersionGreaterEqualThan('3.7')) {
if (this.sitesProvider.getCurrentSite() && this.sitesProvider.getCurrentSite().isVersionGreaterEqualThan('3.7')) {
// Nextcloud files are downloadable from 3.7 onwards.
return Promise.resolve(true);
}

View File

@ -13,7 +13,7 @@
<ion-content>
<core-loading [hideUntil]="loaded">
<core-navigation-bar [previous]="previousSco" [next]="nextSco" (action)="loadSco($event)"></core-navigation-bar>
<core-iframe *ngIf="loaded && src" [src]="src" [iframeWidth]="scorm.popup ? scorm.width : undefined" [iframeHeight]="scorm.popup ? scorm.height : undefined"></core-iframe>
<core-iframe *ngIf="loaded && src" [src]="src" [iframeWidth]="scormWidth" [iframeHeight]="scormHeight"></core-iframe>
<p *ngIf="!src && errorMessage">{{ errorMessage | translate }}</p>
</core-loading>
</ion-content>

View File

@ -17,7 +17,7 @@ import { IonicPage, NavParams, ModalController } from 'ionic-angular';
import { CoreEventsProvider } from '@providers/events';
import { CoreSitesProvider } from '@providers/sites';
import { CoreSyncProvider } from '@providers/sync';
import { CoreDomUtilsProvider } from '@providers/utils/dom';
import { CoreDomUtils } from '@providers/utils/dom';
import { CoreTimeUtilsProvider } from '@providers/utils/time';
import { CoreIonTabsComponent } from '@components/ion-tabs/ion-tabs';
import { AddonModScormProvider, AddonModScormAttemptCountResult } from '../../providers/scorm';
@ -46,6 +46,8 @@ export class AddonModScormPlayerPage implements OnInit, OnDestroy {
src: string; // Iframe src.
errorMessage: string; // Error message.
accessInfo: any; // Access information.
scormWidth: null; // Width applied to scorm iframe.
scormHeight: null; // Height applied to scorm iframe.
protected siteId: string;
protected mode: string; // Mode to play the SCORM.
@ -65,11 +67,18 @@ export class AddonModScormPlayerPage implements OnInit, OnDestroy {
protected launchPrevObserver: any;
protected goOfflineObserver: any;
constructor(navParams: NavParams, protected modalCtrl: ModalController, protected eventsProvider: CoreEventsProvider,
protected sitesProvider: CoreSitesProvider, protected syncProvider: CoreSyncProvider,
protected domUtils: CoreDomUtilsProvider, protected timeUtils: CoreTimeUtilsProvider,
protected scormProvider: AddonModScormProvider, protected scormHelper: AddonModScormHelperProvider,
protected scormSyncProvider: AddonModScormSyncProvider, protected tabs: CoreIonTabsComponent) {
constructor(
navParams: NavParams,
protected modalCtrl: ModalController,
protected eventsProvider: CoreEventsProvider,
protected sitesProvider: CoreSitesProvider,
protected syncProvider: CoreSyncProvider,
protected timeUtils: CoreTimeUtilsProvider,
protected scormProvider: AddonModScormProvider,
protected scormHelper: AddonModScormHelperProvider,
protected scormSyncProvider: AddonModScormSyncProvider,
protected tabs: CoreIonTabsComponent
) {
this.scorm = navParams.get('scorm') || {};
this.mode = navParams.get('mode') || AddonModScormProvider.MODENORMAL;
@ -95,12 +104,14 @@ export class AddonModScormPlayerPage implements OnInit, OnDestroy {
if (this.scorm.popup) {
this.tabs.changeVisibility(false);
// If we receive a value <= 100 we need to assume it's a percentage.
if (this.scorm.width <= 100) {
this.scorm.width = this.scorm.width + '%';
}
if (this.scorm.height <= 100) {
this.scorm.height = this.scorm.height + '%';
// If we receive a value > 100 we assume it's a fixed pixel size.
if (this.scorm.width > 100) {
this.scormWidth = this.scorm.width;
// Only get fixed size on height if width is also fixed.
if (this.scorm.height > 100) {
this.scormHeight = this.scorm.height;
}
}
}
@ -111,7 +122,7 @@ export class AddonModScormPlayerPage implements OnInit, OnDestroy {
const promise = this.newAttempt ? this.setStartTime(this.currentSco.id) : Promise.resolve();
return promise.catch((error) => {
this.domUtils.showErrorModalDefault(error, 'addon.mod_scorm.errorgetscorm', true);
CoreDomUtils.instance.showErrorModalDefault(error, 'addon.mod_scorm.errorgetscorm', true);
}).finally(() => {
// Load SCO.
this.loadSco(this.currentSco);
@ -152,7 +163,7 @@ export class AddonModScormPlayerPage implements OnInit, OnDestroy {
// Wait a bit to prevent collisions between this store and SCORM API's store.
setTimeout(() => {
this.scormHelper.convertAttemptToOffline(this.scorm, this.attempt).catch((error) => {
this.domUtils.showErrorModalDefault(error, 'core.error', true);
CoreDomUtils.instance.showErrorModalDefault(error, 'core.error', true);
}).then(() => {
this.refreshToc();
});
@ -248,7 +259,7 @@ export class AddonModScormPlayerPage implements OnInit, OnDestroy {
return Promise.all(promises);
});
}).catch((error) => {
this.domUtils.showErrorModalDefault(error, 'addon.mod_scorm.errorgetscorm', true);
CoreDomUtils.instance.showErrorModalDefault(error, 'addon.mod_scorm.errorgetscorm', true);
});
});
}
@ -372,7 +383,7 @@ export class AddonModScormPlayerPage implements OnInit, OnDestroy {
return this.scormProvider.saveTracks(sco.id, this.attempt, tracks, this.scorm, true);
}).catch((error) => {
this.domUtils.showErrorModalDefault(error, 'core.error', true);
CoreDomUtils.instance.showErrorModalDefault(error, 'core.error', true);
});
}
});
@ -432,7 +443,7 @@ export class AddonModScormPlayerPage implements OnInit, OnDestroy {
}).then(() => {
return this.fetchToc();
}).catch((error) => {
this.domUtils.showErrorModalDefault(error, 'addon.mod_scorm.errorgetscorm', true);
CoreDomUtils.instance.showErrorModalDefault(error, 'addon.mod_scorm.errorgetscorm', true);
});
}

View File

@ -112,7 +112,7 @@
<h2>{{ 'addon.mod_workshop.publishedsubmissions' | translate }}</h2>
</ion-item-divider>
<ng-container *ngFor="let submission of publishedSubmissions">
<addon-mod-workshop-submission [submission]="submission" [courseId]="workshop.course" [module]="module" [workshop]="workshop" [access]="access" summary="true"></addon-mod-workshop-submission>
<addon-mod-workshop-submission [submission]="submission" [courseId]="workshop.course" [module]="module" [workshop]="workshop" [access]="access" summary="true" class="core-as-item"></addon-mod-workshop-submission>
</ng-container>
</ion-card>
</ng-container>
@ -134,7 +134,7 @@
<p>{{ 'addon.mod_workshop.assignedassessmentsnone' | translate }}</p>
</ion-item>
<ng-container *ngFor="let assessment of (assessments || [])">
<addon-mod-workshop-submission [submission]="assessment.submission" [assessment]="assessment" [courseId]="workshop.course" [module]="module" [workshop]="workshop" [access]="access" summary="true"></addon-mod-workshop-submission>
<addon-mod-workshop-submission [submission]="assessment.submission" [assessment]="assessment" [courseId]="workshop.course" [module]="module" [workshop]="workshop" [access]="access" summary="true" class="core-as-item"></addon-mod-workshop-submission>
</ng-container>
</ion-card >
</ng-container>
@ -156,7 +156,7 @@
</ion-item>
<ng-container *ngFor="let submission of grades">
<addon-mod-workshop-submission [submission]="submission" [courseId]="workshop.course" [module]="module" [workshop]="workshop" [access]="access" summary="true"></addon-mod-workshop-submission>
<addon-mod-workshop-submission [submission]="submission" [courseId]="workshop.course" [module]="module" [workshop]="workshop" [access]="access" summary="true" class="core-as-item"></addon-mod-workshop-submission>
</ng-container>
<ion-grid *ngIf="page > 0 || hasNextPage">

View File

@ -1,6 +1,6 @@
<core-loading [hideUntil]="loaded">
<div *ngIf="!summary">
<ion-list-header text-wrap>
<ion-item text-wrap class="addon-workshop-submission-title">
<ion-avatar core-user-avatar [user]="profile" [courseId]="courseId" [userId]="profile && profile.id" item-start></ion-avatar>
<h2><core-format-text [text]="submission.title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text></h2>
<p *ngIf="profile && profile.fullname">{{profile.fullname}}</p>
@ -21,7 +21,7 @@
<ng-container *ngIf="submission.offline"><ion-icon name="time"></ion-icon> {{ 'core.notsent' | translate }}</ng-container>
<ng-container *ngIf="submission.deleted"><ion-icon name="trash"></ion-icon> {{ 'core.deletedoffline' | translate }}</ng-container>
</ion-note>
</ion-list-header>
</ion-item>
<ion-item text-wrap *ngIf="submission.content">
<core-format-text [component]="component" [componentId]="componentId" [text]="submission.content" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"></core-format-text>
</ion-item>

View File

@ -1,4 +1,13 @@
ion-app.app-root addon-mod-workshop-submission,
ion-app.app-root .card.with-borders addon-mod-workshop-submission {
@include core-as-items();
ion-app.app-root addon-mod-workshop-submission .addon-workshop-submission-title {
&.item-ios {
border-bottom: $list-ios-header-border-bottom;
}
&.item-md {
border-bottom: 1px solid $list-md-border-color;
}
&:last-child {
border: 0;
}
}

View File

@ -113,8 +113,8 @@ ion-app.app-root {
@include core-as-items();
}
.card.with-borders .item,
.list.with-borders .item {
.card.with-borders > .item,
.list.with-borders > .item {
@include core-items();
}

View File

@ -2095,6 +2095,7 @@
"core.tag.errorareanotsupported": "This tag area is not supported by the app.",
"core.tag.inalltagcoll": "Everywhere",
"core.tag.itemstaggedwith": "{{$a.tagarea}} tagged with \"{{$a.tag}}\"",
"core.tag.noresultsfor": "No results for \"{{$a}}\"",
"core.tag.notagsfound": "No tags matching \"{{$a}}\" found",
"core.tag.searchtags": "Search tags",
"core.tag.showingfirsttags": "Showing {{$a}} most popular tags",

View File

@ -1,4 +1,9 @@
ion-app.app-root core-iframe {
> div {
max-width: 100%;
max-height: 100%;
}
iframe {
border: 0;
display: block;

View File

@ -7,7 +7,7 @@
</span>
</div>
</div>
<div #originalTabs class="tabcontent">
<div #originalTabs class="tabcontent" [class.tabshidden]="hidden">
<ng-content></ng-content>
</div>
<div #portal tab-portal></div>

View File

@ -27,6 +27,9 @@ ion-app.app-root core-ion-tabs {
.ion-page > ion-content > .scroll-content {
margin-bottom: $navbar-md-height;
}
.tabshidden .ion-page > ion-content > .scroll-content {
margin-bottom: 0;
}
}
&[tabsplacement="side"] {

View File

@ -2,8 +2,8 @@
"app_id": "com.moodle.moodlemobile",
"appname": "Moodle Mobile",
"desktopappname": "Moodle Desktop",
"versioncode": 3910,
"versionname": "3.9.1",
"versioncode": 3920,
"versionname": "3.9.2",
"cache_update_frequency_usually": 420000,
"cache_update_frequency_often": 1200000,
"cache_update_frequency_sometimes": 3600000,

View File

@ -122,7 +122,7 @@ export class CoreCourseProvider {
canGetCourseBlocks(site?: CoreSite): boolean {
site = site || this.sitesProvider.getCurrentSite();
return site.isVersionGreaterEqualThan('3.7') && site.wsAvailable('core_block_get_course_blocks');
return site && site.isVersionGreaterEqualThan('3.7') && site.wsAvailable('core_block_get_course_blocks');
}
/**
@ -135,7 +135,7 @@ export class CoreCourseProvider {
canRequestStealthModules(site?: CoreSite): boolean {
site = site || this.sitesProvider.getCurrentSite();
return site.isVersionGreaterEqualThan(['3.4.6', '3.5.3']);
return site && site.isVersionGreaterEqualThan(['3.4.6', '3.5.3']);
}
/**

View File

@ -197,7 +197,9 @@ export class CoreCourseSyncProvider extends CoreSyncBaseProvider {
if (result.updated) {
// Update data.
return this.courseProvider.invalidateSections(courseId, siteId).then(() => {
if (this.sitesProvider.getCurrentSite().isVersionGreaterEqualThan('3.6')) {
const currentSite = this.sitesProvider.getCurrentSite();
if (currentSite && currentSite.isVersionGreaterEqualThan('3.6')) {
return this.courseProvider.getSections(courseId, false, true, undefined, siteId);
} else {
return this.courseProvider.getActivitiesCompletionStatus(courseId, siteId);

View File

@ -235,7 +235,7 @@ export class CoreCoursesCoursePreviewPage implements OnDestroy {
});
});
}).finally(() => {
if (!this.sitesProvider.getCurrentSite().isVersionGreaterEqualThan('3.7')) {
if (this.sitesProvider.getCurrentSite() && !this.sitesProvider.getCurrentSite().isVersionGreaterEqualThan('3.7')) {
return this.coursesProvider.isGetCoursesByFieldAvailableInSite().then((available) => {
if (available) {
return this.coursesProvider.getCourseByField('id', this.course.id).then((course) => {
@ -402,7 +402,7 @@ export class CoreCoursesCoursePreviewPage implements OnDestroy {
promises.push(this.coursesProvider.invalidateCourse(this.course.id));
promises.push(this.coursesProvider.invalidateCourseEnrolmentMethods(this.course.id));
promises.push(this.courseOptionsDelegate.clearAndInvalidateCoursesOptions(this.course.id));
if (this.sitesProvider.getCurrentSite().isVersionGreaterEqualThan('3.7')) {
if (this.sitesProvider.getCurrentSite() && !this.sitesProvider.getCurrentSite().isVersionGreaterEqualThan('3.7')) {
promises.push(this.coursesProvider.invalidateCoursesByField('id', this.course.id));
}
if (this.guestInstanceId) {

View File

@ -114,7 +114,7 @@ export class CoreCoursesHelperProvider {
promises = [],
colors = [];
if (site.isVersionGreaterEqualThan('3.8')) {
if (site && site.isVersionGreaterEqualThan('3.8')) {
promises.push(site.getConfig().then((configs) => {
for (let x = 0; x < 10; x++) {
colors[x] = configs['core_admin_coursecolor' + (x + 1)] || null;

View File

@ -64,12 +64,10 @@ export class CoreFileUploaderFileHandler implements CoreFileUploaderHandler {
* @return Data.
*/
getData(): CoreFileUploaderHandlerData {
const isIOS = this.platform.is('ios');
const handler: CoreFileUploaderHandlerData = {
title: isIOS ? 'core.fileuploader.more' : 'core.fileuploader.file',
title: 'core.fileuploader.file',
class: 'core-fileuploader-file-handler',
icon: isIOS ? 'more' : 'folder',
icon: 'folder',
};
if (this.appProvider.isMobile()) {
@ -98,7 +96,6 @@ export class CoreFileUploaderFileHandler implements CoreFileUploaderHandler {
input.addEventListener('change', (evt: Event) => {
const file = input.files[0];
let fileName;
input.value = ''; // Unset input.
if (!file) {
@ -113,17 +110,8 @@ export class CoreFileUploaderFileHandler implements CoreFileUploaderHandler {
return;
}
fileName = file.name;
if (isIOS) {
// Check the name of the file and add a timestamp if needed (take picture).
const matches = fileName.match(/image\.(jpe?g|png)/);
if (matches) {
fileName = 'image_' + this.timeUtils.readableTimestamp() + '.' + matches[1];
}
}
// Upload the picked file.
this.uploaderHelper.uploadFileObject(file, maxSize, upload, allowOffline, fileName).then((result) => {
this.uploaderHelper.uploadFileObject(file, maxSize, upload, allowOffline, file.name).then((result) => {
this.uploaderHelper.fileUploaded(result);
}).catch((error) => {
this.domUtils.showErrorModalDefault(error,

View File

@ -65,8 +65,12 @@ export class CoreFileUploaderHelperProvider {
*/
async chooseAndUploadFile(maxSize: number, upload?: boolean, allowOffline?: boolean, mimetypes?: string[]): Promise<any> {
const modal = this.domUtils.showModalLoading();
const result = await this.fileChooser.getFile(mimetypes ? mimetypes.join(',') : undefined);
modal.dismiss();
if (!result) {
// User canceled.
throw this.domUtils.createCanceledError();
@ -87,10 +91,6 @@ export class CoreFileUploaderHelperProvider {
const options = this.fileUploaderProvider.getFileUploadOptions(result.uri, result.name, result.mediaType, true);
if (upload) {
const size = await this.fileProvider.getExternalFileSize(result.uri);
await this.confirmUploadFile(size, false, allowOffline);
return this.uploadFile(result.uri, maxSize, true, options);
} else {
return this.copyToTmpFolder(result.uri, false, maxSize, undefined, options);

View File

@ -249,6 +249,9 @@ export class CoreLoginCredentialsPage {
this.loginHelper.treatUserTokenError(siteUrl, error, username, password);
if (error.loggedout) {
this.navCtrl.setRoot('CoreLoginSitesPage');
} else if (error.errorcode == 'forcepasswordchangenotice') {
// Reset password field.
this.credForm.controls.password.reset();
}
}).finally(() => {
modal.dismiss();

View File

@ -25,7 +25,7 @@
</ion-item>
</div>
<ion-item>
<ion-input type="text" name="value" placeholder="{{ 'core.login.usernameoremail' | translate }}" formControlName="value" autocapitalize="none" autocorrect="off" [core-auto-focus]></ion-input>
<ion-input type="text" name="value" placeholder="{{ 'core.login.usernameoremail' | translate }}" formControlName="value" autocapitalize="none" autocorrect="off" [core-auto-focus]="autoFocus"></ion-input>
</ion-item>
<ion-item>
<button text-wrap ion-button block [disabled]="!myForm.valid">{{ 'core.courses.search' | translate }}</button>

View File

@ -13,7 +13,7 @@
// limitations under the License.
import { Component, ViewChild, ElementRef } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import { IonicPage, NavController, NavParams, Platform } from 'ionic-angular';
import { TranslateService } from '@ngx-translate/core';
import { CoreEventsProvider } from '@providers/events';
import { CoreSitesProvider } from '@providers/sites';
@ -35,10 +35,12 @@ export class CoreLoginForgottenPasswordPage {
myForm: FormGroup;
siteUrl: string;
autoFocus: boolean;
constructor(protected navCtrl: NavController,
navParams: NavParams,
fb: FormBuilder,
platform: Platform,
protected translate: TranslateService,
protected loginHelper: CoreLoginHelperProvider,
protected domUtils: CoreDomUtilsProvider,
@ -46,6 +48,7 @@ export class CoreLoginForgottenPasswordPage {
protected sitesProvider: CoreSitesProvider) {
this.siteUrl = navParams.get('siteUrl');
this.autoFocus = platform.is('tablet');
this.myForm = fb.group({
field: ['username', Validators.required],
value: [navParams.get('username') || '', Validators.required]

View File

@ -221,6 +221,9 @@ export class CoreLoginReconnectPage {
if (error.loggedout) {
this.cancel();
} else if (error.errorcode == 'forcepasswordchangenotice') {
// Reset password field.
this.credForm.controls.password.reset();
}
}).finally(() => {
modal.dismiss();

View File

@ -20,13 +20,13 @@
<ng-container *ngIf="siteSelector == 'url'">
<ion-item>
<ion-label stacked><h2>{{ 'core.login.siteaddress' | translate }}</h2></ion-label>
<ion-input name="url" type="url" placeholder="https://campus.example.edu" formControlName="siteUrl" [core-auto-focus]="showKeyboard"></ion-input>
<ion-input name="url" type="url" placeholder="https://campus.example.edu" formControlName="siteUrl" [core-auto-focus]="showKeyboard && !showScanQR"></ion-input>
</ion-item>
</ng-container>
<ng-container *ngIf="siteSelector != 'url'">
<ion-item>
<ion-label stacked><h2>{{ 'core.login.siteaddress' | translate }}</h2></ion-label>
<ion-input name="url" placeholder="https://campus.example.edu" formControlName="siteUrl" [core-auto-focus]="showKeyboard" (ionChange)="searchSite($event, siteForm.value.siteUrl)"></ion-input>
<ion-input name="url" placeholder="https://campus.example.edu" formControlName="siteUrl" [core-auto-focus]="showKeyboard && !showScanQR" (ionChange)="searchSite($event, siteForm.value.siteUrl)"></ion-input>
</ion-item>
<ion-list [class.hidden]="!hasSites && !enteredSiteUrl" class="core-login-site-list">

View File

@ -4,6 +4,7 @@
"inalltagcoll": "Everywhere",
"itemstaggedwith": "{{$a.tagarea}} tagged with \"{{$a.tag}}\"",
"notagsfound": "No tags matching \"{{$a}}\" found",
"noresultsfor": "No results for \"{{$a}}\"",
"searchtags": "Search tags",
"showingfirsttags": "Showing {{$a}} most popular tags",
"tag": "Tag",

View File

@ -9,7 +9,7 @@
<ion-refresher-content pullingText="{{ 'core.pulltorefresh' | translate }}"></ion-refresher-content>
</ion-refresher>
<core-loading [hideUntil]="loaded">
<ion-list>
<ion-list *ngIf="hasUnsupportedAreas || areas">
<ion-item text-wrap *ngIf="hasUnsupportedAreas" class="core-warning-item">
<ion-icon item-start name="warning" color="warning"></ion-icon>
{{ 'core.tag.warningareasnotsupported' | translate }}
@ -19,6 +19,7 @@
<ion-badge item-end *ngIf="area.badge">{{ area.badge }}</ion-badge>
</a>
</ion-list>
<core-empty-box icon="fa-tag" *ngIf="!hasUnsupportedAreas && (!areas || !areas.length)" [message]="'core.tag.noresultsfor' | translate: { $a: tagName }"></core-empty-box>
</core-loading>
</ion-content>
</core-split-view>

View File

@ -166,7 +166,7 @@ export class CoreTagProvider {
return Promise.reject(error);
}).then((response) => {
if (!response || !response.length) {
if (!response) {
return Promise.reject(null);
}

View File

@ -711,7 +711,7 @@ export class CoreFormatTextDirective implements OnChanges {
}
// Width and height parameters are required in 3.6 and older sites.
if (!site.isVersionGreaterEqualThan('3.7')) {
if (site && !site.isVersionGreaterEqualThan('3.7')) {
newUrl += '&width=' + width + '&height=' + height;
}
iframe.src = newUrl;

View File

@ -431,6 +431,8 @@ export class CoreSitesProvider {
*/
getDemoSiteData(name: string): any {
const demoSites = CoreConfigConstants.demo_sites;
name = name.toLowerCase();
if (typeof demoSites != 'undefined' && typeof demoSites[name] != 'undefined') {
return demoSites[name];
}

View File

@ -527,7 +527,7 @@ $core-dd-question-colors: $white, $blue-light, #DCDCDC, #D8BFD8, #87CEFA, #DAA52
border-bottom: $hairlines-width solid $list-ios-border-color;
}
&:last-child > .item-inner {
&.item-block:last-child > .item-inner {
border-bottom: 0;
}
}