Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<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">
<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">
<name>Moodle</name>
<description>Moodle official app</description>
<author email="mobile@moodle.com" href="http://moodle.com">Moodle Mobile team</author>
Expand Down
2 changes: 1 addition & 1 deletion desktop/assets/windows/AppXManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Identity Name="3312ADB7.MoodleDesktop"
ProcessorArchitecture="x64"
Publisher="CN=33CDCDF6-1EB5-4827-9897-ED25C91A32F6"
Version="3.8.1.0" />
Version="3.8.2.0" />
<Properties>
<DisplayName>Moodle Desktop</DisplayName>
<PublisherDisplayName>Moodle Pty Ltd.</PublisherDisplayName>
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "moodlemobile",
"version": "3.8.1",
"version": "3.8.2",
"description": "The official app for Moodle.",
"author": {
"name": "Moodle Pty Ltd.",
Expand Down Expand Up @@ -225,7 +225,7 @@
"category": "public.app-category.education",
"icon": "resources/desktop/icon.icns",
"target": "mas",
"bundleVersion": "3.8.1",
"bundleVersion": "3.8.2",
"extendInfo": {
"ElectronTeamID": "2NU57U5PAW"
}
Expand Down
119 changes: 67 additions & 52 deletions src/assets/exttomime.json

Large diffs are not rendered by default.

Binary file added src/assets/img/files/h5p-64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/login/faq_url.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 14 additions & 3 deletions src/assets/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1331,7 +1331,7 @@
"core.block.blocks": "Blocks",
"core.browser": "Browser",
"core.cancel": "Cancel",
"core.cannotconnect": "Cannot connect: Verify that you have correctly typed the URL and that your site uses Moodle {{$a}} or later.",
"core.cannotconnect": "<strong>Cannot connect</strong>: Verify that you have correctly typed your site address.",
"core.cannotdownloadfiles": "File downloading is disabled. Please contact your site administrator.",
"core.captureaudio": "Record audio",
"core.capturedimage": "Taken picture.",
Expand Down Expand Up @@ -1707,7 +1707,17 @@
"core.login.emailnotmatch": "Emails do not match",
"core.login.erroraccesscontrolalloworigin": "The cross-origin call you're trying to perform has been rejected. Please check https://docs.moodle.org/dev/Moodle_Mobile_development_using_Chrome_or_Chromium",
"core.login.errordeletesite": "An error occurred while deleting this site. Please try again.",
"core.login.errorexampleurl": "The URL https://campus.example.edu is only an example URL, it's not a real site. <strong>Please use the URL of your school or organization's site.</strong>",
"core.login.errorupdatesite": "An error occurred while updating the site's token.",
"core.login.faqcannotconnectanswer": "Please, contact your site administrator.",
"core.login.faqcannotconnectquestion": "I typed my site address correctly but I still can't connect.",
"core.login.faqsetupsiteanswer": "Visit {{$link}} to check out the different options you have to create your own Moodle site.",
"core.login.faqsetupsitelinktitle": "Get started.",
"core.login.faqsetupsitequestion": "I want to set up my own Moodle site.",
"core.login.faqtestappanswer": "To test the app in a Moodle Demo Site, type \"teacher\" or \"student\" in the \"Your site address\" field and click the \"Connect!\" button.",
"core.login.faqtestappquestion": "I just want to test the app, what can I do?",
"core.login.faqwhatisurlanswer": "<p>Every organisation or school has their own custom address for their Moodle site.</p><p>To find the address of the Moodle site you want to connect to, do the following:</p><ol><li>Open a web browser and go to your school's or organisation's Moodle site login page</li><li>At the top of the page, on the address bar, you will see the URL of your Moodle site. E.g. \"campus.example.edu\".{{$image}}</li><li>Copy the address (do not copy the /login and what comes after), paste it into the Moodle App and click \"Connect!\"</li><li>Now you can log into your site, using your username and password</li>",
"core.login.faqwhatisurlquestion": "What is the URL of my Moodle site? How can I find my school’s site?",
"core.login.findyoursite": "Find your site",
"core.login.firsttime": "Is this your first time here?",
"core.login.forcepasswordchangenotice": "You must change your password to proceed.",
Expand Down Expand Up @@ -1736,7 +1746,6 @@
"core.login.mobileservicesnotenabled": "Mobile access is not enabled on your site. Please contact your site administrator if you think it should be enabled.",
"core.login.mustconfirm": "You need to confirm your account",
"core.login.newaccount": "New account",
"core.login.newsitedescription": "Please enter the URL of your Moodle site. Note that it might not be configured to work with this app.",
"core.login.notloggedin": "You need to be logged in.",
"core.login.password": "Password",
"core.login.passwordforgotten": "Forgotten password",
Expand All @@ -1762,7 +1771,7 @@
"core.login.selectacountry": "Select a country",
"core.login.selectsite": "Please select your site:",
"core.login.signupplugindisabled": "{{$a}} is not enabled.",
"core.login.siteaddress": "Site address",
"core.login.siteaddress": "Your site address",
"core.login.sitehasredirect": "Your site contains at least one HTTP redirect. The app cannot follow redirects, this could be the issue that's preventing the app from connecting to your site.",
"core.login.siteinmaintenance": "Your site is in maintenance mode",
"core.login.sitepolicynotagreederror": "Site policy not agreed.",
Expand Down Expand Up @@ -1816,6 +1825,7 @@
"core.more": "more",
"core.mygroups": "My groups",
"core.name": "Name",
"core.needhelp": "Need help?",
"core.networkerroriframemsg": "This content is not available offline. Please connect to the internet and try again.",
"core.networkerrormsg": "There was a problem connecting to the site. Please check your connection and try again.",
"core.never": "Never",
Expand Down Expand Up @@ -2090,6 +2100,7 @@
"core.warningofflinedatadeleted": "Offline data from {{component}} '{{name}}' has been deleted. {{error}}",
"core.whatisyourage": "What is your age?",
"core.wheredoyoulive": "In which country do you live?",
"core.whoissiteadmin": "\"Site Administrators\" are the people who manage the Moodle at your school/university/company or learning organisation. If you don't know how to contact them, please contact your teachers/trainers.",
"core.whoops": "Oops!",
"core.whyisthishappening": "Why is this happening?",
"core.whyisthisrequired": "Why is this required?",
Expand Down
15 changes: 11 additions & 4 deletions src/assets/mimetoext.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"application/clariscad": ["ccad"],
"application/commonground": ["dp"],
"application/cu-seeme": ["cu"],
"application/dash+xml": ["mpd"],
"application/davmount+xml": ["davmount"],
"application/docbook+xml": ["dbk"],
"application/drafting": ["drw"],
Expand Down Expand Up @@ -71,6 +72,7 @@
"application/mac-compactpro": ["cpt"],
"application/macbinary": ["bin"],
"application/mads+xml": ["mads"],
"application/maple": ["mw","mws"],
"application/marc": ["mrc"],
"application/marcxml+xml": ["mrcx"],
"application/mathematica": ["ma","mb","nb"],
Expand Down Expand Up @@ -355,6 +357,7 @@
"application/vnd.mobius.plc": ["plc"],
"application/vnd.mobius.txf": ["txf"],
"application/vnd.moodle.backup": ["mbz"],
"application/vnd.moodle.profiling": ["mpr"],
"application/vnd.mophun.application": ["mpn"],
"application/vnd.mophun.certificate": ["mpc"],
"application/vnd.mozilla.xul+xml": ["xul"],
Expand Down Expand Up @@ -520,7 +523,7 @@
"application/vnd.wqd": ["wqd"],
"application/vnd.wt.stf": ["stf"],
"application/vnd.xara": ["xar","web"],
"application/vnd.xfdl": ["xfdl"],
"application/vnd.xfdl": ["xfdl","xfd"],
"application/vnd.yamaha.hv-dic": ["hvd"],
"application/vnd.yamaha.hv-script": ["hvs"],
"application/vnd.yamaha.hv-voice": ["hvp"],
Expand Down Expand Up @@ -579,6 +582,7 @@
"application/x-debian-package": ["deb","udeb"],
"application/x-deepv": ["deepv"],
"application/x-dgc-compressed": ["dgc"],
"application/x-digidoc": ["bdoc","cdoc","ddoc"],
"application/x-director": ["cct","cst","cxt","dcr","dir","dxr","fgd","swa","w3d"],
"application/x-doom": ["wad"],
"application/x-dtbncx+xml": ["ncx"],
Expand Down Expand Up @@ -709,6 +713,7 @@
"application/x-shockwave-flash": ["swf","swfl"],
"application/x-silverlight-app": ["xap"],
"application/x-sit": ["sit"],
"application/x-smarttech-notebook": ["gallery","gallerycollection","galleryitem","nbk","notebook","xbk"],
"application/x-sprite": ["spr","sprite"],
"application/x-sql": ["sql"],
"application/x-stuffit": ["sit"],
Expand Down Expand Up @@ -762,13 +767,14 @@
"application/xv+xml": ["mxml","xhvml","xvm","xvml"],
"application/yang": ["yang"],
"application/yin+xml": ["yin"],
"application/zip": ["zip"],
"application/zip": ["zip","h5p"],
"audio/aac": ["aac"],
"audio/adpcm": ["adp"],
"audio/aiff": ["aif","aifc","aiff"],
"audio/amr": ["amr"],
"audio/au": ["au"],
"audio/basic": ["au","snd"],
"audio/flac": ["flac"],
"audio/it": ["it"],
"audio/make": ["funk","my","pfunk"],
"audio/make.my.funk": ["pfunk"],
Expand Down Expand Up @@ -816,7 +822,7 @@
"audio/x-mod": ["mod"],
"audio/x-mpeg": ["mp2"],
"audio/x-mpeg-3": ["mp3"],
"audio/x-mpegurl": ["m3u"],
"audio/x-mpegurl": ["m3u","m3u8"],
"audio/x-mpequrl": ["m3u"],
"audio/x-ms-wax": ["wax"],
"audio/x-ms-wma": ["wma"],
Expand Down Expand Up @@ -1026,8 +1032,9 @@
"video/jpeg": ["jpgv"],
"video/jpm": ["jpgm","jpm"],
"video/mj2": ["mj2","mjp2"],
"video/mp4": ["mp4","f4v","m4v","mp4v","mpg4"],
"video/mp4": ["mp4","f4v","m4v","mp4v","mpg4","fmp4"],
"video/mpeg": ["mpeg","m1v","m2v","mp2","mp3","mpa","mpe","mpg"],
"video/MP2T": ["ts"],
"video/msvideo": ["avi"],
"video/ogg": ["ogv"],
"video/quicktime": ["mov","3gp","moov","qt"],
Expand Down
4 changes: 2 additions & 2 deletions src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"app_id": "com.moodle.moodlemobile",
"appname": "Moodle Mobile",
"desktopappname": "Moodle Desktop",
"versioncode": 3810,
"versionname": "3.8.1-dev",
"versioncode": 3820,
"versionname": "3.8.2",
"cache_update_frequency_usually": 420000,
"cache_update_frequency_often": 1200000,
"cache_update_frequency_sometimes": 3600000,
Expand Down
9 changes: 7 additions & 2 deletions src/core/compile/providers/compile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ import { CORE_SITEHOME_PROVIDERS } from '@core/sitehome/sitehome.module';
import { CORE_USER_PROVIDERS } from '@core/user/user.module';
import { CORE_PUSHNOTIFICATIONS_PROVIDERS } from '@core/pushnotifications/pushnotifications.module';
import { IONIC_NATIVE_PROVIDERS } from '@core/emulator/emulator.module';
import { CORE_EDITOR_PROVIDERS } from '@core/editor/editor.module';
import { CORE_SEARCH_PROVIDERS } from '@core/search/search.module';

// Import only this provider to prevent circular dependencies.
import { CoreSitePluginsProvider } from '@core/siteplugins/providers/siteplugins';
Expand Down Expand Up @@ -75,6 +77,8 @@ import { CoreSiteHomeComponentsModule } from '@core/sitehome/components/componen
import { CoreUserComponentsModule } from '@core/user/components/components.module';
import { CoreQuestionComponentsModule } from '@core/question/components/components.module';
import { CoreBlockComponentsModule } from '@core/block/components/components.module';
import { CoreEditorComponentsModule } from '@core/editor/components/components.module';
import { CoreSearchComponentsModule } from '@core/search/components/components.module';

// Import some components listed in entryComponents so they can be injected dynamically.
import { CoreCourseUnsupportedModuleComponent } from '@core/course/components/unsupported-module/unsupported-module';
Expand Down Expand Up @@ -144,7 +148,7 @@ export class CoreCompileProvider {
IonicModule, TranslateModule.forChild(), CoreComponentsModule, CoreDirectivesModule, CorePipesModule,
CoreCourseComponentsModule, CoreCoursesComponentsModule, CoreSiteHomeComponentsModule, CoreUserComponentsModule,
CoreCourseDirectivesModule, CoreSitePluginsDirectivesModule, CoreQuestionComponentsModule, AddonModAssignComponentsModule,
AddonModWorkshopComponentsModule, CoreBlockComponentsModule
AddonModWorkshopComponentsModule, CoreBlockComponentsModule, CoreEditorComponentsModule, CoreSearchComponentsModule
];

constructor(protected injector: Injector, logger: CoreLoggerProvider, compilerFactory: JitCompilerFactory) {
Expand Down Expand Up @@ -237,7 +241,8 @@ export class CoreCompileProvider {
.concat(ADDON_MOD_SURVEY_PROVIDERS).concat(ADDON_MOD_URL_PROVIDERS).concat(ADDON_MOD_WIKI_PROVIDERS)
.concat(ADDON_MOD_WORKSHOP_PROVIDERS).concat(ADDON_NOTES_PROVIDERS).concat(ADDON_NOTIFICATIONS_PROVIDERS)
.concat(CORE_PUSHNOTIFICATIONS_PROVIDERS).concat(ADDON_REMOTETHEMES_PROVIDERS).concat(CORE_BLOCK_PROVIDERS)
.concat(CORE_FILTER_PROVIDERS).concat(CORE_H5P_PROVIDERS);
.concat(CORE_FILTER_PROVIDERS).concat(CORE_H5P_PROVIDERS).concat(CORE_EDITOR_PROVIDERS)
.concat(CORE_SEARCH_PROVIDERS);

// We cannot inject anything to this constructor. Use the Injector to inject all the providers into the instance.
for (const i in providers) {
Expand Down
2 changes: 1 addition & 1 deletion src/core/editor/editor.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { CoreEditorComponentsModule } from './components/components.module';
import { CoreEditorOfflineProvider } from './providers/editor-offline';

// List of providers (without handlers).
export const CORE_GRADES_PROVIDERS: any[] = [
export const CORE_EDITOR_PROVIDERS: any[] = [
CoreEditorOfflineProvider,
];

Expand Down
2 changes: 1 addition & 1 deletion src/core/emulator/providers/capture-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export class CoreEmulatorCaptureHelperProvider {
params.maxTime = options.duration * 1000;
}

modal = this.modalCtrl.create('CoreEmulatorCaptureMediaPage', params);
modal = this.modalCtrl.create('CoreEmulatorCaptureMediaPage', params, { cssClass: 'core-modal-fullscreen' });
modal.present();
modal.onDidDismiss((data: any, role: string) => {
if (role == 'success') {
Expand Down
8 changes: 7 additions & 1 deletion src/core/fileuploader/providers/fileuploader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,12 +298,18 @@ export class CoreFileUploaderProvider {
* @return Undefined if file is valid, error message if file is invalid.
*/
isInvalidMimetype(mimetypes?: string[], path?: string, mimetype?: string): string {
let extension;
let extension: string;

if (mimetypes) {
// Verify that the mimetype of the file is supported.
if (mimetype) {
extension = this.mimeUtils.getExtension(mimetype);

if (mimetypes.indexOf(mimetype) == -1) {
// Get the "main" mimetype of the extension.
// It's possible that the list of accepted mimetypes only includes the "main" mimetypes.
mimetype = this.mimeUtils.getMimeType(extension);
}
} else {
extension = this.mimeUtils.getFileExtension(path);
mimetype = this.mimeUtils.getMimeType(extension);
Expand Down
13 changes: 11 additions & 2 deletions src/core/login/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,17 @@
"emailnotmatch": "Emails do not match",
"erroraccesscontrolalloworigin": "The cross-origin call you're trying to perform has been rejected. Please check https://docs.moodle.org/dev/Moodle_Mobile_development_using_Chrome_or_Chromium",
"errordeletesite": "An error occurred while deleting this site. Please try again.",
"errorexampleurl": "The URL https://campus.example.edu is only an example URL, it's not a real site. <strong>Please use the URL of your school or organization's site.</strong>",
"errorupdatesite": "An error occurred while updating the site's token.",
"faqcannotconnectanswer": "Please, contact your site administrator.",
"faqcannotconnectquestion": "I typed my site address correctly but I still can't connect.",
"faqsetupsiteanswer": "Visit {{$link}} to check out the different options you have to create your own Moodle site.",
"faqsetupsitelinktitle": "Get started.",
"faqsetupsitequestion": "I want to set up my own Moodle site.",
"faqtestappanswer": "To test the app in a Moodle Demo Site, type \"teacher\" or \"student\" in the \"Your site address\" field and click the \"Connect!\" button.",
"faqtestappquestion": "I just want to test the app, what can I do?",
"faqwhatisurlanswer": "<p>Every organisation or school has their own custom address for their Moodle site.</p><p>To find the address of the Moodle site you want to connect to, do the following:</p><ol><li>Open a web browser and go to your school's or organisation's Moodle site login page</li><li>At the top of the page, on the address bar, you will see the URL of your Moodle site. E.g. \"campus.example.edu\".{{$image}}</li><li>Copy the address (do not copy the /login and what comes after), paste it into the Moodle App and click \"Connect!\"</li><li>Now you can log into your site, using your username and password</li>",
"faqwhatisurlquestion": "What is the URL of my Moodle site? How can I find my school’s site?",
"findyoursite": "Find your site",
"firsttime": "Is this your first time here?",
"forcepasswordchangenotice": "You must change your password to proceed.",
Expand Down Expand Up @@ -53,7 +63,6 @@
"mobileservicesnotenabled": "Mobile access is not enabled on your site. Please contact your site administrator if you think it should be enabled.",
"mustconfirm": "You need to confirm your account",
"newaccount": "New account",
"newsitedescription": "Please enter the URL of your Moodle site. Note that it might not be configured to work with this app.",
"notloggedin": "You need to be logged in.",
"password": "Password",
"passwordforgotten": "Forgotten password",
Expand All @@ -79,7 +88,7 @@
"selectacountry": "Select a country",
"selectsite": "Please select your site:",
"signupplugindisabled": "{{$a}} is not enabled.",
"siteaddress": "Site address",
"siteaddress": "Your site address",
"sitehasredirect": "Your site contains at least one HTTP redirect. The app cannot follow redirects, this could be the issue that's preventing the app from connecting to your site.",
"siteinmaintenance": "Your site is in maintenance mode",
"sitepolicynotagreederror": "Site policy not agreed.",
Expand Down
11 changes: 1 addition & 10 deletions src/core/login/pages/init/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,7 @@ export class CoreLoginInitPage {
});
}

return this.sitesProvider.getCurrentSite().getPublicConfig().catch(() => {
return {};
}).then((config) => {
return this.sitesProvider.checkRequiredMinimumVersion(config).then(() => {
// User is logged in, go to site initial page.
return this.loginHelper.goToSiteInitialPage();
}).catch(() => {
return this.loadPage();
});
});
return this.loginHelper.goToSiteInitialPage();
}

return this.navCtrl.setRoot('CoreLoginSitesPage');
Expand Down
28 changes: 27 additions & 1 deletion src/core/login/pages/site-help/site-help.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,31 @@
</ion-navbar>
</ion-header>
<ion-content padding>
<core-format-text [text]="'core.login.helpmelogin' | translate" [filter]="false"></core-format-text>
<ion-list>
<ion-item text-wrap>
<h2><b>{{ 'core.login.faqwhatisurlquestion' | translate }}</b></h2>
</ion-item>
<ion-item text-wrap>
<div [innerHTML]="'core.login.faqwhatisurlanswer' | translate: {$image: urlImageHtml}">
</div>
</ion-item>
<ion-item text-wrap>
<h2><b>{{ 'core.login.faqcannotconnectquestion' | translate }}</b></h2>
</ion-item>
<ion-item text-wrap>
<p>{{ 'core.login.faqcannotconnectanswer' | translate }} {{ 'core.whoissiteadmin' | translate }}</p>
</ion-item>
<ion-item text-wrap>
<h2><b>{{ 'core.login.faqsetupsitequestion' | translate }}</b></h2>
</ion-item>
<ion-item text-wrap>
<p><core-format-text [text]="'core.login.faqsetupsiteanswer' | translate:{$link: setupLinkHtml}" [filter]="false"></core-format-text></p>
</ion-item>
<ion-item text-wrap>
<h2><b>{{ 'core.login.faqtestappquestion' | translate }}</b></h2>
</ion-item>
<ion-item text-wrap>
<p>{{ 'core.login.faqtestappanswer' | translate }}</p>
</ion-item>
</ion-list>
</ion-content>
5 changes: 5 additions & 0 deletions src/core/login/pages/site-help/site-help.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
page-core-login-site-help {
.content {
background-color: $white;
}
}
Loading