Skip to main content

Function: courseLogs()

Call Signature​

function courseLogs(
context,
siteUrl,
courseId,
options
): Promise<ListPage<LogEntry>>;

Defined in: areas/reports/reports.ts:154

A course's logs, newest first, as its logs report lists them: by a user, an activity, a kind of action, and a time span, up to limit entries (100 unless given). Moodle filters by user, activity and action; the span is read page by page, stopping at the first entry older than from. Every entry's time comes as an ISO date, read back with the site language's own format. Without limit, the first 100 entries (from offset) as a list; with it, a page of them (see "Long lists" in the docs' concepts), from the report's page that holds offset on (without until; with it, from the first page, since only the driver filters by it).

Parameters​

ParameterType
contextBrowserContext
siteUrlstring
courseIdnumber
optionsWithLimit<CourseLogOptions>

Returns​

Promise<ListPage<LogEntry>>

Call Signature​

function courseLogs(
context,
siteUrl,
courseId,
options?
): Promise<LogEntry[]>;

Defined in: areas/reports/reports.ts:155

A course's logs, newest first, as its logs report lists them: by a user, an activity, a kind of action, and a time span, up to limit entries (100 unless given). Moodle filters by user, activity and action; the span is read page by page, stopping at the first entry older than from. Every entry's time comes as an ISO date, read back with the site language's own format. Without limit, the first 100 entries (from offset) as a list; with it, a page of them (see "Long lists" in the docs' concepts), from the report's page that holds offset on (without until; with it, from the first page, since only the driver filters by it).

Parameters​

ParameterType
contextBrowserContext
siteUrlstring
courseIdnumber
options?WithoutLimit<CourseLogOptions>

Returns​

Promise<LogEntry[]>

Call Signature​

function courseLogs(
context,
siteUrl,
courseId,
options?
): Promise<
| ListPage<LogEntry>
| LogEntry[]>;

Defined in: areas/reports/reports.ts:156

A course's logs, newest first, as its logs report lists them: by a user, an activity, a kind of action, and a time span, up to limit entries (100 unless given). Moodle filters by user, activity and action; the span is read page by page, stopping at the first entry older than from. Every entry's time comes as an ISO date, read back with the site language's own format. Without limit, the first 100 entries (from offset) as a list; with it, a page of them (see "Long lists" in the docs' concepts), from the report's page that holds offset on (without until; with it, from the first page, since only the driver filters by it).

Parameters​

ParameterType
contextBrowserContext
siteUrlstring
courseIdnumber
options?CourseLogOptions

Returns​

Promise< | ListPage<LogEntry> | LogEntry[]>