You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: general/app/customisation/remote-themes.md
+26-30Lines changed: 26 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ Once you have everything ready, you can configure your theme by going to "Site a
23
23
You can get started with the following example, and you should see the background of the top bar change to red once you log into the app:
24
24
25
25
```css
26
-
html {
26
+
:root {
27
27
--core-header-toolbar-background: red;
28
28
}
29
29
```
@@ -76,23 +76,23 @@ Each of these also define other variants: `rgb`, `contrast`, `contrast-rgb`, `sh
76
76
For example, if you want to override the primary color, you'll need to override the following variables:
77
77
78
78
```css
79
-
html {
80
-
--ion-color-primary: #006600;
79
+
:root {
80
+
--primary: #006600;
81
81
82
82
/* RGB list of the color */
83
83
--ion-color-primary-rgb: 0,102,0;
84
84
85
85
/* Black or white, depending on which color gives more contrast */
86
-
--ion-color-primary-contrast: #ffffff;
86
+
--primary-contrast: #ffffff;
87
87
88
88
/* RGB version of the contrast color */
89
89
--ion-color-primary-contrast-rgb: 255,255,255;
90
90
91
91
/* Slightly darker color. (mix 12% of black) */
92
-
--ion-color-primary-shade: #005a00;
92
+
--primary-shade: #005a00;
93
93
94
94
/* Slightly lighter color. (mix 10% of white) */
95
-
--ion-color-primary-tint: #1a751a;
95
+
--primary-tint: #1a751a;
96
96
}
97
97
```
98
98
@@ -101,7 +101,7 @@ html {
101
101
Other than the basic and semantic colors, other components and pages define their own variables that you can override. You can look at the source code to find more, but these are some of the most relevant:
102
102
103
103
```css
104
-
html {
104
+
:root {
105
105
/* Page background */
106
106
--background-color: white;
107
107
--ion-background-color-rgb: 255, 255, 255;
@@ -120,27 +120,27 @@ html {
120
120
121
121
### Targeting different environments
122
122
123
-
The `html` element contains classes that indicate the environment the app is running on.
123
+
The `:root` element contains classes that indicate the environment the app is running on.
124
124
125
125
#### Platform
126
126
127
-
You can specify styles that will only apply to iOS by prepending them with `html.ios`, or `html.md` for Android:
127
+
You can specify styles that will only apply to iOS by prepending them with `:root.ios`, or `:root.md` for Android:
128
128
129
129
```css
130
130
/* Red toolbar in iOS */
131
-
html.ios {
131
+
:root.ios {
132
132
--core-header-toolbar-background: red;
133
133
}
134
134
135
135
/* Green toolbar in Android */
136
-
html.md {
136
+
:root.md {
137
137
--core-header-toolbar-background: green;
138
138
}
139
139
```
140
140
141
141
#### Moodle App and Moodle site versions
142
142
143
-
You can restrict CSS rules to a specific version using one of these classes. For example, when accessing a 3.11.2 site using the 3.9.5 app the following classes will be present in the `html` element:
143
+
You can restrict CSS rules to a specific version using one of these classes. For example, when accessing a 3.11.2 site using the 3.9.5 app the following classes will be present in the `:root` element:
144
144
145
145
-`version-3`
146
146
-`version-3-11`
@@ -153,12 +153,12 @@ And here's how to use them:
153
153
154
154
```css
155
155
/* Red toolbar for Moodle App version 4.1.X */
156
-
html.moodleapp-4-1 {
156
+
:root.moodleapp-4-1 {
157
157
--core-header-toolbar-background: red;
158
158
}
159
159
160
160
/* Green toolbar for all other versions */
161
-
html {
161
+
:root {
162
162
--core-header-toolbar-background: green;
163
163
}
164
164
```
@@ -170,16 +170,16 @@ Starting on Moodle App 4.4 you can restrict CSS rules to a specific site theme.
170
170
171
171
#### Application theme
172
172
173
-
The application uses a light theme by default, but it adds the `dark` class to the `html` element when it is using a dark theme:
173
+
The application uses a light theme by default, but it adds the `dark` class to the `:root` element when it is using a dark theme:
174
174
175
175
```css
176
176
/* Red toolbar for the Light Theme */
177
-
html {
177
+
:root {
178
178
--core-header-toolbar-background: red;
179
179
}
180
180
181
181
/* Green toolbar for the Dark Theme */
182
-
html.dark {
182
+
:root.dark {
183
183
--core-header-toolbar-background: green;
184
184
}
185
185
```
@@ -193,7 +193,7 @@ Of course, you can combine any of these classes to create more granular styles.
193
193
Let's say you want to have a red toolbar only in iOS, with the Dark Theme, for a Moodle site running 3.11.X:
194
194
195
195
```css
196
-
html.ios.version-3-11.dark {
196
+
:root.ios.version-3-11.dark {
197
197
--core-header-toolbar-background: red;
198
198
}
199
199
```
@@ -305,7 +305,7 @@ core-tabs, core-tabs-outlet {
305
305
### Items
306
306
307
307
```css
308
-
html {
308
+
:root {
309
309
/* Background */
310
310
--ion-item-background: green;
311
311
@@ -354,7 +354,7 @@ page-core-mainmenu-more {
354
354
You can personalise some colors in the Login page, but keep in mind that this only includes the credentials page (the one after you select the site).
Copy file name to clipboardExpand all lines: general/app/development/plugins-development-guide/api-reference.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -79,7 +79,7 @@ These are the configuration options common to most handlers, you can find specif
79
79
|`styles.version`| Required | Version number used to determine if the file needs to be downloaded again. You should change the version number every time you change the contents of the CSS file. |
80
80
|`moodlecomponent`| Plugin name | Name of the component implemented by the handler. <br /> <br /> Most of the time, this can be ignored because mobile support is usually included in the same plugin where custom components are defined, but it may be different in some cases. For example, imagine a local plugin called `local_myactivitymobile` is implementing mobile support for a `mod_myactivity` component. In that case, you would set this option to `"mod_myactivity"`. |
81
81
|`restricttocurrentuser`|`false`| Restricts the handler to appear only for the current user. For more advanced restrictions, you can use the `restrict` and `disabled` properties returned during [JavaScript initialisation](./index.md#javascript-initialisation). |
82
-
|`restricttoenrolledcourses`|`false`| Restricts the handler to appear only for courses the user is enrolled in. For more advanced restrictions, you can use the `restrict` and `disabled` properties returned during [JavaScript initialisation](./index.md#javascript-initialisation). |
82
+
|`restricttoenrolledcourses`|`true`| Restricts the handler to appear only for courses the user is enrolled in. For more advanced restrictions, you can use the `restrict` and `disabled` properties returned during [JavaScript initialisation](./index.md#javascript-initialisation). |
Copy file name to clipboardExpand all lines: general/app/overview.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,14 @@ The app can also be compiled to work with a single site, or a list of approved s
24
24
25
25
Keep in mind that the application only works with moodle sites that allow it, and this is disabled by default in some sites. If you want to allow users to log into your site using the app, make sure to check that it's [enabled in the settings](https://docs.moodle.org/en/Moodle_app_guide_for_admins#Enable_mobile_services_on_your_site). If you are not the site owner, reach out to the administrators.
26
26
27
+
### Technologies used
28
+
29
+
The Moodle app is a hybrid app built using [Angular](https://angular.io/) and [Ionic Framework](https://ionicframework.com/). The main coding language used in the app is [Typescript](https://www.typescriptlang.org/).
30
+
31
+
The [Cordova framework](https://cordova.apache.org/) is used to use native features and to compile the Android and iOS apps.
32
+
33
+
The official app from MoodleHQ uses a server with [Airnotifier](https://github.com/dcai/airnotifier) to deliver push notifications to the app. The Moodle site sends the notifications to the Airnotifier server, and this server uses [Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging) to deliver the notifications to the devices using Google Cloud Messaging and Apple Push Notification service.
34
+
27
35
### Architecture
28
36
29
37
The code of the application follows an [hexagonal architecture](https://en.wikipedia.org/wiki/Hexagonal_architecture_(software)), with core modules that include the main functionality and addon modules that provide additional features.
Copy file name to clipboardExpand all lines: general/app/upgrading/plugins-upgrade-guide.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,15 +16,15 @@ As you can see in that repository, the JS and the templates are duplicated in or
16
16
17
17
Depending on which version of the app you're upgrading from, you'll need to go through multiple version upgrades. This guide is divided by version ranges, so you should be able to start with your current version and build up from there.
18
18
19
-
Other than the changes outlined in this document, there may be smaller API changes that aren't highlighted here. Make sure to check the [upgrade.txt](https://github.com/moodlehq/moodleapp/blob/latest/upgrade.txt) file for an exhaustive list with all the changes.
19
+
Other than the changes outlined in this document, there may be smaller API changes that aren't highlighted here. Make sure to check the [UPGRADE.md](https://github.com/moodlehq/moodleapp/blob/latest/UPGRADE.md) file for an exhaustive list with all the changes.
20
20
21
21
## 4.4 to 4.5
22
22
23
23
The Ionic version has been upgraded to v8 (from v7), make sure to check the relevant upgrade guides for [v8](https://ionicframework.com/docs/updating/8-0). In particular, the legacy syntax to declare input labels that was deprecated on Ionic7 now has been removed.
24
24
25
25
## 4.3 to 4.4
26
26
27
-
Starting with this release, the changes listed in [upgrade.txt](https://github.com/moodlehq/moodleapp/blob/latest/upgrade.txt) will only document breaking changes for APIs exposed to site plugins. Internal changes will no longer be documented. Make sure to check out the file to learn about the changes in this version.
27
+
Starting with this release, the changes listed in [UPGRADE.md](https://github.com/moodlehq/moodleapp/blob/latest/UPGRADE.md) will only document breaking changes for APIs exposed to site plugins. Internal changes will no longer be documented. Make sure to check out the file to learn about the changes in this version.
28
28
29
29
Also, the Ionic version has been upgraded to v7 (from v5), make sure to check the relevant upgrade guides for [v6](https://ionicframework.com/docs/updating/6-0) and [v7](https://ionicframework.com/docs/updating/7-0). In particular, the syntax to declare input labels has been refactored. The legacy syntax will continue working for the time being, but we recommend migrating to the [modern syntax](https://ionicframework.com/docs/api/input#migrating-from-legacy-input-syntax) as soon as possible.
30
30
@@ -36,7 +36,7 @@ Finally, the application now needs to run in a secure context (https://). This c
36
36
37
37
Font Awesome icons have been updated to version 6.4.0, so make sure that all the icons you're using in your plugin are still supported.
38
38
39
-
Other than that, there have been some changes in the APIs related to analytics. Check out [upgrade.txt](https://github.com/moodlehq/moodleapp/blob/latest/upgrade.txt) to learn about the specifics.
39
+
Other than that, there have been some changes in the APIs related to analytics. Check out [UPGRADE.md](https://github.com/moodlehq/moodleapp/blob/latest/UPGRADE.md) to learn about the specifics.
40
40
41
41
## 4.1 to 4.2
42
42
@@ -84,7 +84,7 @@ In order to avoid breaking existing styles, version 4.1 will continue adding ver
84
84
85
85
## 3.9.5 to 4.0
86
86
87
-
There haven't been any breaking changes from 3.9.5 to 4.0, but the UI of the application has changed drastically so we recommend taking special care that the UI of your plugin is still working properly. Also, remember to double check all the changes listed in [upgrade.txt](https://github.com/moodlehq/moodleapp/blob/latest/upgrade.txt).
87
+
There haven't been any breaking changes from 3.9.5 to 4.0, but the UI of the application has changed drastically so we recommend taking special care that the UI of your plugin is still working properly. Also, remember to double check all the changes listed in [UPGRADE.md](https://github.com/moodlehq/moodleapp/blob/latest/UPGRADE.md).
88
88
89
89
Other than that, everything should continue working as expected. If you find something that doesn't, please [let us know](https://moodle.atlassian.net/projects/MOBILE).
0 commit comments