Skip to content

v0.5.0

Choose a tag to compare

@fvarrui fvarrui released this 12 Oct 12:28
· 138 commits to main since this release

Managing a course in full: everything a teacher does to run a course, beyond reading it.

New

People (participants)

  • Enrol, unenrol and set roles: potentialUsers, enrolUsers, unenrolUser, setUserRoles (#28).
  • Groups and groupings with their members: createGroup, updateGroup, deleteGroup, setGroupMembers, groupings, createGrouping, deleteGrouping, setGroupingGroups (#29).
  • Enrolment methods (self enrolment with a key, guest): enrolmentMethods, setEnrolmentMethod (#44).
  • One message to several participants: messageParticipants (#47).

Building a course (activities)

  • Replace, add or remove a file resource's or folder's files: updateActivity(id, { files: { add, remove, replace } }) (#31).
  • Sections' descriptions: summary in addSection, editSection and courseStructure({ details }) (#32).
  • Access restrictions and completion conditions in plain terms: restrictions and completion in createActivity, updateActivity, editSection and activitySettings (#33).
  • Copy, back up, restore and import courses: copyCourse, backupCourse, restoreCourse, importActivities (#42); reset one: resetCourse (#43).

Quizzes and question banks

  • Grade by hand (essays): questionsToGrade, gradeQuizQuestion (#30).
  • A quiz's structure: editQuizSlot, removeQuizSlot, setQuizPages, addQuizSection (#34).
  • Edit and delete bank questions: updateQuestion, deleteQuestions, setQuestionStatus (#35).

Grading and grades

  • The gradebook: setGrade (override, exclude, manual items), addGradeItem, updateGradeCategory, deleteGradeCategory, deleteGradeItem (#37); export: exportGrades (#38).
  • Whole-forum grading and ratings: forumGrades, gradeForumUser, rate (#46); workshops: workshopInfo, setWorkshopPhase, assessWorkshopSubmission (#48).
  • Assignments: feedback files (gradeSubmission's feedbackFiles) (#40); group submissions and the marking workflow: setWorkflowState, allocateMarker, workflowState/applyToGroup in gradeSubmission (#41).

Forums, calendar, reports

  • Edit and delete posts: editPost, deletePost (#39).
  • Change an event: updateEvent, calendarEvent (#36).
  • Logs and reports: courseLogs, activityReport, participationReport (#45).

The moodle command (command line)

  • moodle shell: commands typed one after another on one browser (#24).
  • moodle open / moodle close: a background browser separate commands share, behind a token (ADR-014); for programs, connectBrowserManager and backgroundBrowser (#25).
  • Every new function is also a command (132 in all).

New error classes, with their codes: EnrolmentError, ForumError, ReportError, BackupError, WorkshopError, and the generic background-browser and browser-busy.

Fixes

  • Security: when a request to Moodle timed out, the error's message carried the session cookie and the sesskey (Playwright lists the request's headers). Errors now say [redacted] instead, so they can be logged as they are.
  • setFields (and so every form with a rich text editor, such as forum posts) raced TinyMCE: content set while the editor was still starting threw. It now waits for the editor.
  • userById gives undefined for a deleted account, which Moodle still returns to an administrator, renamed.
  • createEvent saved a course event with the course's first group, which hid it from the teacher's upcoming events.
  • createActivity refused an H5P activity's package, and gave no activityId for a question bank.
  • h5pActivity said a student's tracked activity wasn't tracked before their first attempt.
  • getChoice, answerChoice and groupings took Moodle's error page for an empty result; they now throw with Moodle's reason.
  • importQuestions into a given category failed on a field Moodle disables.
  • rate found no rating menu for glossary entries and database records.
  • allocateMarker and setWorkflowState now refuse an assignment without marker allocation or the marking workflow; grantExtension and submitForGrading throw when Moodle refuses, instead of reporting success.

All found by a new regression suite that runs every exported function against a real Moodle 5.2 (#49): npm run test:sandbox, on demand.

Changes a program may notice

  • QuizSlot has slot (its place in the quiz), and quizStructure and addQuestionsToQuiz return sections.
  • dateSelectorValues takes an optional time zone; uploadToDraft takes { from, to } items and { overwrite }.
  • CourseChange may carry the activity's files; Question has comment; Submission has feedbackFiles, group, workflowState and markers.