Skip to content

Commit 342b84f

Browse files
authored
Merge pull request #12 from dpalou/MOBILE-4323
MOBILE-4323: Specify get_enrol_info is required for some plugin types
2 parents 126116c + 430be39 commit 342b84f

File tree

1 file changed

+2
-2
lines changed
  • general/app/development/plugins-development-guide

1 file changed

+2
-2
lines changed

general/app/development/plugins-development-guide/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -601,8 +601,8 @@ In the previous section, we learned about some of the existing options for handl
601601

602602
- `enrolmentAction` (optional): The type of action done by the enrolment plugin. Defaults to 'browser'. Possible values:
603603
- `browser` — When the user clicks to enrol, open a browser to perform the enrol in the browser. It doesn't require any JavaScript to work in the app.
604-
- `self` — The user can self enrol in the app. Requires implementing the 'enrol' function in your JavaScript code.
605-
- `guest` — Allows the user to enter the course as guest in the app. Requires implementing the 'canAccess' and 'validateAccess' functions in your JavaScript code.
604+
- `self` — The user can self enrol in the app. Requires implementing the 'enrol' function in your JavaScript code. Also, your PHP class extending `enrol_plugin` should return some data instead of null in the `get_enrol_info` function, otherwise it won't work in the app.
605+
- `guest` — Allows the user to enter the course as guest in the app. Requires implementing the 'canAccess' and 'validateAccess' functions in your JavaScript code. Also, your PHP class extending `enrol_plugin` should return some data instead of null in the `get_enrol_info` function, otherwise it won't work in the app.
606606
- `infoIcons` (optional) — Icons related to the enrolment to display next to the course. If the icons need to be calculated dynamically based on the course you need to implement the function 'getInfoIcons' in your JavaScript code. Properties for each icon:
607607
- `icon` (required) — The icon name. E.g. 'fas-credit-card'.
608608
- `label` (required) — The label of the icon (for accessibility).

0 commit comments

Comments
 (0)