Repository navigation
v0.5.0
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:
summaryinaddSection,editSectionandcourseStructure({ details })(#32). - Access restrictions and completion conditions in plain terms:
restrictionsandcompletionincreateActivity,updateActivity,editSectionandactivitySettings(#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'sfeedbackFiles) (#40); group submissions and the marking workflow:setWorkflowState,allocateMarker,workflowState/applyToGroupingradeSubmission(#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,connectBrowserManagerandbackgroundBrowser(#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.userByIdgivesundefinedfor a deleted account, which Moodle still returns to an administrator, renamed.createEventsaved a course event with the course's first group, which hid it from the teacher's upcoming events.createActivityrefused an H5P activity's package, and gave noactivityIdfor a question bank.h5pActivitysaid a student's tracked activity wasn't tracked before their first attempt.getChoice,answerChoiceandgroupingstook Moodle's error page for an empty result; they now throw with Moodle's reason.importQuestionsinto a given category failed on a field Moodle disables.ratefound no rating menu for glossary entries and database records.allocateMarkerandsetWorkflowStatenow refuse an assignment without marker allocation or the marking workflow;grantExtensionandsubmitForGradingthrow 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
QuizSlothasslot(its place in the quiz), andquizStructureandaddQuestionsToQuizreturnsections.dateSelectorValuestakes an optional time zone;uploadToDrafttakes{ from, to }items and{ overwrite }.CourseChangemay carry the activity'sfiles;Questionhascomment;SubmissionhasfeedbackFiles,group,workflowStateandmarkers.