Skip to main content

index

The public API: everything a program needs to work a Moodle site with the person's own session, imported from @falkenslab/moodle-driver. Start with createMoodle, whose methods are the driver's operations; each is also a function taking the browser's context and the site.

The primitives the operations are built from are in @falkenslab/moodle-driver/internals; what neither exports is internal.

Classes​

ClassDescription
ActivitySettingsErrorNobody can see that activity's settings: not an activity, or not the person's to edit.
BackupErrorMoodle refused a copy, backup, restore or import, or didn't finish it in time; or a file isn't a Moodle backup the driver can read.
BrowserDownloadingErrorNo browser yet: Chromium is downloading in the background, and the call should be retried later.
BrowserNotFoundErrorNo installed browser could be launched, and Chromium can't be downloaded (ADR-001).
CalendarErrorMoodle refused the event, or it isn't there.
ChoiceErrorThe choice isn't there, or the person can't answer it now.
CompletionErrorCompletion can't be changed or read there: not enabled, automatic, or not allowed.
CourseErrorA course that isn't there, or the person can't change.
EnrolmentErrorMoodle refused to enrol, unenrol or change a role: no manual enrolment, a role the person can't assign, a user not enrolled.
FormErrorMoodle refused the form, or a field to set isn't in it.
ForumErrorMoodle refused to change or delete a post: the editing time is over, the person is neither its author nor a moderator, or it has replies a student can't delete. The message is Moodle's reason.
GradebookErrorThe gradebook can't be read or changed: not allowed, recalculating, or a value Moodle refuses.
GradingErrorMoodle's grader didn't take the grade.
LessonErrorThe lesson isn't there, or the page can't take that answer.
LoginTimeoutErrorNobody logged in within the time logIn waits; the login window is closed.
LoginWindowClosedErrorThe person closed the login window logIn opened before logging in.
MessageErrorMoodle didn't deliver a message.
MoodleErrorEvery error the driver throws on purpose: one class to catch, a stable code to tell them apart.
MoodleServiceErrorA Moodle AJAX service answered with an exception.
MoodleUrlErrorA site URL that isn't one.
NoDisplayErrorA window was asked for where there's no screen to show it (a container, a server).
NoGradeReportErrorThe person can't see the grade report of that course.
NoParticipantsErrorThe person can't see the course's participants.
NotAForumErrorThe id isn't a forum's course module, or the person can't see it.
NotAnAssignmentErrorThe id isn't an assignment's course module, or the person can't grade it.
NotAnH5PActivityErrorThe activity isn't an H5P activity the person can open.
NotLoggedInErrorNo live Moodle session: the person has to log in again (ADR-002).
NotViewableErrorThe activity isn't of the given type, or the person can't view it.
QuestionBankErrorThe bank isn't there, or Moodle refused the questions.
QuizErrorThe quiz or attempt isn't there, or the person can't do what was asked.
ReportErrorA report the person can't see: the course or activity isn't there, or they aren't allowed (report/log:view…).
ScormErrorThe activity isn't a SCORM the person can open, or Moodle didn't open its player.
SubmissionErrorThe assignment isn't there, or the person can't do that now.
SurveyErrorThe activity isn't a survey the person can open or answer now, or Moodle didn't take the answers.
WorkshopErrorThe activity isn't a workshop the person can view, or Moodle refused what was asked of it.

Interfaces​

