Function: callService()
function callService<T>(
context,
siteUrl,
methodname,
args
): Promise<T>;
Defined in: core/ajax.ts:70
Calls one of Moodle's AJAX services as the logged-in person: a request to lib/ajax/service.php
with the profile's session and its sesskey, as Moodle's pages make them, without a tab (ADR-004,
ADR-011). Throws NotLoggedInError when there's no session, MoodleServiceError when the service fails.
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
context | BrowserContext |
siteUrl | string |
methodname | string |
args | Record<string, unknown> |
Returns
Promise<T>