Skip to content

Commit 51daf35

Browse files
authored
Merge pull request #4702 from alfonso-salces/MOBILE-4961
MOBILE-4961 site: Remove onboarding screen
2 parents 6469453 + e119a22 commit 51daf35

File tree

13 files changed

+3
-298
lines changed

13 files changed

+3
-298
lines changed

local_moodleappbehat/tests/behat/behat_app.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ class behat_app extends behat_app_helper {
3838
/** @var array Config overrides */
3939
protected $appconfig = [
4040
'disableUserTours' => true,
41-
'enableonboarding' => false,
4241
'toastDurations' => [ // Extend toast durations in Behat so they don't disappear too soon.
4342
'short' => 7500,
4443
'long' => 10000,
@@ -129,10 +128,7 @@ protected function is_in_login_page(): bool {
129128
* @throws DriverException Issue with configuration or feature file
130129
* @throws dml_exception Problem with Moodle setup
131130
* @throws ExpectationException Problem with resizing window
132-
* @deprecated since 5.1 "I launch the app :runtime" is deprecated, use "I launch the app" instead and
133-
* "Given the app has the following config:
134-
* | enableonboarding | true |"
135-
* to enable onboarding in tests that need it.
131+
* @deprecated since 5.1 "I launch the app :runtime" is deprecated, use "I launch the app" instead
136132
*/
137133
public function i_launch_the_app(string $runtime = '') {
138134
// Go to page and prepare browser for app.

moodle.config.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@
9595
"privacypolicy": "https://moodle.net/moodle-app-privacy/",
9696
"notificoncolor": "#f98012",
9797
"enableanalytics": false,
98-
"enableonboarding": true,
9998
"forceColorScheme": "",
10099
"forceLoginLogo": false,
101100
"showTopLogo": "hidden",

scripts/langindex.json

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2187,16 +2187,6 @@
21872187
"core.login.mustconfirm": "moodle",
21882188
"core.login.newaccount": "moodle",
21892189
"core.login.notloggedin": "local_moodlemobileapp",
2190-
"core.login.onboardingcreatemanagecourses": "local_moodlemobileapp",
2191-
"core.login.onboardingenrolmanagestudents": "local_moodlemobileapp",
2192-
"core.login.onboardinggetstarted": "local_moodlemobileapp",
2193-
"core.login.onboardingialreadyhaveasite": "local_moodlemobileapp",
2194-
"core.login.onboardingimalearner": "local_moodlemobileapp",
2195-
"core.login.onboardingimaneducator": "local_moodlemobileapp",
2196-
"core.login.onboardingineedasite": "local_moodlemobileapp",
2197-
"core.login.onboardingprovidefeedback": "local_moodlemobileapp",
2198-
"core.login.onboardingtoconnect": "local_moodlemobileapp",
2199-
"core.login.onboardingwelcome": "local_moodlemobileapp",
22002190
"core.login.or": "local_moodlemobileapp",
22012191
"core.login.password": "moodle",
22022192
"core.login.passwordforgotten": "moodle",

src/core/features/login/components/site-onboarding/site-onboarding.html

Lines changed: 0 additions & 67 deletions
This file was deleted.

src/core/features/login/components/site-onboarding/site-onboarding.scss

Lines changed: 0 additions & 34 deletions
This file was deleted.

src/core/features/login/components/site-onboarding/site-onboarding.ts

Lines changed: 0 additions & 100 deletions
This file was deleted.

src/core/features/login/constants.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
// limitations under the License.
1414

1515
export const GET_STARTED_URL = 'https://moodle.com';
16-
export const ONBOARDING_DONE = 'onboarding_done';
1716
export const FAQ_QRCODE_INFO_DONE = 'qrcode_info_done';
1817
export const FAQ_URL_IMAGE_HTML = '<img src="assets/img/login/faq_url.png" role="presentation" alt="">';
1918
export const FAQ_QRCODE_IMAGE_HTML = '<img src="assets/img/login/faq_qrcode.png" role="presentation" alt="">';

src/core/features/login/lang.json

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,6 @@
7676
"mustconfirm": "You need to confirm your account",
7777
"newaccount": "New account",
7878
"notloggedin": "You need to be logged in.",
79-
"onboardingcreatemanagecourses": "Create & manage your courses",
80-
"onboardingenrolmanagestudents": "Enrol & manage your students",
81-
"onboardinggetstarted": "Get started with Moodle",
82-
"onboardingialreadyhaveasite": "I already have a Moodle site",
83-
"onboardingimalearner": "I'm a learner",
84-
"onboardingimaneducator": "I'm an educator",
85-
"onboardingineedasite": "I need a Moodle site",
86-
"onboardingprovidefeedback": "Provide timely feedback",
87-
"onboardingtoconnect": "To connect to the Moodle App you'll need a Moodle site",
88-
"onboardingwelcome": "Welcome to the Moodle App!",
8979
"or": "Or",
9080
"password": "Password",
9181
"passwordforgotten": "Forgotten password",

src/core/features/login/pages/site/site.ts

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import { Component, OnInit, ElementRef, inject, viewChild } from '@angular/core'
1616
import { FormBuilder, FormGroup, ValidatorFn, AbstractControl, ValidationErrors } from '@angular/forms';
1717

1818
import { CoreNetwork } from '@services/network';
19-
import { CoreConfig } from '@services/config';
2019
import { CoreSites, CoreSiteCheckResponse, CoreLoginSiteInfo, CoreSitesDemoSiteData } from '@services/sites';
2120
import { CoreUtils } from '@static/utils';
2221
import {
@@ -39,10 +38,8 @@ import { CoreErrorAccordion } from '@services/error-accordion';
3938
import { CoreUserSupportConfig } from '@features/user/classes/support/support-config';
4039
import { CoreUserGuestSupportConfig } from '@features/user/classes/support/guest-support-config';
4140
import { CoreLoginError } from '@classes/errors/loginerror';
42-
import { CorePlatform } from '@services/platform';
4341
import { CoreReferrer } from '@services/referrer';
4442
import { CoreSitesFactory } from '@services/sites-factory';
45-
import { ONBOARDING_DONE } from '@features/login/constants';
4643
import { CoreUnauthenticatedSite } from '@classes/sites/unauthenticated-site';
4744
import { CoreKeyboard } from '@static/keyboard';
4845
import { CoreModals } from '@services/overlays/modals';
@@ -111,17 +108,8 @@ export default class CoreLoginSitePage implements OnInit {
111108
} else {
112109
url = await this.consumeInstallReferrerUrl() ?? '';
113110

114-
const showOnboarding = CoreConstants.CONFIG.enableonboarding && !CorePlatform.isIOS();
115-
116111
if (url) {
117112
this.connect(url);
118-
119-
if (showOnboarding) {
120-
// Don't display onboarding in this case, and don't display it again later.
121-
CoreConfig.set(ONBOARDING_DONE, 1);
122-
}
123-
} else if (showOnboarding) {
124-
this.initOnboarding();
125113
}
126114
}
127115

@@ -196,20 +184,6 @@ export default class CoreLoginSitePage implements OnInit {
196184
return url;
197185
}
198186

199-
/**
200-
* Initialize and show onboarding if needed.
201-
*
202-
* @returns Promise resolved when done.
203-
*/
204-
protected async initOnboarding(): Promise<void> {
205-
const onboardingDone = await CoreConfig.get(ONBOARDING_DONE, false);
206-
207-
if (!onboardingDone) {
208-
// Check onboarding.
209-
this.showOnboarding();
210-
}
211-
}
212-
213187
/**
214188
* Extend info of Login Site Info to get UI tweaks.
215189
*
@@ -279,19 +253,6 @@ export default class CoreLoginSitePage implements OnInit {
279253
});
280254
}
281255

282-
/**
283-
* Show an onboarding modal.
284-
*/
285-
async showOnboarding(): Promise<void> {
286-
const { CoreLoginSiteOnboardingComponent } =
287-
await import('@features/login/components/site-onboarding/site-onboarding');
288-
289-
await CoreModals.openModal({
290-
component: CoreLoginSiteOnboardingComponent,
291-
cssClass: 'core-modal-fullscreen',
292-
});
293-
}
294-
295256
/**
296257
* Try to connect to a site.
297258
*

src/core/features/login/tests/behat/basic_usage.feature

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -17,31 +17,6 @@ Feature: Test basic usage of login in app
1717
| student2 | C1 | student |
1818
| teacher1 | C1 | editingteacher |
1919

20-
Scenario: Skip on boarding
21-
Given the app has the following config:
22-
| enableonboarding | true |
23-
When I launch the app
24-
Then I should find "Welcome to the Moodle App!" in the app
25-
26-
When I press "Skip" in the app
27-
Then I should not find "Skip" in the app
28-
And I should find "Connect to Moodle" in the app
29-
30-
Scenario: Complete on boarding
31-
Given the app has the following config:
32-
| enableonboarding | true |
33-
When I launch the app
34-
Then I should find "Welcome to the Moodle App!" in the app
35-
36-
When I press "I'm an educator" in the app
37-
And I press "I need a Moodle site" in the app
38-
And I press "Get started with Moodle" in the app
39-
And I switch to the browser tab opened by the app
40-
And I close the browser tab opened by the app
41-
Then I should find "Connect to Moodle" in the app
42-
When I restart the app
43-
Then I should find "Connect to Moodle" in the app
44-
4520
Scenario: Add a new account in the app & Site name in displayed when adding a new account
4621
When I launch the app
4722
And I set the field "Your site" to "$WWWROOT" in the app

0 commit comments

Comments
 (0)