InterfaceDescription
ActivityContentWhat activityContent read of an activity: only the fields of its type are present.
ActivityFieldsThe common inputs of an activity's form; anything else goes in settings by its form field name.
ActivityParticipantSomeone with a role in the course, and whether they took part in the activity.
ActivityViewsAn activity's line in the activity report: its views, by how many people, and the last one.
BackgroundBrowserA browser kept open by another process, as its profile's .browser.json says.
BackupContentsWhat a backup file holds, as backupContents reads it.
BackupContentsActivityAn activity or resource a backup holds (the original site's ids).
BackupContentsSectionA section a backup holds (the original site's ids).
BackupDependencySomething an activity of a backup refers to that the backup doesn't hold, so a restore elsewhere leaves it broken or changed: - restriction: an access condition on another activity's completion (activityId), on a grade item (gradeItemId, another activity's grade or the course's), on a group or a grouping (never in a backup of part of a course): Moodle restores it marked as broken. - link: a link in its text to another activity (activityId, its module): restored elsewhere, it points to whatever has that id on the site, or nothing. - grade-category: the gradebook category its grade sat in (categoryId), when the backup has no gradebook (any part of a course): restored, its grade goes into the course's top category. The original may have been the top category too: the backup doesn't say.
BackupIdentifierSomething in a backup that names a person, or the site or course it came from.
BankCategoryA category of a bank's questions; the questions' categoryId refers to it.
BankQuestionA question in a bank, as questions lists it.
BankQuestionsA bank's questions as questions reads them: its categories, and its questions (a list, or a page of them).
BrowserManagerThe browser's single persistent context, opened on first use (ADR-002).
BrowserOptionsThe browser's options. The driver reads them each time it launches, so a program may change them between launches (a configure in an MCP server) on the same object.
CalendarEventAn event of the person's calendar, as upcomingEvents lists it.
ChoiceA choice activity as the person sees it (getChoice).
CompletionCellA participant's completion of one activity in the progress report.
CompletionReportA course's progress report (completionReport): the activities that track completion, and each participant's.
ConnectOptionsThe background browser connectBrowserManager connects to (endpoint and token as backgroundBrowser gives them), and how to use it.
ContentOptionsHow activityContent reads: at a person's pace (realistic, the default) or at once.
ContextOptionsWhat BrowserManager.context() is asked for.
ConversationA conversation as conversation reads it: its members, and its messages (a list, or a page of them).
ConversationMessageA message of a conversation, as conversation reads it.
ConversationSummaryOne of the person's conversations, as conversations lists it, with its last message.
CourseA course the person is enrolled in, as listCourses lists it.
CourseActivityAn activity of a course, as courseStructure lists it in its section.
CourseAssignmentAn assignment of a course, as listAssignments lists it, with the section it's in.
CourseChangeWhat a change did, its new id when it created something, and the course afterwards.
CourseGroupA group of a course, as groups lists it.
CourseLogOptionsWhat courseLogs takes: whose, where, what and when, and a page of them.
CourseRefA course as a copy, restore or import leaves it.
CourseSectionA section of a course with its activities, in the course's order.
DetailA label and value as Moodle shows them (site language).
DiscussionPostsA discussion as discussion reads it: where it is, the person's subscription, and its posts (a list, or a page of them).
DownloadedFileA file downloadFile saved.
DraftFileA file in a form's draft area: its path in the area ("notes.pdf", "week1/notes.pdf") and size in bytes.
DraftUploadA local file to upload under another name or into a subfolder of the draft area (to: "week1/notes.pdf").
EnrolmentMethodOne of a course's enrolment methods, as its methods page and its form show it.
EnrolmentMethodSettingsWhat setEnrolmentMethod may change; what isn't given stays.
EventChangesWhat to change in a calendar event: only what's given changes.
ExportGradesOptionsWhat exportGrades exports and where it saves it, as the export form chooses.
FileChangesChanges to a file resource's or folder's files: add local paths (a DraftUpload puts one under another name or in a subfolder, "week1/notes.pdf"), remove files by their path in the activity, or replace the whole set. A file added with the name of one already there replaces it.
FormFieldOne field of a Moodle form, as it is now: its name (what settings takes), label, value and options.
ForumDiscussionA discussion of a forum, as forumDiscussions lists it.
ForumGradeA person's whole-forum grade.
ForumGradesA forum's whole-forum grades, as forumGrades reads them, with how the forum is graded.
ForumPostA post of a discussion, as discussion reads it.
GradebookCategoryA grade category of a course's gradebook, as its setup shows it (gradebookSetup).
GradebookGradeA person's grade in one grade item, as the single view report shows it after a change.
GradebookItemA grade item of a course's gradebook, as its setup shows it (gradebookSetup).
GradeColumnA column of the grader report: a grade item, a category's total or the course's.
GradeRowA row of the user grade report, values as Moodle shows them ("-" left out).
GraderReportEveryone's grades in a course, as graderReport reads them: a row per person, a grade per column.
GradingCriterionA criterion of a rubric or a marking guide, with the ids grading takes.
GradingDefinitionHow an assignment is graded: its method and, for advanced grading, its criteria.
GroupingA grouping of a course (a set of its groups), as groupings lists it.
GroupingSettingsA grouping's settings, as its form names them.
GroupSettingsA group's settings, as its form names them.
H5PActivityAn H5P activity as the person sees it (h5pActivity).
H5PAttemptOne of the person's attempts at an H5P activity, with its score where Moodle tracks it.
ImageItemAn image in a text (<img>): its URL, absolute, and its alternative text when it has one.
LessonFieldOne input of a question page, by its form name.
LessonPageThe lesson page the person is on, as lessonPage and answerLessonPage read it.
ListPageOne page of a long list: its items, and whether there are more after them (ask again with offset moved by limit).
LogEntryOne event in a course's logs, as the logs report lists it.
LoginResultWhat logIn found: a session already there, or one the person just made; and whose it is.
MeThe logged-in person, as whoAmI reads them.
MediaItemA video, audio or player found in a page's content.
MoodleOne Moodle site worked through one browser: the driver's operations as methods, without the browser context and the site the functions take first (moodle.listCourses() is listCourses(context, site)), plus the session and the browser. The pieces the operations are built from stay functions only.
MoodleDefaultsWhat the object does when a call doesn't say: every one can still be given per call.
MoodleMethodsThe methods a Moodle has from the driver's functions: each is the function of the same name without its first two parameters (the browser context and the site), and its doc comment.
NotificationA notification the site sent the person, as notifications lists it.
NotificationOptionsWhat notifications takes: only the unread ones, and a page of them.
OpenedScormWhere openScorm left the working tab: the player, at a SCO of an attempt.
OverviewFieldA column's value, whatever exporter Moodle used for it, as text plus what it carries besides.
PageOptionsHow much of a long list to read: at most limit items, after skipping offset.
ParticipantA participant of a course with their roles and groups, as participants lists them.
ParticipantOptionsWhat participants takes: who (a role, a group, inactive since a date), and a page of them.
PendingActivityAn activity the person still has to do, as pendingActivities finds it.
PluginContentOne submission plugin's content: its text, paragraphs kept, and its files.
PostChangesWhat to change in a post: only what's given changes.
PostInputA post to write, for startDiscussion and replyToPost.
PotentialUserA user the person may enrol in a course.
QuestionA question as the attempt or review page shows it.
QuestionBankA question bank of a course, as questionBanks lists it.
QuestionFieldOne input of a question, by its form name, with its options and current value.
QuestionInputA question for createQuestion, or the changes for updateQuestion (without its type).
QuestionToGradeA question (slot) of a quiz as the manual grading report lists it, with the attempts waiting for its grade.
QuizAttemptResultAn attempt at a quiz, as quizResults reads it from the quiz's reports.
QuizInfoWhat the quiz's page says: its info lines, dates, the person's attempts, whether they can start one.
QuizResultsA quiz's attempts, as quizResults reads them: the attempts are a list, or a page of them.
QuizResultsOptionsWhat quizResults takes: the responses too, and a page of the attempts.
QuizSectionA section of a quiz: a heading before a group of pages, whose questions may be shuffled.
QuizSlotA place for a question in a quiz, as quizStructure reads it from the quiz's edit page.
ResetDeletionsWhat resetCourse can delete, each one the reset form's fields for it, in every module the course has.
ResetStatusOne line of the report Moodle shows after resetting: the component, what it did, and its error when it failed.
RestoreWarningSomething a restore left broken in an activity, for a teacher to fix.
RestrictionsWhen an activity or section is available: conditions, all of them met (match: "all", the default) or any; while not met, shown to students greyed out with the conditions (the default) or hidden from them. No conditions: always available.
ScormActivityA SCORM activity as the person sees it (scorm): its attempts, grades and SCOs.
ScormScoA SCO (a launchable part of the package) with the person's status and score in the attempt read.
SetGradeOptionsWhat setGrade changes in a person's grade: only what's given.
StudentAssignmentAn assignment as the student's page shows it.
SubmissionA participant's submission to an assignment, as assignmentSubmissions reads it for the grader.
SubmissionOptionsWhat assignmentSubmissions takes: the content too, some participants, and a page of them.
SurveyFieldOne field of a survey question, by its form name.
SurveyQuestionA question of a survey, on its page, with the fields its answers go in (getSurvey).
UserA user, with what Moodle lets the person see of them.
WorkshopAssessmentAn assessment of a submission, by its reviewer.
WorkshopCriterionWhat to say about one criterion of the assessment form, in the form's order.
WorkshopInfoA workshop's phase and, for those who can see them, its submissions and their assessments (workshopInfo).
WorkshopSubmissionA submission in the workshop's report.

Type Aliases​

Type AliasDescription
ActivityVisibilityOne of ACTIVITY_VISIBILITIES: how an activity shows to students.
ChannelA browser the driver can launch: Microsoft Edge, Google Chrome or Playwright's Chromium.
CompletionWhen an activity counts as complete: not tracked ("none"), marked by the student ("manual"), or on conditions: viewing it, receiving a grade, a passing grade, submitting it (assignments, choices), with an expected completion date shown to students. Read back, the conditions the driver has no terms for (a forum's number of posts) are left out: activitySettings' fields have them.
CompletionStateOne of COMPLETION_STATES: the person's completion of an activity.
ContentTypeOne of CONTENT_TYPES.
CourseClassificationOne of COURSE_CLASSIFICATIONS.
DataCategoryOne of ALL_DATA_CATEGORIES: a kind of data a function reads or writes.
FieldValueA form field's value: text, a number, a checkbox, or a multiple select's values.
GradeAggregationHow a grade category computes its total from what it holds (one of GRADE_AGGREGATIONS).
GradeExportDisplayHow grades are written: the points, the percentage, the letter (several for every format but XML).
GradeExportFormatA file format exportGrades saves grades in (one of GRADE_EXPORT_FORMATS).
LogActionOne of LOG_ACTIONS: the kind of action courseLogs keeps.
MoodleErrorCodeWhat went wrong, stable across releases: match errors by code (or by class), never by message, whose wording may change. Each error class has its own code; MoodleError itself takes one of the generic ones.
MoodleOptionsA site, the browser to work it with (its options for a new browser manager, or one already made), and the object's defaults.
ParticipantSelectionWho messageParticipants writes to: chosen users, or the participants participants() chooses with these filters.
ParticipationActionOne of PARTICIPATION_ACTIONS: the kind of action participationReport counts.
QuestionTypeOne of QUESTION_TYPES.
QuizChangeWhat a change to a quiz's structure answers: what changed, and the quiz's slots and sections afterwards.
RateableItemSomething rated: a forum post (in its discussion), a glossary entry, or a database record.
RestrictionOne access condition: a date range (from, until or both), a grade in another activity (min, max as percentages of its maximum grade), another activity's completion state, or a group's members. Read back, a condition the driver has no terms for (a grouping, a user profile field, a nested set) is { type: "other", json }, Moodle's own; it's written back as given.
ScoStatusA SCO's status for the person, as Moodle tracks it from what the package reports.
SurveyTypeThe two survey modules: the questionnaire plugin (mod_questionnaire) and Moodle's feedback.
TrailOne of TRAILS: how a student action leaves its trail in Moodle's logs (ADR-005).
WithLimitA function's options with a limit: the call gives a ListPage.
WithoutLimitA function's options without a limit: the call gives the whole list, as without paging.
WorkflowStateOne of WORKFLOW_STATES: where a submission is in the marking workflow.
WorkshopPhaseA workshop's phases, in their order.

Variables​

VariableDescription
ACTIVITY_VISIBILITIES"stealth": hidden from the course page but available by link, where the site allows it.
ALL_DATA_CATEGORIESA kind of data a function reads or writes: - none: the session or the site, nothing of anyone's; also functions that only parse what the caller already fetched (a page, HTML, JSON), whose data belongs to whatever fetched it. - own: the person's own data and actions (their courses, attempts, submissions, grades). - course-content: what teachers make (structure, activities' content and settings, rubrics' definitions, questions). - others-aggregate: counts about others that identify no one ("2 of 4 submitted"). - others-personal: others' data or work (names, roles, submissions, posts, attempts, responses, grades). - others-write: deciding about others (grades, feedback, extensions, overrides, completion). - communication: writing to or before others (forum posts, messages). - any: generic primitives that reach whatever they're pointed at (services, pages, forms).
ANONYMOUSWhat an anonymous backup says instead. The site is one that can't exist (.invalid, RFC 2606) and its identifier hash no site's, so Moodle restores it anywhere as a backup from another site: links it can't point at a restored activity point there, and questions and files go to who restores them.
BACKGROUND_FILEThe file a background browser leaves in its profile: where it is and its token, readable only by the person.
CHANNELSEvery channel: the system browsers, and Playwright's Chromium (downloaded when missing).
COMPLETION_STATESMoodle's completion states (COMPLETION_INCOMPLETE … COMPLETION_COMPLETE_FAIL), by their value.
CONTENT_TYPESThe modules whose content activityContent reads.
COURSE_CLASSIFICATIONSWhich courses by their dates; "all" includes those the person hid from their dashboard.
DATA_CATEGORIESThe data categories of every function exported from the package, and of the browser manager's methods (BrowserManager.<method>) and the Moodle object's own (Moodle.<method>; its other methods are the functions of the same name). A function that may touch several kinds lists them all; a program takes the strictest. Functions that read activities of any module answer per module through moduleCategories().
GRADE_AGGREGATIONSThe aggregations a grade category can use, as the driver names Moodle's.
GRADE_EXPORT_FORMATSThe formats grades can be exported in, where the site has their export plugin enabled.
LOG_ACTIONSWhat the logs report filters by its "actions" menu: creating, viewing, updating, deleting, or any change (the three writes).
MOODLE_METHODSThe names of the methods a Moodle has from the driver's functions, one per function of that name.
PARTICIPATION_ACTIONSThe kinds of action the participation report counts: views, or posts (submitting, answering, posting).
QUESTION_TYPESThe question types createQuestion makes through their form; others are imported (GIFT, Moodle XML).
SESSION_COOKIES_FILEChromium drops session cookies (no expiry) when a persistent profile closes, and Moodle's MoodleSession is one (confirmed empirically, Edge and playwright-core 1.64, Moodle 5.2): the profile alone would forget the login on every restart. They are kept in this file inside the profile, as sensitive as the profile itself (ADR-003).
SYSTEM_CHANNELSInstalled browsers tried in this order when no channel is chosen (ADR-001).
TRAILSHow student actions view and do things: through the real pages at a person's pace, or fast (ADR-005).
WORKFLOW_STATESThe marking workflow's states, as Moodle names them ("notmarked" is the grading form's empty choice).
WORKSHOP_PHASESThe phase names, in their order.

Functions​

FunctionDescription
activitiesOverviewMoodle 5's activities overview of a course for one type ("resource" for every resource type): per activity, the columns its overview page shows the person (due dates, submissions, what needs grading, their own grade…). Without a type, every type in the course's state: "resource" first, which brings pages, books, files, folders and links at once, then each type still missing.
activityContentReads a page's or label's text, a book's chapters, a URL resource's target, or a file resource's or folder's files. With the realistic trail, page by page at a reader's pace, calling onProgress with the seconds read so far while it pauses. Takes an activity as the course structure gives it ({ id, type }), or its id and module.
activityReportA course's activity report: per activity, how many times it was viewed, by how many people, and when last, from the logs (between from and until when given). Activities nobody viewed come with zero views.
activitySettingsAn activity's settings as its form holds them, without submitting it: its module, name and description, every field by the name updateActivity takes in settings, the files of a resource, folder or SCORM, and its restrictions and completion in plain terms. Teachers only.
addGradeCategoryAdds a grade category (at the course's top level, or inside parentId); returns it as the setup shows it.
addGradeItemAdds a manual grade item (one graded in the gradebook, not by an activity): out of maxGrade (Moodle's default, 100, when left out) or on a scale (scaleId), at the course's top level or in categoryId, hidden from students when asked. Returns it as the setup shows it.
addQuestionsToQuizAdds bank questions to a quiz by id, and random questions from a bank category, at the end or on a page, as the edit page's bank actions post them. Returns the quiz's structure afterwards. A quiz already attempted can't change its questions: Moodle refuses, and so does this.
addQuizSectionAdds a section to a quiz starting at a slot, with its heading and whether its questions are shuffled, as the edit page's "Add a new section heading" and its heading and shuffle controls do. A section starts at a page: the slot must be the first of its page (see setQuizPages).
addSectionAdds a section after another one (at the end without it), named when a name is given, with a description (HTML) when summary is, and embed's local files in it (<img src="shot.png">).
allocateMarkerAllocates a marker (the user id of someone who can grade; several where the assignment uses several markers per submission) to participants' submissions, as the grading table's "Allocate marker" does. Moodle leaves alone submissions past marking (marking completed, in review, ready for release, released).
anonymizeBackupWrites to destFile a copy of a backup file (.mbz) that names no one and no site: no browser, no session. Every user id in its XML is 0 (files' owners, questions' creators, modifiers and owners…), every author's or issuer's name empty; the original site's address and identifier hash, the course's id and names, the file's name, the site's host in question stamps, the site's address in texts and the backup's log are replaced by neutral values (ANONYMOUS). The content (texts, settings, files) stays as it was; the numeric ids of the backup's pieces too, which only matter inside it. Moodle restores the copy as a backup from another site, wherever it's restored: the questions and files are the restoring person's, and links to activities left out of the backup point to the neutral site. Returns what was cleared. destFile may be file itself. A backup with users' data is refused: Moodle's own anonymization makes those (its anonymize setting).
answerChoiceAnswers a choice with one option (several where it allows them) by id, as "Save my choice" does; returns the choice afterwards.
answerLessonPageAnswers the page the person is on: a content page's button (its label or position), or a question's fields by name. Returns Moodle's feedback when it gives one, and the page that follows, going on past the feedback as its "Continue" does; reaching the end ends the attempt. With the realistic trail it first takes the time a reader needs for the page (ADR-005).
answerQuizQuestionsSaves answers in an attempt in progress without finishing it, and gives its questions afterwards. With the realistic trail, it first takes the time a reader needs for the questions and their options (ADR-005), calling onProgress with the seconds elapsed and the total.
assessWorkshopSubmissionAssesses a submission as the person, through the workshop's assessment form (its grading strategy's: accumulative, comments, number of errors or rubric), as "Assess" on the submission's page and the form do: a teacher who hasn't assessed it yet gets an assessment of their own, and one already made is changed. criteria go in the form's order; feedback is the overall feedback for the author (HTML), where the workshop has it on; fields sets any other field of the form by name (weight…). Returns a sentence of what changed, the assessment's id, and the grade it gives the submission out of the workshop's grade. Throws WorkshopError outside the assessment phase, when a criterion's grade isn't one it takes, or when the workshop has no overall feedback; FormError when Moodle refuses the form (a criterion left without a grade).
assignmentSubmissionsEvery participant's submission to an assignment, with the group they submit for (group submissions), and, unless includeContent is false, its content, the feedback files they have, its marking workflow state and markers (all from each participant's grading panel). Those come only for participants with a submission: Moodle's grading panel creates an empty one for a participant who has none, so reading leaves them at "none", without the panel's details (confirmed empirically on the sandbox, 5.2). For a participant with a submission and no grade yet, the panel still leaves an empty grade (-1, not graded) and a "Grading form viewed" event, as Moodle's grader does. Only some participants when given their userIds; with limit, a page of them in the grader's order (see "Long lists" in the docs' concepts): Moodle's service lists every participant at once, cut to the page, and only the page's participants are read further (their dates, their panels).
backgroundBrowserThe browser another process keeps open on profileDir (the moodle open command's), or undefined when there's none. A .browser.json left by a process that's gone is removed.
backupContentsWhat a backup file (.mbz) holds, read on this computer without restoring it, without a browser or a session: the Moodle that made it, the original site and course, its sections and activities (the original site's ids), the plugins a site needs to restore it, whether it holds people's data, and, per activity, what it refers to that the backup doesn't hold (restrictions on activities left out, links to them in its text, its grade category), which a restore elsewhere leaves broken. BackupError when the file isn't a Moodle backup (or is a zip-format one, which isn't read).
backupCourseBacks a course up to a .mbz file, through Moodle's backup wizard (initial settings, schema, confirmation), and downloads it into destDir. Without users' data unless withUsers, which needs moodle/backup:userinfo (anonymize makes their names anonymous). An asynchronous backup is waited for up to timeoutMs (ten minutes). Moodle keeps the file in the course's or the person's backup area too.
calendarEventOne calendar event by its id, as upcomingEvents gives them.
canShowWindowWhether a window can be shown. On Linux it needs an X or Wayland display; without one (Docker, a server) the driver refuses rather than trying, so it never reaches a display it wasn't given.
checkLocalFilesLocal files given to upload (a submission, an attachment, a resource): absolute, and there.
completionReportA course's progress report: every participant's completion of every activity that tracks it, page by page, in one group when given, only some people's when given their userIds (the report has no filter by user: its pages are read until all of them are found). People come as user id and full name only.
connectBrowserManagerA browser manager on a browser another process keeps open (backgroundBrowser), for a program to share it: it connects on first use, works in the browser's own context, and close() only disconnects, leaving the browser open. With a window, the pages functions open are followed in its first tab (ADR-007); it can't add or remove a window from a browser it didn't launch.
conversationA conversation's messages, oldest first, as text, and its members as conversations() gives them: everyone but the person, whether they wrote in it or not (the person alone in their own conversation). With limit, messages is a page of them (see "Long lists" in the docs' concepts) counted from the newest: the first page is the latest messages, more says there are older ones, and each page's messages still come oldest first. Moodle's service returns only the page.
conversationsThe person's conversations, latest first, with their last message as text. With limit, a page of them (see "Long lists" in the docs' concepts), the only ones Moodle's service returns.
copyCourseCopies a course into a new one, as Moodle's "Copy course" does: its content (and its people's data and enrolments, withUsers), under a new full and short name, in a category (the course's unless given), with new dates. Goes through Moodle's copy service, then waits for the copy, which Moodle makes in its scheduled tasks, up to timeoutMs (ten minutes). Needs the rights to back up, restore and create courses (moodle/backup:backupcourse, moodle/restore:restorecourse, moodle/course:create); without them, BackupError says so.
courseAbilitiesWhat the person can do in a course, asked of read-only services that need the capability: the activity types they can add (none without moodle/course:manageactivities) and the grader report's users (nopermissions without gradereport/grader:view). Nothing is changed.
courseActivityTypesThe activity and resource types the person can add to a course: none when they can't edit it.
courseLogsA 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).
courseRolesA user's roles in a course, from their profile there: role links carry the role id in any language.
courseStructureA course's sections and activities; with details, each activity's dates and restriction and each section's description, from the course page (slower).
courseUpdatesWhat changed in a course's activities since a date, with their names from the course's state.
createActivityCreates an activity or resource of any type at the end of a section, through Moodle's own form, hidden from students unless visibility says otherwise. files are local paths uploaded to a file resource or folder (a DraftUpload puts one in a folder's subfolder); a SCORM (type: "scorm") or an H5P activity (type: "h5pactivity") takes the first as its package.
createBrowserManagerA browser manager that launches the browser itself, in the persistent profile of config (ADR-002), on first use: nothing opens until a function needs the browser. It tries the installed browsers and, if allowed, downloads Chromium in the background (ADR-001). Its context() throws BrowserNotFoundError when no browser can be launched, BrowserDownloadingError while Chromium downloads, and NoDisplayError for a window without a screen. The other parameters are for tests.
createEventCreates a course event, through the calendar's own form: its start, and its duration and description when given. Returns it as the calendar has it.
createGroupCreates a group in a course with its group form (group/group.php). Throws FormError with Moodle's reason when it refuses (a name already used, an enrolment key another group has).
createGroupingCreates a grouping in a course with its form (group/grouping.php); add its groups with setGroupingGroups.
createMoodleWorks one Moodle site through a browser: give the site and the browser's options (or a browser manager), and optionally the defaults its calls use; then call the driver's operations as methods.
createQuestionCreates one question in a bank through its type's edit form; returns its id. Imports are the way for several; this is for one-offs.
deadlinesWhat the person has to do by a date (calendar action events: submit, attempt, grade…), from the last pastDays to days ahead, in one course or all. Teachers' grading counts come from the activities overview instead: Moodle gives them few action events.
deleteActivityDeletes an activity, with its participants' data (submissions, posts, attempts); gives the course afterwards.
deleteEventDeletes a calendar event the person can manage.
deleteGradeCategoryDeletes a grade category. Moodle moves what it held (items and categories) into its parent and deletes the grades of its total; the course's own category can't be deleted.
deleteGradeItemDeletes a manual grade item and its grades. An activity's item goes with its activity (Moodle would make it again), so it's refused.
deleteGroupDeletes a group, as the groups page's "Delete selected group" does once confirmed; its members stay in the course.
deleteGroupingDeletes a grouping, as its delete icon does once confirmed; its groups stay.
deletePostDeletes a post and its replies through Moodle's own confirmation (post.php?delete=); a discussion's first post takes the whole discussion. Only a moderator deletes a post with replies, or someone else's. replies says how many replies went with it. Throws ForumError with Moodle's reason when it refuses.
deleteQuestionsDeletes questions from a bank, every version of each, as the bank's delete action does: asked, then confirmed. Moodle doesn't delete a question a quiz uses: it hides it, and hidden lists those.
deleteSectionDeletes a section and every activity in it, with their participants' data.
discussionA discussion's posts, oldest first, with their messages as text, and whether the person is subscribed to it (subscribed, undefined where they can't subscribe or it's forced). With limit, posts is a page of them (see "Long lists" in the docs' concepts): Moodle's service has no paging, so every post is read and cut, but only the page's messages are turned into text.
downloadFileSaves a file of the site into destDir with the person's session, never overwriting. Only URLs of the site's origin: the session's cookies go nowhere else (its media outside Moodle's path included).
duplicateActivityDuplicates an activity as the course page's "Duplicate" does (right after it, named with "(copy)"); gives the copy's id and the course afterwards.
editActivityRenames, shows or hides, or moves an activity (to a section's end, or before another one).
editPostChanges a post through Moodle's own post form (post.php?edit=), as its author (within the site's editing time) or a moderator: only what's given changes. Returns the post afterwards. Throws ForumError with Moodle's reason when it refuses.
editQuizSlotChanges one slot of a quiz (by its place, from 1): its maximum mark, through the slots' service, and where it is, as dragging it on the edit page does: after another slot (moveAfter, 0 for first) and on a page. Moodle lets the mark change after attempts (it regrades them), not the rest.
editSectionRenames, shows or hides, describes (summary, HTML, with embed's local files in it), restricts (restrictions; { conditions: [] } removes them) or moves a section after another one.
enrolmentMethodsA course's enrolment methods, in the order Moodle tries them: each one's type, name, whether it's enabled and how many users it enrolled, and from its form the role it gives and, for self enrolment and guest access, whether it asks for a key (never the key), self enrolment's dates and limit. Throws EnrolmentError when the person can't manage the course's enrolment methods.
enrolUsersEnrols users in a course by manual enrolment, as the participants page's "Enrol users" dialog does: with roleId or the enrolment's default role, from start (now, unless given) until end (the enrolment's default duration, unless given). Users already enrolled keep their enrolment, with the new dates. Throws EnrolmentError with Moodle's reason when it refuses (a role the person can't assign, no manual enrolment).
exportGradesSaves a course's grades into destDir as Moodle exports them for a teacher: a spreadsheet (xlsx, ods), comma-separated text (csv) or XML, with the items, group, display and feedback chosen as in the export form. Returns the file as downloadFile does (never overwriting one). Throws GradebookError when the site has that format's export plugin disabled (naming the ones it has), when an item isn't in the course, or when Moodle refuses the export.
findMoodleSiteThe site's base URL for any URL of it (the site, a course, the login page), read from the M.cfg.wwwroot Moodle puts in every page; fetched without the browser or any session. Throws MoodleUrlError when it can't be reached or isn't a Moodle.
finishQuizAttemptSubmits an attempt for grading, and gives its review when the quiz shows it.
forumDiscussionsA forum's discussions, as its page lists them: who started each, replies, last post, the person's subscription. With limit, a page of them in the forum's order (see "Long lists" in the docs' concepts), read from the one page of the forum's own paging that holds it.
forumGradesEveryone's whole-forum grade in a forum graded as a whole, as its grader shows them: one per person it can grade (only the active ones when the forum says so), with how it's graded. One service call per person. Throws NotAForumError for another activity, and GradingError when the forum isn't graded as a whole or uses an advanced grading method.
getChoiceA choice: its options, whether it can be answered or changed, and the person's answer.
getSurveyA survey (questionnaire or feedback): whether it can be answered, its intro and messages, and its questions page by page. Its module is found when not given.
gradebookSetupA course's gradebook setup: its categories (aggregation, weights) and grade items (category, maximum, weight).
gradeForumUserGives a person their whole-forum grade, as the forum's grader does: points (out of the forum's maximum), or a scale item by name or value; null takes the grade away. Moodle's forum grader has no feedback text. notify sends the person Moodle's notification, as the grader's checkbox does. Returns a sentence of what changed and the grade afterwards. Throws GradingError when the forum isn't graded as a whole, the grade is out of range or not on the scale, or Moodle refuses it.
gradeQuizQuestionGrades one question of a finished attempt by hand, with a comment, through Moodle's comment form (the review's "Make comment or override mark"): an essay waiting for grading, or any question whose mark the teacher overrides. The mark is in the question's points (0 to its maximum in the quiz). Returns the attempt's grade afterwards when the results report shows it.
graderReportEveryone's grades in a course as the grader report shows them, page by page, in one group when given, only some people's rows when given their userIds (the report has no filter by user: its pages are read until all of them are found). People come as user id and full name only.
gradeSubmissionGrades a participant as the grader does: a grade (simple grading), a rubric's level per criterion or a marking guide's score per criterion (by their ids, from rubric()), remarks per criterion, feedback comments (HTML), feedback files (local paths that replace the ones the participant has; [] removes them), whether to notify, and any other grading field by name. Returns the grade saved and the gradebook's grade, the total Moodle computes for a rubric or a guide, and the feedback files after saving when they were given. Throws GradingError when Moodle refuses the grade, or when files are given to an assignment without feedback files.
grantExtensionGrants participants an extension until a date, through the assignment's extension form (several at once as its bulk action does). Moodle refuses a date before the assignment's due date, and a person without its "grant extension" capability only on saving (the form opens for anyone, confirmed empirically on the sandbox, 5.2): both throw.
groupingsA course's groupings with their groups' ids, from its groupings page and each grouping's groups page. Throws MoodleError with Moodle's refusal for a person who can't manage groups.
groupsA course's groups the person can see, with their members' user ids.
h5pActivityAn H5P activity: its content type, whether attempts are tracked, and the person's attempts with their scores.
importActivitiesImports activities from another course into a course, as Moodle's "Import" does: every activity of fromCourseId, or only activityIds, added to toCourseId's content (with their sections), without users' data. Needs moodle/restore:restoretargetimport in the course imported into and moodle/backup:backuptargetimport in the other. Returns the activities the course has afterwards that it didn't have before, by id.
importQuestionsImports questions into a bank from a GIFT or Moodle XML file (a local path) or text, through the bank's import form; returns the questions created. A file Moodle can't parse comes back as a QuestionBankError with its messages, and nothing is imported.
lessonPageThe lesson page the person is on (starting the lesson the first time).
listAssignmentsThe course's assignments, in the course's order, with the section each is in.
listCoursesThe courses the person is enrolled in, as teacher or student.
logInMakes sure there's a session: the user at once if there is one; otherwise a browser window at the site's login page, waiting (calling onWait) until the person logs in there themselves. The session is saved (ADR-003), and the window closes again unless the browser is shown on demand. It waits timeoutMs, 5 minutes by default.
logOutLogs the person out of Moodle through the user menu's logout link (it carries the sesskey; without one Moodle asks to confirm, and the confirmation is accepted). Returns false when nobody was logged in. Only Moodle's session ends: a single sign-on provider may keep its own.
markNotificationsReadMarks all the person's notifications read, as the popover's "Mark all as read" does; doing it twice changes nothing.
messageParticipantsSends one message to several participants of a course, as the participants page's "Send a message" does for the users selected: one private message each, in one call. They are userIds, or the participants participants() chooses with role, group and inactiveSince (all of them when none is given), the person left out. sentTo lists exactly who got it, refused who Moodle didn't write to and why (they blocked the person, their privacy settings); someone who may message any user (a teacher, moodle/site:messageanyuser) gets through a block, as in Moodle's own page (confirmed empirically, Moodle 5.2). Throws MessageError for an empty message or nobody to write to, NoParticipantsError when the person can't see the course's participants.
moduleCategoriesThe data a teacher reads when reading an activity of module with everything in it: course content alone for what teachers make (pages, books, files…), also others' personal data where participants leave work or responses. An unknown module (a plugin) could hold anything: any.
myGradesThe person's own grade report for a course.
notificationsThe person's notifications, newest first, only the unread ones when asked. With limit, a page of them (see "Long lists" in the docs' concepts): Moodle's service gives only the page, or, for the unread ones, batches until the page is full (it has no unread filter).
openScormOpens a SCORM in Moodle's player, in normal mode, on the browser's working tab (ADR-007), for the person (or a program driving the tab) to do it there: the last attempt continues unless newAttempt, at the activity's first SCO unless scoId. Resolves once the SCO's frame has loaded. Opening the player is what starts an attempt in Moodle.
overrideCompletionSets someone's completion of an activity as a teacher does from the progress report; returns the state saved.
parseSiteUrlA Moodle site's base URL, normalized: http(s), no query or fragment, a trailing slash.
participantFiltersThe roles and groups the participants page filters by in a course (its filters' options), as the person may use them: every group, or only their own in a course with separate groups. "No roles" and "no group" left out.
participantsA course's participants with their roles and groups, as the participants page lists them: only those with a role (its id), in a group, or (inactiveSince) who haven't accessed the course since that date, when asked. Each role and group is a filter of its own, so ids come in any language. With limit, a page of them in the page's order, by last name (see "Long lists" in the docs' concepts): the one page of the table's own paging that holds it; the roles' and groups' members are still read whole, to tell each one's.
participationReportWho took part in an activity of a course, as its participation report counts it: everyone with the role (every role the report offers, unless roleId), with how many actions they made there (views or posts only, when action; since since, when given); those who did nothing come with 0.
pendingActivitiesWhat the person still has to do in a course: activities whose completion is tracked and not complete or, where completion isn't tracked, graded activities without a grade yet.
potentialUsersUsers the person may enrol in a course by manual enrolment, matching search anywhere in their name or the identity fields the site shows (all of them, a page of up to 100, when empty), as the "Enrol users" dialog finds them. Throws EnrolmentError when the course has no manual enrolment the person can use.
publicSiteInfoWhat the site tells anyone about itself, through Moodle's AJAX entry point for services that need no login (service-nologin.php): readable before logging in, without the browser. Moodle shows its version only to administrators, so it isn't here.
questionBanksA course's question banks: its shared ones and the activities' own, as the banks page lists them.
questionsA bank's categories and every question in them, category by category. With limit, questions is a page of them in that order (see "Long lists" in the docs' concepts), the categories all: the bank is read category by category until the page is full, each category whole and cut (its page counts aren't reliable enough to skip by).
questionsToGradeThe questions of a quiz that wait for grading by hand (essays…), as its manual grading report lists them, each with the finished attempts whose answer requires grading (from the results report). People as user id and full name.
quizInfoA quiz's page as the person sees it: its description and dates, the person's attempts with their summary, and whether they can start one.
quizResultsA quiz's attempts as its grades report shows them: per attempt the user, state, dates, grade and the mark per question; with responses, also the answer per question from the responses report. Every page of the report; with limit, attempts is a page of them in the report's order (see "Long lists" in the docs' concepts), read from the one page of the report's own paging that holds it.
quizStructureA quiz's questions as its edit page lists them: slots with their page, question, type, name and mark, and its sections.
rateRates a forum post, a glossary entry or a database record as the person, as the rating menu under it does: by a scale item's name, or its number (the points of a point scale). null takes the person's rating away. Returns a sentence of what changed and the item's aggregate afterwards (as Moodle shows it, by the activity's aggregation) with the number of ratings. Throws GradingError when the item has no rating menu for the person (ratings off, their own item, outside the rating period, or no permission) or the rating isn't on its scale.
readAttemptEvery question of an attempt, page by page, with the page each is on.
readReviewA finished attempt's review, as far as the quiz's review options let the person see it.
removeQuizSlotRemoves a slot (by its place, from 1) from a quiz, as the edit page's delete icon does; the question stays in its bank.
replyToPostReplies to a post; returns the new post's id and its discussion's, and, when subscribe is given, the person's subscription to the discussion afterwards, read back (subscribed).
resetCourseResets a course for a new year, as Moodle's reset form does: deletes only what's named in delete (in every module of the course that has it), unenrols the people with unenrolRoles (role ids), moves the course's start date to start (and its activities' dates with it), and sets any other of the form's fields by name (fields). Nothing is deleted unless asked: the form's own defaults are unticked first. It can't be undone. Returns Moodle's report: per component, what it did and its errors. Needs moodle/course:reset.
restoreCourseRestores a backup file (.mbz) through Moodle's restore wizard: into a new course in a category (into: "new", with categoryId, which needs moodle/course:create there), or into an existing course (into: <course id>), its content added to the course's (mode: "merge", the default) or replacing it ("replace": the course's content is deleted first). A new course takes the backup's names unless fullName and shortName are given. Users' data is restored when withUsers and the backup has it. An asynchronous restore is waited for up to timeoutMs (ten minutes). Needs moodle/restore:restorecourse where it restores.
rubricAn assignment's grading method and, for a rubric or a marking guide, its criteria with the ids gradeSubmission takes: read from the grader's panel for the first participant with a submission. Where nobody has one yet, the panel is the first participant's, and Moodle creates an empty submission ("new") for them on opening it.
saveSubmissionSaves the submission's online text and adds files, as "Save changes" on the edit page does; gives the assignment afterwards.
scormA SCORM activity as the person sees it: its attempts (allowed and made), the grading method, the grade reported and each attempt's, and its SCOs with the person's status and score in the last attempt. Moodle doesn't show a SCORM's version on its page: openScorm tells it.
sendMessageSends a private message to a user, as the messaging drawer does; returns the message and its conversation.
setCompletionMarks the person's own completion of an activity with manual completion, done or not, as its "Mark as done" button does; doing it twice changes nothing. An activity that completes on its own gives a CompletionError.
setDiscussionStatePins or unpins, locks or unlocks a discussion, as the discussion list's menu does; what's already so is left alone. Returns the discussion as the forum lists it afterwards.
setDiscussionSubscriptionSubscribes the person to a discussion or unsubscribes them, as the discussion list's toggle does (mod_forum_set_subscription_state); what's already so is left alone. Returns the discussion as the forum lists it afterwards.
setEnrolmentMethodSets an enrolment method: by id, or the course's first method of a type ({ type: "self" }), added when the course has none and the "Add method" menu offers it. Only what's given changes. enabled goes through the methods page's enable and disable icons, the rest through the method's form: what Moodle lets the person change differs by method (an editing teacher can't configure manual enrolment, enrol/manual:config, so neither switch it nor set its role). Returns the method afterwards. Throws EnrolmentError for a method the course doesn't have or can't add, and for a setting Moodle doesn't let the person change (naming it); FormError with Moodle's reason when it refuses the form (a key required by the site, an end before the start).
setGradeSets a person's grade in a grade item through the gradebook's single view report, as a teacher does there: a manual item takes the grade; an activity's or a category's is overridden (Moodle keeps the override until it's taken off with override: false). Feedback and excluding from the totals go the same way. Returns a sentence of what changed and the grade afterwards. Throws GradebookError when the item or the person isn't in the course's gradebook, the grade is locked, or Moodle refuses the value (out of range, a scale item it doesn't have).
setGroupingGroupsMakes a grouping's groups exactly groupIds, as its groups page adds and removes them. Groups of other courses aren't offered there and are left out, named in changed. Returns the groups afterwards.
setGroupMembersAdds and removes a group's members (user ids), as its members page does. Only the course's participants can be added: ids the page doesn't offer (not enrolled, or already members) and members not in it are left as they were and named in changed. Returns the members afterwards.
setQuestionStatusSets a question ready (quizzes can use it) or draft, as the bank's status menu does, through its service.
setQuizOverrideSets a user override on a quiz, through its override form: other opening and closing dates, a time limit in minutes, or a number of attempts (0 unlimited); what isn't given stays the quiz's.
setQuizPagesSets a quiz's pages: perPage questions a page (0 for all on one), as the edit page's "Repaginate" does, or page breaks exactly after the given slots (and nowhere else), as its page break icons do one by one.
setUserRolesSets a user's roles in a course, as the participants page's roles column does: gives the roles in roleIds the person may assign, and takes away the others the person may assign. Roles the person can't assign that the user already holds, and those from elsewhere (a category, an enrolment that protects them), stay. Returns the user's roles afterwards, as that column shows them. Throws EnrolmentError with Moodle's reason for a role the person can't assign or a user not enrolled.
setWorkflowStateSets the marking workflow state of participants' submissions, as the grading table's "Set marking workflow state" does; "released" shows them their grades, notifying them when notify is true (the form's default is not to). With several markers, it sets the submission's overall state.
setWorkshopPhaseSwitches a workshop to a phase, as its page's phase links do, confirming Moodle's question (any phase, forwards or back; Moodle allocates nothing and calculates no grades on its own when it switches). Returns a sentence of what changed and the phase afterwards. Throws WorkshopError when the person can't switch the workshop's phases (Moodle's mod/workshop:switchphase, a teacher's) or the id isn't a workshop's.
siteNameThe site's name, from its public settings; undefined where the mobile app support is off.
siteProfileDirThe browser profile folder the moodle command uses for an account on a site: sites/<host>/profiles/<as>. Without as, the site's default (the account last logged in with, named in its site.json); MoodleError with code not-found when the command hasn't logged in to the site. Pass it as profileDir to share the command's session; home is ~/.moodle-driver unless given.
startDiscussionStarts a discussion in a forum; returns its id, and whether it's pinned and the person subscribed to it, as the forum lists it afterwards, so one call confirms what subscribe and fields set.
startQuizAttemptStarts an attempt, or continues the one in progress, and gives its questions.
studentAssignmentAn assignment as the student sees it: its description and files, dates, the submission's status and files, the feedback, and whether it can be edited or submitted now.
submitForGradingSubmits the saved submission for grading, accepting the site's statement when it asks for one (acceptStatement, once the person agrees; a bare boolean as before 0.2 too); gives the assignment afterwards.
submitSurveyFills the survey page by page with responses (field name → value) and submits it on the last page. Every name is checked against the form first, so nothing is sent with a wrong one.
unenrolUserUnenrols a user from a course: removes every enrolment of theirs the person may remove (its unenrol link on the participants page), with their roles and group memberships in the course, as that link does. changed and removed say which ones (by enrolment method's name), kept those the person may not remove (a cohort sync, another teacher's method). Throws EnrolmentError when the user isn't enrolled.
upcomingEventsThe person's upcoming events, as the calendar's "Upcoming events" view lists them, in one course or all.
updateActivityChanges an existing activity through its form: only what's given changes. A file resource's or folder's files stay as they are unless files says what to add, remove or replace.
updateCourseChanges a course's full name, short name, summary (HTML) or any other setting by its form field name, through the course's settings form; returns the course as listCourses gives it. embed takes local files the summary names (<img src="shot.png">), put in it as Moodle's editor does. Moodle's refusals (a short name already taken) come back as FormError by field.
updateEventChanges a calendar event through the calendar's own form, opened on it: only what's given changes. A new start keeps the event's length unless a new one is given. Returns the event as the calendar has it afterwards.
updateGradeCategoryChanges a grade category: its name, its aggregation, its weight in its parent (percent, overriding Natural's automatic one), or moves it into another category. Returns the category afterwards.
updateGradeItemChanges a grade item: moves it into a category, sets its weight (percent, overriding Natural's automatic one), or its maximum grade (a manual item's; an activity's is set in the activity). Returns the item afterwards.
updateGroupChanges a group's name, description, ID number or enrolment key with its form; what isn't given stays.
updateQuestionChanges a question of a bank through its type's edit form, with the same inputs as createQuestion and only what's given (answers replaces them all). Saving makes a new version of the question, with an id of its own: the one returned, which quizzes using the latest version get from then on.
userByIdA user by id, or undefined when there's nobody: no such user, one the person may not see, or a deleted account. Moodle keeps a deleted account's record and its user service still gives it to an administrator, renamed, with the email replaced by an MD5 hash of the old username (delete_user, confirmed empirically on the sandbox, 5.2); the driver treats it as gone.
whoAmIWho the logged-in person is; with courseId, also their roles and abilities in that course.
workshopInfoA workshop's phase, and its report as the workshop's page shows it to a teacher: every submission (its author, title, and grade once calculated) and every assessment (reviewer, the submission's author, the grade it gives, its weight, the grade for assessing once calculated), all of its pages. The report is Moodle's own: it shows from the submission phase on to those who can see every submission, in the course's current group; for anyone else the lists are empty. Grades are out of the workshop's grade for submission, as Moodle shows them. Throws WorkshopError for an activity that isn't a workshop the person can view.