@falkenslab/moodle-driver 0.0.0-stage → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +133 -2
- package/dist/areas/activities/build.d.ts +98 -0
- package/dist/areas/activities/build.js +246 -0
- package/dist/areas/activities/build.js.map +1 -0
- package/dist/areas/activities/content.d.ts +53 -0
- package/dist/areas/activities/content.js +113 -0
- package/dist/areas/activities/content.js.map +1 -0
- package/dist/areas/assignments/grader.d.ts +68 -0
- package/dist/areas/assignments/grader.js +169 -0
- package/dist/areas/assignments/grader.js.map +1 -0
- package/dist/areas/assignments/grading.d.ts +86 -0
- package/dist/areas/assignments/grading.js +162 -0
- package/dist/areas/assignments/grading.js.map +1 -0
- package/dist/areas/assignments/student.d.ts +57 -0
- package/dist/areas/assignments/student.js +115 -0
- package/dist/areas/assignments/student.js.map +1 -0
- package/dist/areas/calendar/calendar.d.ts +43 -0
- package/dist/areas/calendar/calendar.js +84 -0
- package/dist/areas/calendar/calendar.js.map +1 -0
- package/dist/areas/completion/completion.d.ts +50 -0
- package/dist/areas/completion/completion.js +112 -0
- package/dist/areas/completion/completion.js.map +1 -0
- package/dist/areas/courses/list.d.ts +59 -0
- package/dist/areas/courses/list.js +74 -0
- package/dist/areas/courses/list.js.map +1 -0
- package/dist/areas/courses/overview.d.ts +83 -0
- package/dist/areas/courses/overview.js +137 -0
- package/dist/areas/courses/overview.js.map +1 -0
- package/dist/areas/courses/state.d.ts +51 -0
- package/dist/areas/courses/state.js +45 -0
- package/dist/areas/courses/state.js.map +1 -0
- package/dist/areas/courses/structure.d.ts +89 -0
- package/dist/areas/courses/structure.js +104 -0
- package/dist/areas/courses/structure.js.map +1 -0
- package/dist/areas/forums/discussions.d.ts +57 -0
- package/dist/areas/forums/discussions.js +119 -0
- package/dist/areas/forums/discussions.js.map +1 -0
- package/dist/areas/forums/posts.d.ts +83 -0
- package/dist/areas/forums/posts.js +114 -0
- package/dist/areas/forums/posts.js.map +1 -0
- package/dist/areas/grades/gradebook.d.ts +104 -0
- package/dist/areas/grades/gradebook.js +250 -0
- package/dist/areas/grades/gradebook.js.map +1 -0
- package/dist/areas/grades/user-report.d.ts +26 -0
- package/dist/areas/grades/user-report.js +71 -0
- package/dist/areas/grades/user-report.js.map +1 -0
- package/dist/areas/h5p/h5p.d.ts +33 -0
- package/dist/areas/h5p/h5p.js +104 -0
- package/dist/areas/h5p/h5p.js.map +1 -0
- package/dist/areas/lessons/lessons.d.ts +60 -0
- package/dist/areas/lessons/lessons.js +145 -0
- package/dist/areas/lessons/lessons.js.map +1 -0
- package/dist/areas/messages/messages.d.ts +68 -0
- package/dist/areas/messages/messages.js +84 -0
- package/dist/areas/messages/messages.js.map +1 -0
- package/dist/areas/participants/participants.d.ts +57 -0
- package/dist/areas/participants/participants.js +135 -0
- package/dist/areas/participants/participants.js.map +1 -0
- package/dist/areas/questions/banks.d.ts +83 -0
- package/dist/areas/questions/banks.js +239 -0
- package/dist/areas/questions/banks.js.map +1 -0
- package/dist/areas/quizzes/attempts.d.ts +123 -0
- package/dist/areas/quizzes/attempts.js +300 -0
- package/dist/areas/quizzes/attempts.js.map +1 -0
- package/dist/areas/quizzes/results.d.ts +36 -0
- package/dist/areas/quizzes/results.js +93 -0
- package/dist/areas/quizzes/results.js.map +1 -0
- package/dist/areas/quizzes/structure.d.ts +42 -0
- package/dist/areas/quizzes/structure.js +100 -0
- package/dist/areas/quizzes/structure.js.map +1 -0
- package/dist/areas/site/info.d.ts +25 -0
- package/dist/areas/site/info.js +45 -0
- package/dist/areas/site/info.js.map +1 -0
- package/dist/areas/site/users.d.ts +56 -0
- package/dist/areas/site/users.js +89 -0
- package/dist/areas/site/users.js.map +1 -0
- package/dist/areas/surveys/choice.d.ts +38 -0
- package/dist/areas/surveys/choice.js +105 -0
- package/dist/areas/surveys/choice.js.map +1 -0
- package/dist/areas/surveys/surveys.d.ts +51 -0
- package/dist/areas/surveys/surveys.js +201 -0
- package/dist/areas/surveys/surveys.js.map +1 -0
- package/dist/browser/chromium.d.ts +15 -0
- package/dist/browser/chromium.js +53 -0
- package/dist/browser/chromium.js.map +1 -0
- package/dist/browser/cookies.d.ts +11 -0
- package/dist/browser/cookies.js +31 -0
- package/dist/browser/cookies.js.map +1 -0
- package/dist/browser/manager.d.ts +57 -0
- package/dist/browser/manager.js +177 -0
- package/dist/browser/manager.js.map +1 -0
- package/dist/browser.d.ts +53 -0
- package/dist/browser.js +167 -0
- package/dist/browser.js.map +1 -0
- package/dist/categories.d.ts +28 -0
- package/dist/categories.js +222 -0
- package/dist/categories.js.map +1 -0
- package/dist/chromiumInstaller.d.ts +15 -0
- package/dist/chromiumInstaller.js +52 -0
- package/dist/chromiumInstaller.js.map +1 -0
- package/dist/cli/args.d.ts +33 -0
- package/dist/cli/args.js +194 -0
- package/dist/cli/args.js.map +1 -0
- package/dist/cli/commands.generated.d.ts +4 -0
- package/dist/cli/commands.generated.js +2203 -0
- package/dist/cli/commands.generated.js.map +1 -0
- package/dist/cli/config.d.ts +46 -0
- package/dist/cli/config.js +107 -0
- package/dist/cli/config.js.map +1 -0
- package/dist/cli/main.d.ts +2 -0
- package/dist/cli/main.js +19 -0
- package/dist/cli/main.js.map +1 -0
- package/dist/cli/output.d.ts +4 -0
- package/dist/cli/output.js +71 -0
- package/dist/cli/output.js.map +1 -0
- package/dist/cli/run.d.ts +15 -0
- package/dist/cli/run.js +194 -0
- package/dist/cli/run.js.map +1 -0
- package/dist/cli/spec.d.ts +42 -0
- package/dist/cli/spec.js +4 -0
- package/dist/cli/spec.js.map +1 -0
- package/dist/client.d.ts +217 -0
- package/dist/client.js +179 -0
- package/dist/client.js.map +1 -0
- package/dist/core/ajax.d.ts +25 -0
- package/dist/core/ajax.js +85 -0
- package/dist/core/ajax.js.map +1 -0
- package/dist/core/editor.d.ts +18 -0
- package/dist/core/editor.js +51 -0
- package/dist/core/editor.js.map +1 -0
- package/dist/core/errors.d.ts +12 -0
- package/dist/core/errors.js +10 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/files.d.ts +16 -0
- package/dist/core/files.js +58 -0
- package/dist/core/files.js.map +1 -0
- package/dist/core/forms.d.ts +45 -0
- package/dist/core/forms.js +200 -0
- package/dist/core/forms.js.map +1 -0
- package/dist/core/http.d.ts +18 -0
- package/dist/core/http.js +22 -0
- package/dist/core/http.js.map +1 -0
- package/dist/core/inPage.d.ts +8 -0
- package/dist/core/inPage.js +10 -0
- package/dist/core/inPage.js.map +1 -0
- package/dist/core/login.d.ts +40 -0
- package/dist/core/login.js +83 -0
- package/dist/core/login.js.map +1 -0
- package/dist/core/pace.d.ts +4 -0
- package/dist/core/pace.js +21 -0
- package/dist/core/pace.js.map +1 -0
- package/dist/core/session.d.ts +55 -0
- package/dist/core/session.js +157 -0
- package/dist/core/session.js.map +1 -0
- package/dist/core/site.d.ts +8 -0
- package/dist/core/site.js +36 -0
- package/dist/core/site.js.map +1 -0
- package/dist/core/text.d.ts +21 -0
- package/dist/core/text.js +113 -0
- package/dist/core/text.js.map +1 -0
- package/dist/home.d.ts +19 -0
- package/dist/home.js +54 -0
- package/dist/home.js.map +1 -0
- package/dist/index.d.ts +40 -0
- package/dist/index.js +51 -0
- package/dist/index.js.map +1 -0
- package/dist/internals.d.ts +11 -0
- package/dist/internals.js +15 -0
- package/dist/internals.js.map +1 -0
- package/dist/moodle/activities.d.ts +94 -0
- package/dist/moodle/activities.js +240 -0
- package/dist/moodle/activities.js.map +1 -0
- package/dist/moodle/ajax.d.ts +22 -0
- package/dist/moodle/ajax.js +91 -0
- package/dist/moodle/ajax.js.map +1 -0
- package/dist/moodle/assign.d.ts +65 -0
- package/dist/moodle/assign.js +162 -0
- package/dist/moodle/assign.js.map +1 -0
- package/dist/moodle/calendar.d.ts +41 -0
- package/dist/moodle/calendar.js +80 -0
- package/dist/moodle/calendar.js.map +1 -0
- package/dist/moodle/choice.d.ts +33 -0
- package/dist/moodle/choice.js +100 -0
- package/dist/moodle/choice.js.map +1 -0
- package/dist/moodle/completion.d.ts +48 -0
- package/dist/moodle/completion.js +108 -0
- package/dist/moodle/completion.js.map +1 -0
- package/dist/moodle/content.d.ts +43 -0
- package/dist/moodle/content.js +105 -0
- package/dist/moodle/content.js.map +1 -0
- package/dist/moodle/course.d.ts +51 -0
- package/dist/moodle/course.js +45 -0
- package/dist/moodle/course.js.map +1 -0
- package/dist/moodle/courses.d.ts +57 -0
- package/dist/moodle/courses.js +70 -0
- package/dist/moodle/courses.js.map +1 -0
- package/dist/moodle/editor.d.ts +18 -0
- package/dist/moodle/editor.js +50 -0
- package/dist/moodle/editor.js.map +1 -0
- package/dist/moodle/files.d.ts +16 -0
- package/dist/moodle/files.js +57 -0
- package/dist/moodle/files.js.map +1 -0
- package/dist/moodle/forms.d.ts +44 -0
- package/dist/moodle/forms.js +199 -0
- package/dist/moodle/forms.js.map +1 -0
- package/dist/moodle/forum.d.ts +55 -0
- package/dist/moodle/forum.js +115 -0
- package/dist/moodle/forum.js.map +1 -0
- package/dist/moodle/forumPosts.d.ts +83 -0
- package/dist/moodle/forumPosts.js +113 -0
- package/dist/moodle/forumPosts.js.map +1 -0
- package/dist/moodle/gradebook.d.ts +102 -0
- package/dist/moodle/gradebook.js +246 -0
- package/dist/moodle/gradebook.js.map +1 -0
- package/dist/moodle/grades.d.ts +24 -0
- package/dist/moodle/grades.js +67 -0
- package/dist/moodle/grades.js.map +1 -0
- package/dist/moodle/grading.d.ts +92 -0
- package/dist/moodle/grading.js +161 -0
- package/dist/moodle/grading.js.map +1 -0
- package/dist/moodle/h5p.d.ts +31 -0
- package/dist/moodle/h5p.js +100 -0
- package/dist/moodle/h5p.js.map +1 -0
- package/dist/moodle/inPage.d.ts +8 -0
- package/dist/moodle/inPage.js +10 -0
- package/dist/moodle/inPage.js.map +1 -0
- package/dist/moodle/lesson.d.ts +57 -0
- package/dist/moodle/lesson.js +140 -0
- package/dist/moodle/lesson.js.map +1 -0
- package/dist/moodle/login.d.ts +37 -0
- package/dist/moodle/login.js +77 -0
- package/dist/moodle/login.js.map +1 -0
- package/dist/moodle/messages.d.ts +66 -0
- package/dist/moodle/messages.js +80 -0
- package/dist/moodle/messages.js.map +1 -0
- package/dist/moodle/overview.d.ts +83 -0
- package/dist/moodle/overview.js +137 -0
- package/dist/moodle/overview.js.map +1 -0
- package/dist/moodle/pace.d.ts +4 -0
- package/dist/moodle/pace.js +19 -0
- package/dist/moodle/pace.js.map +1 -0
- package/dist/moodle/participants.d.ts +55 -0
- package/dist/moodle/participants.js +131 -0
- package/dist/moodle/participants.js.map +1 -0
- package/dist/moodle/questionBank.d.ts +81 -0
- package/dist/moodle/questionBank.js +235 -0
- package/dist/moodle/questionBank.js.map +1 -0
- package/dist/moodle/quiz.d.ts +117 -0
- package/dist/moodle/quiz.js +291 -0
- package/dist/moodle/quiz.js.map +1 -0
- package/dist/moodle/quizResults.d.ts +36 -0
- package/dist/moodle/quizResults.js +93 -0
- package/dist/moodle/quizResults.js.map +1 -0
- package/dist/moodle/quizStructure.d.ts +42 -0
- package/dist/moodle/quizStructure.js +100 -0
- package/dist/moodle/quizStructure.js.map +1 -0
- package/dist/moodle/session.d.ts +39 -0
- package/dist/moodle/session.js +99 -0
- package/dist/moodle/session.js.map +1 -0
- package/dist/moodle/site.d.ts +8 -0
- package/dist/moodle/site.js +36 -0
- package/dist/moodle/site.js.map +1 -0
- package/dist/moodle/siteInfo.d.ts +25 -0
- package/dist/moodle/siteInfo.js +45 -0
- package/dist/moodle/siteInfo.js.map +1 -0
- package/dist/moodle/structure.d.ts +94 -0
- package/dist/moodle/structure.js +103 -0
- package/dist/moodle/structure.js.map +1 -0
- package/dist/moodle/submission.d.ts +48 -0
- package/dist/moodle/submission.js +109 -0
- package/dist/moodle/submission.js.map +1 -0
- package/dist/moodle/survey.d.ts +47 -0
- package/dist/moodle/survey.js +197 -0
- package/dist/moodle/survey.js.map +1 -0
- package/dist/moodle/text.d.ts +21 -0
- package/dist/moodle/text.js +113 -0
- package/dist/moodle/text.js.map +1 -0
- package/dist/moodle/user.d.ts +54 -0
- package/dist/moodle/user.js +78 -0
- package/dist/moodle/user.js.map +1 -0
- package/dist/options.d.ts +30 -0
- package/dist/options.js +35 -0
- package/dist/options.js.map +1 -0
- package/dist/sessionCookies.d.ts +11 -0
- package/dist/sessionCookies.js +31 -0
- package/dist/sessionCookies.js.map +1 -0
- package/dist/testing/fakeMoodle.d.ts +55 -0
- package/dist/testing/fakeMoodle.js +103 -0
- package/dist/testing/fakeMoodle.js.map +1 -0
- package/dist/testing/gradingPanel.d.ts +6 -0
- package/dist/testing/gradingPanel.js +22 -0
- package/dist/testing/gradingPanel.js.map +1 -0
- package/dist/testing/index.d.ts +5 -0
- package/dist/testing/index.js +18 -0
- package/dist/testing/index.js.map +1 -0
- package/package.json +77 -4
|
@@ -0,0 +1,2203 @@
|
|
|
1
|
+
export const COMMANDS = [
|
|
2
|
+
{
|
|
3
|
+
"name": "activitiesOverview",
|
|
4
|
+
"description": "Moodle 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.",
|
|
5
|
+
"params": [
|
|
6
|
+
{
|
|
7
|
+
"name": "courseId",
|
|
8
|
+
"optional": false,
|
|
9
|
+
"type": "number",
|
|
10
|
+
"value": {
|
|
11
|
+
"kind": "number"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"name": "type",
|
|
16
|
+
"optional": true,
|
|
17
|
+
"type": "string",
|
|
18
|
+
"value": {
|
|
19
|
+
"kind": "string"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "activityContent",
|
|
26
|
+
"description": "Reads 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.",
|
|
27
|
+
"params": [
|
|
28
|
+
{
|
|
29
|
+
"name": "activityId",
|
|
30
|
+
"optional": false,
|
|
31
|
+
"type": "number",
|
|
32
|
+
"value": {
|
|
33
|
+
"kind": "number"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": "type",
|
|
38
|
+
"optional": false,
|
|
39
|
+
"type": "\"url\" | \"page\" | \"book\" | \"label\" | \"resource\" | \"folder\"",
|
|
40
|
+
"value": {
|
|
41
|
+
"kind": "enum",
|
|
42
|
+
"values": [
|
|
43
|
+
"url",
|
|
44
|
+
"page",
|
|
45
|
+
"book",
|
|
46
|
+
"label",
|
|
47
|
+
"resource",
|
|
48
|
+
"folder"
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"options": {
|
|
54
|
+
"name": "options",
|
|
55
|
+
"optional": true,
|
|
56
|
+
"open": false,
|
|
57
|
+
"fields": [
|
|
58
|
+
{
|
|
59
|
+
"name": "trail",
|
|
60
|
+
"optional": true,
|
|
61
|
+
"type": "\"realistic\" | \"fast\"",
|
|
62
|
+
"value": {
|
|
63
|
+
"kind": "enum",
|
|
64
|
+
"values": [
|
|
65
|
+
"realistic",
|
|
66
|
+
"fast"
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"name": "activitySettings",
|
|
75
|
+
"description": "An activity's settings as its form holds them, without submitting it: its module, name and description, and every field by the name `updateActivity` takes in `settings`. Teachers only.",
|
|
76
|
+
"params": [
|
|
77
|
+
{
|
|
78
|
+
"name": "activityId",
|
|
79
|
+
"optional": false,
|
|
80
|
+
"type": "number",
|
|
81
|
+
"value": {
|
|
82
|
+
"kind": "number"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"name": "addGradeCategory",
|
|
89
|
+
"description": "Adds a grade category (at the course's top level, or inside `parentId`); returns it as the setup shows it.",
|
|
90
|
+
"params": [
|
|
91
|
+
{
|
|
92
|
+
"name": "courseId",
|
|
93
|
+
"optional": false,
|
|
94
|
+
"type": "number",
|
|
95
|
+
"value": {
|
|
96
|
+
"kind": "number"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
"options": {
|
|
101
|
+
"name": "options",
|
|
102
|
+
"optional": false,
|
|
103
|
+
"open": false,
|
|
104
|
+
"fields": [
|
|
105
|
+
{
|
|
106
|
+
"name": "name",
|
|
107
|
+
"optional": false,
|
|
108
|
+
"type": "string",
|
|
109
|
+
"value": {
|
|
110
|
+
"kind": "string"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"name": "aggregation",
|
|
115
|
+
"optional": true,
|
|
116
|
+
"type": "\"mean\" | \"median\" | \"lowest\" | \"highest\" | \"mode\" | \"weighted-mean\" | \"simple-weighted-mean\" | \"mean-with-extra-credits\" | \"natural\"",
|
|
117
|
+
"value": {
|
|
118
|
+
"kind": "enum",
|
|
119
|
+
"values": [
|
|
120
|
+
"mean",
|
|
121
|
+
"median",
|
|
122
|
+
"lowest",
|
|
123
|
+
"highest",
|
|
124
|
+
"mode",
|
|
125
|
+
"weighted-mean",
|
|
126
|
+
"simple-weighted-mean",
|
|
127
|
+
"mean-with-extra-credits",
|
|
128
|
+
"natural"
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"name": "parentId",
|
|
134
|
+
"optional": true,
|
|
135
|
+
"type": "number",
|
|
136
|
+
"value": {
|
|
137
|
+
"kind": "number"
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"name": "addQuestionsToQuiz",
|
|
145
|
+
"description": "Adds 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.",
|
|
146
|
+
"params": [
|
|
147
|
+
{
|
|
148
|
+
"name": "activityId",
|
|
149
|
+
"optional": false,
|
|
150
|
+
"type": "number",
|
|
151
|
+
"value": {
|
|
152
|
+
"kind": "number"
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
],
|
|
156
|
+
"options": {
|
|
157
|
+
"name": "options",
|
|
158
|
+
"optional": false,
|
|
159
|
+
"open": false,
|
|
160
|
+
"fields": [
|
|
161
|
+
{
|
|
162
|
+
"name": "questionIds",
|
|
163
|
+
"optional": true,
|
|
164
|
+
"type": "number[]",
|
|
165
|
+
"value": {
|
|
166
|
+
"kind": "numbers"
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"name": "random",
|
|
171
|
+
"optional": true,
|
|
172
|
+
"type": "{ categoryId: number; count: number; includeSubcategories?: boolean; }",
|
|
173
|
+
"value": {
|
|
174
|
+
"kind": "json"
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"name": "page",
|
|
179
|
+
"optional": true,
|
|
180
|
+
"type": "number",
|
|
181
|
+
"value": {
|
|
182
|
+
"kind": "number"
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
]
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"name": "addSection",
|
|
190
|
+
"description": "Adds a section after another one (at the end without it), named when a name is given.",
|
|
191
|
+
"params": [
|
|
192
|
+
{
|
|
193
|
+
"name": "courseId",
|
|
194
|
+
"optional": false,
|
|
195
|
+
"type": "number",
|
|
196
|
+
"value": {
|
|
197
|
+
"kind": "number"
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
],
|
|
201
|
+
"options": {
|
|
202
|
+
"name": "options",
|
|
203
|
+
"optional": true,
|
|
204
|
+
"open": false,
|
|
205
|
+
"fields": [
|
|
206
|
+
{
|
|
207
|
+
"name": "name",
|
|
208
|
+
"optional": true,
|
|
209
|
+
"type": "string",
|
|
210
|
+
"value": {
|
|
211
|
+
"kind": "string"
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"name": "afterSectionId",
|
|
216
|
+
"optional": true,
|
|
217
|
+
"type": "number",
|
|
218
|
+
"value": {
|
|
219
|
+
"kind": "number"
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
]
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"name": "answerChoice",
|
|
227
|
+
"description": "Answers a choice with one option (several where it allows them) by id, as \"Save my choice\" does; returns the choice afterwards.",
|
|
228
|
+
"params": [
|
|
229
|
+
{
|
|
230
|
+
"name": "activityId",
|
|
231
|
+
"optional": false,
|
|
232
|
+
"type": "number",
|
|
233
|
+
"value": {
|
|
234
|
+
"kind": "number"
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"name": "optionIds",
|
|
239
|
+
"optional": false,
|
|
240
|
+
"type": "number[]",
|
|
241
|
+
"value": {
|
|
242
|
+
"kind": "numbers"
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
]
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"name": "answerLessonPage",
|
|
249
|
+
"description": "Answers 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).",
|
|
250
|
+
"params": [
|
|
251
|
+
{
|
|
252
|
+
"name": "activityId",
|
|
253
|
+
"optional": false,
|
|
254
|
+
"type": "number",
|
|
255
|
+
"value": {
|
|
256
|
+
"kind": "number"
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"name": "answer",
|
|
261
|
+
"optional": false,
|
|
262
|
+
"type": "{ button?: string | number; responses?: Record<string, string>; }",
|
|
263
|
+
"value": {
|
|
264
|
+
"kind": "json"
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
],
|
|
268
|
+
"options": {
|
|
269
|
+
"name": "options",
|
|
270
|
+
"optional": true,
|
|
271
|
+
"open": false,
|
|
272
|
+
"fields": [
|
|
273
|
+
{
|
|
274
|
+
"name": "trail",
|
|
275
|
+
"optional": true,
|
|
276
|
+
"type": "\"realistic\" | \"fast\"",
|
|
277
|
+
"value": {
|
|
278
|
+
"kind": "enum",
|
|
279
|
+
"values": [
|
|
280
|
+
"realistic",
|
|
281
|
+
"fast"
|
|
282
|
+
]
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
]
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"name": "answerQuizQuestions",
|
|
290
|
+
"description": "Saves 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.",
|
|
291
|
+
"params": [
|
|
292
|
+
{
|
|
293
|
+
"name": "attemptId",
|
|
294
|
+
"optional": false,
|
|
295
|
+
"type": "number",
|
|
296
|
+
"value": {
|
|
297
|
+
"kind": "number"
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"name": "answers",
|
|
302
|
+
"optional": false,
|
|
303
|
+
"type": "{ slot: number; responses: Record<string, string>; }[]",
|
|
304
|
+
"value": {
|
|
305
|
+
"kind": "json"
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
],
|
|
309
|
+
"options": {
|
|
310
|
+
"name": "options",
|
|
311
|
+
"optional": true,
|
|
312
|
+
"open": false,
|
|
313
|
+
"fields": [
|
|
314
|
+
{
|
|
315
|
+
"name": "trail",
|
|
316
|
+
"optional": true,
|
|
317
|
+
"type": "\"realistic\" | \"fast\"",
|
|
318
|
+
"value": {
|
|
319
|
+
"kind": "enum",
|
|
320
|
+
"values": [
|
|
321
|
+
"realistic",
|
|
322
|
+
"fast"
|
|
323
|
+
]
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
]
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
"name": "assignmentSubmissions",
|
|
331
|
+
"description": "Every participant's submission to an assignment, with its content unless `includeContent` is false.",
|
|
332
|
+
"params": [
|
|
333
|
+
{
|
|
334
|
+
"name": "activityId",
|
|
335
|
+
"optional": false,
|
|
336
|
+
"type": "number",
|
|
337
|
+
"value": {
|
|
338
|
+
"kind": "number"
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
],
|
|
342
|
+
"options": {
|
|
343
|
+
"name": "options",
|
|
344
|
+
"optional": true,
|
|
345
|
+
"open": false,
|
|
346
|
+
"fields": [
|
|
347
|
+
{
|
|
348
|
+
"name": "includeContent",
|
|
349
|
+
"optional": true,
|
|
350
|
+
"type": "boolean",
|
|
351
|
+
"value": {
|
|
352
|
+
"kind": "boolean"
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
]
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
"name": "callService",
|
|
360
|
+
"description": "Calls one of Moodle's AJAX services as the logged-in person.",
|
|
361
|
+
"params": [
|
|
362
|
+
{
|
|
363
|
+
"name": "methodname",
|
|
364
|
+
"optional": false,
|
|
365
|
+
"type": "string",
|
|
366
|
+
"value": {
|
|
367
|
+
"kind": "string"
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
],
|
|
371
|
+
"options": {
|
|
372
|
+
"name": "args",
|
|
373
|
+
"optional": false,
|
|
374
|
+
"open": true,
|
|
375
|
+
"fields": []
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
"name": "completionReport",
|
|
380
|
+
"description": "A course's progress report: every participant's completion of every activity that tracks it, page by page, in one group when given. People come as user id and full name only.",
|
|
381
|
+
"params": [
|
|
382
|
+
{
|
|
383
|
+
"name": "courseId",
|
|
384
|
+
"optional": false,
|
|
385
|
+
"type": "number",
|
|
386
|
+
"value": {
|
|
387
|
+
"kind": "number"
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
],
|
|
391
|
+
"options": {
|
|
392
|
+
"name": "options",
|
|
393
|
+
"optional": true,
|
|
394
|
+
"open": false,
|
|
395
|
+
"fields": [
|
|
396
|
+
{
|
|
397
|
+
"name": "group",
|
|
398
|
+
"optional": true,
|
|
399
|
+
"type": "number",
|
|
400
|
+
"value": {
|
|
401
|
+
"kind": "number"
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
]
|
|
405
|
+
}
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
"name": "conversation",
|
|
409
|
+
"description": "A conversation's members and messages, oldest first, as text.",
|
|
410
|
+
"params": [
|
|
411
|
+
{
|
|
412
|
+
"name": "conversationId",
|
|
413
|
+
"optional": false,
|
|
414
|
+
"type": "number",
|
|
415
|
+
"value": {
|
|
416
|
+
"kind": "number"
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
]
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
"name": "conversations",
|
|
423
|
+
"description": "The person's conversations, latest first, with their last message as text.",
|
|
424
|
+
"params": []
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
"name": "courseAbilities",
|
|
428
|
+
"description": "What 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.",
|
|
429
|
+
"params": [
|
|
430
|
+
{
|
|
431
|
+
"name": "courseId",
|
|
432
|
+
"optional": false,
|
|
433
|
+
"type": "number",
|
|
434
|
+
"value": {
|
|
435
|
+
"kind": "number"
|
|
436
|
+
}
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
"name": "sectionId",
|
|
440
|
+
"optional": false,
|
|
441
|
+
"type": "number",
|
|
442
|
+
"value": {
|
|
443
|
+
"kind": "number"
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
]
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
"name": "courseActivityTypes",
|
|
450
|
+
"description": "The activity and resource types the person can add to a course: none when they can't edit it.",
|
|
451
|
+
"params": [
|
|
452
|
+
{
|
|
453
|
+
"name": "courseId",
|
|
454
|
+
"optional": false,
|
|
455
|
+
"type": "number",
|
|
456
|
+
"value": {
|
|
457
|
+
"kind": "number"
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
]
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
"name": "courseRoles",
|
|
464
|
+
"description": "A user's roles in a course, from their profile there: role links carry the role id in any language.",
|
|
465
|
+
"params": [
|
|
466
|
+
{
|
|
467
|
+
"name": "userId",
|
|
468
|
+
"optional": false,
|
|
469
|
+
"type": "number",
|
|
470
|
+
"value": {
|
|
471
|
+
"kind": "number"
|
|
472
|
+
}
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
"name": "courseId",
|
|
476
|
+
"optional": false,
|
|
477
|
+
"type": "number",
|
|
478
|
+
"value": {
|
|
479
|
+
"kind": "number"
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
]
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
"name": "courseStructure",
|
|
486
|
+
"description": "A course's sections and activities; with `details`, each activity's dates and restriction from the course page (slower).",
|
|
487
|
+
"params": [
|
|
488
|
+
{
|
|
489
|
+
"name": "courseId",
|
|
490
|
+
"optional": false,
|
|
491
|
+
"type": "number",
|
|
492
|
+
"value": {
|
|
493
|
+
"kind": "number"
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
],
|
|
497
|
+
"options": {
|
|
498
|
+
"name": "options",
|
|
499
|
+
"optional": true,
|
|
500
|
+
"open": false,
|
|
501
|
+
"fields": [
|
|
502
|
+
{
|
|
503
|
+
"name": "details",
|
|
504
|
+
"optional": true,
|
|
505
|
+
"type": "boolean",
|
|
506
|
+
"value": {
|
|
507
|
+
"kind": "boolean"
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
]
|
|
511
|
+
}
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
"name": "courseUpdates",
|
|
515
|
+
"description": "What changed in a course's activities since a date, with their names from the course's state.",
|
|
516
|
+
"params": [
|
|
517
|
+
{
|
|
518
|
+
"name": "courseId",
|
|
519
|
+
"optional": false,
|
|
520
|
+
"type": "number",
|
|
521
|
+
"value": {
|
|
522
|
+
"kind": "number"
|
|
523
|
+
}
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
"name": "since",
|
|
527
|
+
"optional": false,
|
|
528
|
+
"type": "Date",
|
|
529
|
+
"value": {
|
|
530
|
+
"kind": "date"
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
]
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
"name": "createActivity",
|
|
537
|
+
"description": "Creates 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.",
|
|
538
|
+
"params": [
|
|
539
|
+
{
|
|
540
|
+
"name": "input",
|
|
541
|
+
"optional": false,
|
|
542
|
+
"type": "ActivityFields & { courseId: number; sectionId: number; type: string; files?: string[]; }",
|
|
543
|
+
"value": {
|
|
544
|
+
"kind": "json"
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
]
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
"name": "createEvent",
|
|
551
|
+
"description": "Creates 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.",
|
|
552
|
+
"params": [],
|
|
553
|
+
"options": {
|
|
554
|
+
"name": "options",
|
|
555
|
+
"optional": false,
|
|
556
|
+
"open": false,
|
|
557
|
+
"fields": [
|
|
558
|
+
{
|
|
559
|
+
"name": "courseId",
|
|
560
|
+
"optional": false,
|
|
561
|
+
"type": "number",
|
|
562
|
+
"value": {
|
|
563
|
+
"kind": "number"
|
|
564
|
+
}
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
"name": "name",
|
|
568
|
+
"optional": false,
|
|
569
|
+
"type": "string",
|
|
570
|
+
"value": {
|
|
571
|
+
"kind": "string"
|
|
572
|
+
}
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
"name": "start",
|
|
576
|
+
"optional": false,
|
|
577
|
+
"type": "Date",
|
|
578
|
+
"value": {
|
|
579
|
+
"kind": "date"
|
|
580
|
+
}
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
"name": "durationMinutes",
|
|
584
|
+
"optional": true,
|
|
585
|
+
"type": "number",
|
|
586
|
+
"value": {
|
|
587
|
+
"kind": "number"
|
|
588
|
+
}
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
"name": "description",
|
|
592
|
+
"optional": true,
|
|
593
|
+
"type": "string",
|
|
594
|
+
"value": {
|
|
595
|
+
"kind": "string"
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
]
|
|
599
|
+
}
|
|
600
|
+
},
|
|
601
|
+
{
|
|
602
|
+
"name": "createQuestion",
|
|
603
|
+
"description": "Creates 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.",
|
|
604
|
+
"params": [
|
|
605
|
+
{
|
|
606
|
+
"name": "activityId",
|
|
607
|
+
"optional": false,
|
|
608
|
+
"type": "number",
|
|
609
|
+
"value": {
|
|
610
|
+
"kind": "number"
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
],
|
|
614
|
+
"options": {
|
|
615
|
+
"name": "input",
|
|
616
|
+
"optional": false,
|
|
617
|
+
"open": false,
|
|
618
|
+
"fields": [
|
|
619
|
+
{
|
|
620
|
+
"name": "type",
|
|
621
|
+
"optional": false,
|
|
622
|
+
"type": "\"multichoice\" | \"truefalse\" | \"shortanswer\" | \"numerical\" | \"essay\"",
|
|
623
|
+
"value": {
|
|
624
|
+
"kind": "enum",
|
|
625
|
+
"values": [
|
|
626
|
+
"multichoice",
|
|
627
|
+
"truefalse",
|
|
628
|
+
"shortanswer",
|
|
629
|
+
"numerical",
|
|
630
|
+
"essay"
|
|
631
|
+
]
|
|
632
|
+
}
|
|
633
|
+
},
|
|
634
|
+
{
|
|
635
|
+
"name": "name",
|
|
636
|
+
"optional": false,
|
|
637
|
+
"type": "string",
|
|
638
|
+
"value": {
|
|
639
|
+
"kind": "string"
|
|
640
|
+
}
|
|
641
|
+
},
|
|
642
|
+
{
|
|
643
|
+
"name": "text",
|
|
644
|
+
"optional": false,
|
|
645
|
+
"type": "string",
|
|
646
|
+
"value": {
|
|
647
|
+
"kind": "string"
|
|
648
|
+
},
|
|
649
|
+
"description": "The question's text (HTML)."
|
|
650
|
+
},
|
|
651
|
+
{
|
|
652
|
+
"name": "answers",
|
|
653
|
+
"optional": true,
|
|
654
|
+
"type": "{ text: string; fraction: number; feedback?: string; tolerance?: number; }[]",
|
|
655
|
+
"value": {
|
|
656
|
+
"kind": "json"
|
|
657
|
+
},
|
|
658
|
+
"description": "Multichoice, short answer and numerical answers: a fraction of the mark (1 right, 0 wrong, negatives for penalties), the nearest one Moodle offers."
|
|
659
|
+
},
|
|
660
|
+
{
|
|
661
|
+
"name": "correct",
|
|
662
|
+
"optional": true,
|
|
663
|
+
"type": "boolean",
|
|
664
|
+
"value": {
|
|
665
|
+
"kind": "boolean"
|
|
666
|
+
},
|
|
667
|
+
"description": "True/false: the right answer."
|
|
668
|
+
},
|
|
669
|
+
{
|
|
670
|
+
"name": "categoryId",
|
|
671
|
+
"optional": true,
|
|
672
|
+
"type": "number",
|
|
673
|
+
"value": {
|
|
674
|
+
"kind": "number"
|
|
675
|
+
}
|
|
676
|
+
},
|
|
677
|
+
{
|
|
678
|
+
"name": "defaultMark",
|
|
679
|
+
"optional": true,
|
|
680
|
+
"type": "number",
|
|
681
|
+
"value": {
|
|
682
|
+
"kind": "number"
|
|
683
|
+
}
|
|
684
|
+
},
|
|
685
|
+
{
|
|
686
|
+
"name": "fields",
|
|
687
|
+
"optional": true,
|
|
688
|
+
"type": "Record<string, FieldValue>",
|
|
689
|
+
"value": {
|
|
690
|
+
"kind": "json"
|
|
691
|
+
},
|
|
692
|
+
"description": "Any other field of the type's form, by name."
|
|
693
|
+
}
|
|
694
|
+
]
|
|
695
|
+
}
|
|
696
|
+
},
|
|
697
|
+
{
|
|
698
|
+
"name": "deadlines",
|
|
699
|
+
"description": "What 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.",
|
|
700
|
+
"params": [],
|
|
701
|
+
"options": {
|
|
702
|
+
"name": "options",
|
|
703
|
+
"optional": true,
|
|
704
|
+
"open": false,
|
|
705
|
+
"fields": [
|
|
706
|
+
{
|
|
707
|
+
"name": "courseId",
|
|
708
|
+
"optional": true,
|
|
709
|
+
"type": "number",
|
|
710
|
+
"value": {
|
|
711
|
+
"kind": "number"
|
|
712
|
+
}
|
|
713
|
+
},
|
|
714
|
+
{
|
|
715
|
+
"name": "days",
|
|
716
|
+
"optional": true,
|
|
717
|
+
"type": "number",
|
|
718
|
+
"value": {
|
|
719
|
+
"kind": "number"
|
|
720
|
+
}
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
"name": "pastDays",
|
|
724
|
+
"optional": true,
|
|
725
|
+
"type": "number",
|
|
726
|
+
"value": {
|
|
727
|
+
"kind": "number"
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
]
|
|
731
|
+
}
|
|
732
|
+
},
|
|
733
|
+
{
|
|
734
|
+
"name": "deleteActivity",
|
|
735
|
+
"description": "Deletes an activity, with its participants' data (submissions, posts, attempts); gives the course afterwards.",
|
|
736
|
+
"params": [
|
|
737
|
+
{
|
|
738
|
+
"name": "courseId",
|
|
739
|
+
"optional": false,
|
|
740
|
+
"type": "number",
|
|
741
|
+
"value": {
|
|
742
|
+
"kind": "number"
|
|
743
|
+
}
|
|
744
|
+
},
|
|
745
|
+
{
|
|
746
|
+
"name": "activityId",
|
|
747
|
+
"optional": false,
|
|
748
|
+
"type": "number",
|
|
749
|
+
"value": {
|
|
750
|
+
"kind": "number"
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
]
|
|
754
|
+
},
|
|
755
|
+
{
|
|
756
|
+
"name": "deleteEvent",
|
|
757
|
+
"description": "Deletes a calendar event the person can manage.",
|
|
758
|
+
"params": [
|
|
759
|
+
{
|
|
760
|
+
"name": "eventId",
|
|
761
|
+
"optional": false,
|
|
762
|
+
"type": "number",
|
|
763
|
+
"value": {
|
|
764
|
+
"kind": "number"
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
]
|
|
768
|
+
},
|
|
769
|
+
{
|
|
770
|
+
"name": "deleteSection",
|
|
771
|
+
"description": "Deletes a section and every activity in it, with their participants' data.",
|
|
772
|
+
"params": [
|
|
773
|
+
{
|
|
774
|
+
"name": "courseId",
|
|
775
|
+
"optional": false,
|
|
776
|
+
"type": "number",
|
|
777
|
+
"value": {
|
|
778
|
+
"kind": "number"
|
|
779
|
+
}
|
|
780
|
+
},
|
|
781
|
+
{
|
|
782
|
+
"name": "sectionId",
|
|
783
|
+
"optional": false,
|
|
784
|
+
"type": "number",
|
|
785
|
+
"value": {
|
|
786
|
+
"kind": "number"
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
]
|
|
790
|
+
},
|
|
791
|
+
{
|
|
792
|
+
"name": "discussion",
|
|
793
|
+
"description": "A discussion's posts, oldest first, with their messages as text.",
|
|
794
|
+
"params": [
|
|
795
|
+
{
|
|
796
|
+
"name": "discussionId",
|
|
797
|
+
"optional": false,
|
|
798
|
+
"type": "number",
|
|
799
|
+
"value": {
|
|
800
|
+
"kind": "number"
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
]
|
|
804
|
+
},
|
|
805
|
+
{
|
|
806
|
+
"name": "downloadFile",
|
|
807
|
+
"description": "Saves 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).",
|
|
808
|
+
"params": [
|
|
809
|
+
{
|
|
810
|
+
"name": "url",
|
|
811
|
+
"optional": false,
|
|
812
|
+
"type": "string",
|
|
813
|
+
"value": {
|
|
814
|
+
"kind": "string"
|
|
815
|
+
}
|
|
816
|
+
},
|
|
817
|
+
{
|
|
818
|
+
"name": "destDir",
|
|
819
|
+
"optional": true,
|
|
820
|
+
"type": "string",
|
|
821
|
+
"value": {
|
|
822
|
+
"kind": "string"
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
]
|
|
826
|
+
},
|
|
827
|
+
{
|
|
828
|
+
"name": "duplicateActivity",
|
|
829
|
+
"description": "Duplicates an activity as the course page's \"Duplicate\" does (right after it, named with \"(copy)\"); gives the copy's id and the course afterwards.",
|
|
830
|
+
"params": [
|
|
831
|
+
{
|
|
832
|
+
"name": "courseId",
|
|
833
|
+
"optional": false,
|
|
834
|
+
"type": "number",
|
|
835
|
+
"value": {
|
|
836
|
+
"kind": "number"
|
|
837
|
+
}
|
|
838
|
+
},
|
|
839
|
+
{
|
|
840
|
+
"name": "activityId",
|
|
841
|
+
"optional": false,
|
|
842
|
+
"type": "number",
|
|
843
|
+
"value": {
|
|
844
|
+
"kind": "number"
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
]
|
|
848
|
+
},
|
|
849
|
+
{
|
|
850
|
+
"name": "editActivity",
|
|
851
|
+
"description": "Renames, shows or hides, or moves an activity (to a section's end, or before another one).",
|
|
852
|
+
"params": [
|
|
853
|
+
{
|
|
854
|
+
"name": "courseId",
|
|
855
|
+
"optional": false,
|
|
856
|
+
"type": "number",
|
|
857
|
+
"value": {
|
|
858
|
+
"kind": "number"
|
|
859
|
+
}
|
|
860
|
+
},
|
|
861
|
+
{
|
|
862
|
+
"name": "activityId",
|
|
863
|
+
"optional": false,
|
|
864
|
+
"type": "number",
|
|
865
|
+
"value": {
|
|
866
|
+
"kind": "number"
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
],
|
|
870
|
+
"options": {
|
|
871
|
+
"name": "options",
|
|
872
|
+
"optional": false,
|
|
873
|
+
"open": false,
|
|
874
|
+
"fields": [
|
|
875
|
+
{
|
|
876
|
+
"name": "name",
|
|
877
|
+
"optional": true,
|
|
878
|
+
"type": "string",
|
|
879
|
+
"value": {
|
|
880
|
+
"kind": "string"
|
|
881
|
+
}
|
|
882
|
+
},
|
|
883
|
+
{
|
|
884
|
+
"name": "visibility",
|
|
885
|
+
"optional": true,
|
|
886
|
+
"type": "\"shown\" | \"hidden\" | \"stealth\"",
|
|
887
|
+
"value": {
|
|
888
|
+
"kind": "enum",
|
|
889
|
+
"values": [
|
|
890
|
+
"shown",
|
|
891
|
+
"hidden",
|
|
892
|
+
"stealth"
|
|
893
|
+
]
|
|
894
|
+
}
|
|
895
|
+
},
|
|
896
|
+
{
|
|
897
|
+
"name": "sectionId",
|
|
898
|
+
"optional": true,
|
|
899
|
+
"type": "number",
|
|
900
|
+
"value": {
|
|
901
|
+
"kind": "number"
|
|
902
|
+
}
|
|
903
|
+
},
|
|
904
|
+
{
|
|
905
|
+
"name": "beforeActivityId",
|
|
906
|
+
"optional": true,
|
|
907
|
+
"type": "number",
|
|
908
|
+
"value": {
|
|
909
|
+
"kind": "number"
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
]
|
|
913
|
+
}
|
|
914
|
+
},
|
|
915
|
+
{
|
|
916
|
+
"name": "editSection",
|
|
917
|
+
"description": "Renames, shows or hides, or moves a section after another one.",
|
|
918
|
+
"params": [
|
|
919
|
+
{
|
|
920
|
+
"name": "courseId",
|
|
921
|
+
"optional": false,
|
|
922
|
+
"type": "number",
|
|
923
|
+
"value": {
|
|
924
|
+
"kind": "number"
|
|
925
|
+
}
|
|
926
|
+
},
|
|
927
|
+
{
|
|
928
|
+
"name": "sectionId",
|
|
929
|
+
"optional": false,
|
|
930
|
+
"type": "number",
|
|
931
|
+
"value": {
|
|
932
|
+
"kind": "number"
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
],
|
|
936
|
+
"options": {
|
|
937
|
+
"name": "options",
|
|
938
|
+
"optional": false,
|
|
939
|
+
"open": false,
|
|
940
|
+
"fields": [
|
|
941
|
+
{
|
|
942
|
+
"name": "name",
|
|
943
|
+
"optional": true,
|
|
944
|
+
"type": "string",
|
|
945
|
+
"value": {
|
|
946
|
+
"kind": "string"
|
|
947
|
+
}
|
|
948
|
+
},
|
|
949
|
+
{
|
|
950
|
+
"name": "visible",
|
|
951
|
+
"optional": true,
|
|
952
|
+
"type": "boolean",
|
|
953
|
+
"value": {
|
|
954
|
+
"kind": "boolean"
|
|
955
|
+
}
|
|
956
|
+
},
|
|
957
|
+
{
|
|
958
|
+
"name": "afterSectionId",
|
|
959
|
+
"optional": true,
|
|
960
|
+
"type": "number",
|
|
961
|
+
"value": {
|
|
962
|
+
"kind": "number"
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
]
|
|
966
|
+
}
|
|
967
|
+
},
|
|
968
|
+
{
|
|
969
|
+
"name": "finishQuizAttempt",
|
|
970
|
+
"description": "Submits an attempt for grading, and gives its review when the quiz shows it.",
|
|
971
|
+
"params": [
|
|
972
|
+
{
|
|
973
|
+
"name": "attemptId",
|
|
974
|
+
"optional": false,
|
|
975
|
+
"type": "number",
|
|
976
|
+
"value": {
|
|
977
|
+
"kind": "number"
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
]
|
|
981
|
+
},
|
|
982
|
+
{
|
|
983
|
+
"name": "forumDiscussions",
|
|
984
|
+
"description": "A forum's discussions, as its page lists them: who started each, replies, last post.",
|
|
985
|
+
"params": [
|
|
986
|
+
{
|
|
987
|
+
"name": "activityId",
|
|
988
|
+
"optional": false,
|
|
989
|
+
"type": "number",
|
|
990
|
+
"value": {
|
|
991
|
+
"kind": "number"
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
]
|
|
995
|
+
},
|
|
996
|
+
{
|
|
997
|
+
"name": "getChoice",
|
|
998
|
+
"description": "A choice: its options, whether it can be answered or changed, and the person's answer.",
|
|
999
|
+
"params": [
|
|
1000
|
+
{
|
|
1001
|
+
"name": "activityId",
|
|
1002
|
+
"optional": false,
|
|
1003
|
+
"type": "number",
|
|
1004
|
+
"value": {
|
|
1005
|
+
"kind": "number"
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
]
|
|
1009
|
+
},
|
|
1010
|
+
{
|
|
1011
|
+
"name": "getSurvey",
|
|
1012
|
+
"description": "A 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.",
|
|
1013
|
+
"params": [
|
|
1014
|
+
{
|
|
1015
|
+
"name": "activityId",
|
|
1016
|
+
"optional": false,
|
|
1017
|
+
"type": "number",
|
|
1018
|
+
"value": {
|
|
1019
|
+
"kind": "number"
|
|
1020
|
+
}
|
|
1021
|
+
},
|
|
1022
|
+
{
|
|
1023
|
+
"name": "type",
|
|
1024
|
+
"optional": true,
|
|
1025
|
+
"type": "SurveyType",
|
|
1026
|
+
"value": {
|
|
1027
|
+
"kind": "enum",
|
|
1028
|
+
"values": [
|
|
1029
|
+
"questionnaire",
|
|
1030
|
+
"feedback"
|
|
1031
|
+
]
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
]
|
|
1035
|
+
},
|
|
1036
|
+
{
|
|
1037
|
+
"name": "gradeSubmission",
|
|
1038
|
+
"description": "Grades 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), 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.",
|
|
1039
|
+
"params": [
|
|
1040
|
+
{
|
|
1041
|
+
"name": "activityId",
|
|
1042
|
+
"optional": false,
|
|
1043
|
+
"type": "number",
|
|
1044
|
+
"value": {
|
|
1045
|
+
"kind": "number"
|
|
1046
|
+
}
|
|
1047
|
+
},
|
|
1048
|
+
{
|
|
1049
|
+
"name": "userId",
|
|
1050
|
+
"optional": false,
|
|
1051
|
+
"type": "number",
|
|
1052
|
+
"value": {
|
|
1053
|
+
"kind": "number"
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
],
|
|
1057
|
+
"options": {
|
|
1058
|
+
"name": "options",
|
|
1059
|
+
"optional": false,
|
|
1060
|
+
"open": false,
|
|
1061
|
+
"fields": [
|
|
1062
|
+
{
|
|
1063
|
+
"name": "grade",
|
|
1064
|
+
"optional": true,
|
|
1065
|
+
"type": "string | number",
|
|
1066
|
+
"value": {
|
|
1067
|
+
"kind": "string"
|
|
1068
|
+
}
|
|
1069
|
+
},
|
|
1070
|
+
{
|
|
1071
|
+
"name": "rubric",
|
|
1072
|
+
"optional": true,
|
|
1073
|
+
"type": "Record<number, number>",
|
|
1074
|
+
"value": {
|
|
1075
|
+
"kind": "json"
|
|
1076
|
+
},
|
|
1077
|
+
"description": "Criterion id → level id."
|
|
1078
|
+
},
|
|
1079
|
+
{
|
|
1080
|
+
"name": "guide",
|
|
1081
|
+
"optional": true,
|
|
1082
|
+
"type": "Record<number, number>",
|
|
1083
|
+
"value": {
|
|
1084
|
+
"kind": "json"
|
|
1085
|
+
},
|
|
1086
|
+
"description": "Criterion id → score."
|
|
1087
|
+
},
|
|
1088
|
+
{
|
|
1089
|
+
"name": "remarks",
|
|
1090
|
+
"optional": true,
|
|
1091
|
+
"type": "Record<number, string>",
|
|
1092
|
+
"value": {
|
|
1093
|
+
"kind": "json"
|
|
1094
|
+
},
|
|
1095
|
+
"description": "Criterion id → remark, for a rubric or a guide."
|
|
1096
|
+
},
|
|
1097
|
+
{
|
|
1098
|
+
"name": "feedback",
|
|
1099
|
+
"optional": true,
|
|
1100
|
+
"type": "string",
|
|
1101
|
+
"value": {
|
|
1102
|
+
"kind": "string"
|
|
1103
|
+
}
|
|
1104
|
+
},
|
|
1105
|
+
{
|
|
1106
|
+
"name": "notify",
|
|
1107
|
+
"optional": true,
|
|
1108
|
+
"type": "boolean",
|
|
1109
|
+
"value": {
|
|
1110
|
+
"kind": "boolean"
|
|
1111
|
+
}
|
|
1112
|
+
},
|
|
1113
|
+
{
|
|
1114
|
+
"name": "fields",
|
|
1115
|
+
"optional": true,
|
|
1116
|
+
"type": "Record<string, FieldValue>",
|
|
1117
|
+
"value": {
|
|
1118
|
+
"kind": "json"
|
|
1119
|
+
}
|
|
1120
|
+
}
|
|
1121
|
+
]
|
|
1122
|
+
}
|
|
1123
|
+
},
|
|
1124
|
+
{
|
|
1125
|
+
"name": "gradebookSetup",
|
|
1126
|
+
"description": "A course's gradebook setup: its categories (aggregation, weights) and grade items (category, maximum, weight).",
|
|
1127
|
+
"params": [
|
|
1128
|
+
{
|
|
1129
|
+
"name": "courseId",
|
|
1130
|
+
"optional": false,
|
|
1131
|
+
"type": "number",
|
|
1132
|
+
"value": {
|
|
1133
|
+
"kind": "number"
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
]
|
|
1137
|
+
},
|
|
1138
|
+
{
|
|
1139
|
+
"name": "graderReport",
|
|
1140
|
+
"description": "Everyone's grades in a course as the grader report shows them, page by page, in one group when given. People come as user id and full name only.",
|
|
1141
|
+
"params": [
|
|
1142
|
+
{
|
|
1143
|
+
"name": "courseId",
|
|
1144
|
+
"optional": false,
|
|
1145
|
+
"type": "number",
|
|
1146
|
+
"value": {
|
|
1147
|
+
"kind": "number"
|
|
1148
|
+
}
|
|
1149
|
+
}
|
|
1150
|
+
],
|
|
1151
|
+
"options": {
|
|
1152
|
+
"name": "options",
|
|
1153
|
+
"optional": true,
|
|
1154
|
+
"open": false,
|
|
1155
|
+
"fields": [
|
|
1156
|
+
{
|
|
1157
|
+
"name": "group",
|
|
1158
|
+
"optional": true,
|
|
1159
|
+
"type": "number",
|
|
1160
|
+
"value": {
|
|
1161
|
+
"kind": "number"
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
]
|
|
1165
|
+
}
|
|
1166
|
+
},
|
|
1167
|
+
{
|
|
1168
|
+
"name": "grantExtension",
|
|
1169
|
+
"description": "Grants 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.",
|
|
1170
|
+
"params": [
|
|
1171
|
+
{
|
|
1172
|
+
"name": "activityId",
|
|
1173
|
+
"optional": false,
|
|
1174
|
+
"type": "number",
|
|
1175
|
+
"value": {
|
|
1176
|
+
"kind": "number"
|
|
1177
|
+
}
|
|
1178
|
+
},
|
|
1179
|
+
{
|
|
1180
|
+
"name": "userIds",
|
|
1181
|
+
"optional": false,
|
|
1182
|
+
"type": "number[]",
|
|
1183
|
+
"value": {
|
|
1184
|
+
"kind": "numbers"
|
|
1185
|
+
}
|
|
1186
|
+
},
|
|
1187
|
+
{
|
|
1188
|
+
"name": "until",
|
|
1189
|
+
"optional": false,
|
|
1190
|
+
"type": "Date",
|
|
1191
|
+
"value": {
|
|
1192
|
+
"kind": "date"
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
]
|
|
1196
|
+
},
|
|
1197
|
+
{
|
|
1198
|
+
"name": "groups",
|
|
1199
|
+
"description": "A course's groups the person can see, with their members' user ids.",
|
|
1200
|
+
"params": [
|
|
1201
|
+
{
|
|
1202
|
+
"name": "courseId",
|
|
1203
|
+
"optional": false,
|
|
1204
|
+
"type": "number",
|
|
1205
|
+
"value": {
|
|
1206
|
+
"kind": "number"
|
|
1207
|
+
}
|
|
1208
|
+
}
|
|
1209
|
+
]
|
|
1210
|
+
},
|
|
1211
|
+
{
|
|
1212
|
+
"name": "h5pActivity",
|
|
1213
|
+
"description": "An H5P activity: its content type, whether attempts are tracked, and the person's attempts with their scores.",
|
|
1214
|
+
"params": [
|
|
1215
|
+
{
|
|
1216
|
+
"name": "activityId",
|
|
1217
|
+
"optional": false,
|
|
1218
|
+
"type": "number",
|
|
1219
|
+
"value": {
|
|
1220
|
+
"kind": "number"
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1223
|
+
]
|
|
1224
|
+
},
|
|
1225
|
+
{
|
|
1226
|
+
"name": "importQuestions",
|
|
1227
|
+
"description": "Imports 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.",
|
|
1228
|
+
"params": [
|
|
1229
|
+
{
|
|
1230
|
+
"name": "activityId",
|
|
1231
|
+
"optional": false,
|
|
1232
|
+
"type": "number",
|
|
1233
|
+
"value": {
|
|
1234
|
+
"kind": "number"
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
|
+
],
|
|
1238
|
+
"options": {
|
|
1239
|
+
"name": "options",
|
|
1240
|
+
"optional": false,
|
|
1241
|
+
"open": false,
|
|
1242
|
+
"fields": [
|
|
1243
|
+
{
|
|
1244
|
+
"name": "format",
|
|
1245
|
+
"optional": false,
|
|
1246
|
+
"type": "\"gift\" | \"xml\"",
|
|
1247
|
+
"value": {
|
|
1248
|
+
"kind": "enum",
|
|
1249
|
+
"values": [
|
|
1250
|
+
"gift",
|
|
1251
|
+
"xml"
|
|
1252
|
+
]
|
|
1253
|
+
}
|
|
1254
|
+
},
|
|
1255
|
+
{
|
|
1256
|
+
"name": "file",
|
|
1257
|
+
"optional": true,
|
|
1258
|
+
"type": "string",
|
|
1259
|
+
"value": {
|
|
1260
|
+
"kind": "string"
|
|
1261
|
+
}
|
|
1262
|
+
},
|
|
1263
|
+
{
|
|
1264
|
+
"name": "text",
|
|
1265
|
+
"optional": true,
|
|
1266
|
+
"type": "string",
|
|
1267
|
+
"value": {
|
|
1268
|
+
"kind": "string"
|
|
1269
|
+
}
|
|
1270
|
+
},
|
|
1271
|
+
{
|
|
1272
|
+
"name": "categoryId",
|
|
1273
|
+
"optional": true,
|
|
1274
|
+
"type": "number",
|
|
1275
|
+
"value": {
|
|
1276
|
+
"kind": "number"
|
|
1277
|
+
}
|
|
1278
|
+
}
|
|
1279
|
+
]
|
|
1280
|
+
}
|
|
1281
|
+
},
|
|
1282
|
+
{
|
|
1283
|
+
"name": "lessonPage",
|
|
1284
|
+
"description": "The lesson page the person is on (starting the lesson the first time).",
|
|
1285
|
+
"params": [
|
|
1286
|
+
{
|
|
1287
|
+
"name": "activityId",
|
|
1288
|
+
"optional": false,
|
|
1289
|
+
"type": "number",
|
|
1290
|
+
"value": {
|
|
1291
|
+
"kind": "number"
|
|
1292
|
+
}
|
|
1293
|
+
}
|
|
1294
|
+
]
|
|
1295
|
+
},
|
|
1296
|
+
{
|
|
1297
|
+
"name": "listAssignments",
|
|
1298
|
+
"description": "The course's assignments, in the course's order, with the section each is in.",
|
|
1299
|
+
"params": [
|
|
1300
|
+
{
|
|
1301
|
+
"name": "courseId",
|
|
1302
|
+
"optional": false,
|
|
1303
|
+
"type": "number",
|
|
1304
|
+
"value": {
|
|
1305
|
+
"kind": "number"
|
|
1306
|
+
}
|
|
1307
|
+
}
|
|
1308
|
+
]
|
|
1309
|
+
},
|
|
1310
|
+
{
|
|
1311
|
+
"name": "listCourses",
|
|
1312
|
+
"description": "The courses the person is enrolled in, as teacher or student.",
|
|
1313
|
+
"params": [
|
|
1314
|
+
{
|
|
1315
|
+
"name": "classification",
|
|
1316
|
+
"optional": true,
|
|
1317
|
+
"type": "\"all\" | \"inprogress\" | \"future\" | \"past\"",
|
|
1318
|
+
"value": {
|
|
1319
|
+
"kind": "enum",
|
|
1320
|
+
"values": [
|
|
1321
|
+
"all",
|
|
1322
|
+
"inprogress",
|
|
1323
|
+
"future",
|
|
1324
|
+
"past"
|
|
1325
|
+
]
|
|
1326
|
+
}
|
|
1327
|
+
}
|
|
1328
|
+
]
|
|
1329
|
+
},
|
|
1330
|
+
{
|
|
1331
|
+
"name": "logIn",
|
|
1332
|
+
"description": "Makes sure there's a session: at once if there is one, else a window where the person logs in (`loginTimeoutMs` by default).",
|
|
1333
|
+
"params": [],
|
|
1334
|
+
"options": {
|
|
1335
|
+
"name": "options",
|
|
1336
|
+
"optional": true,
|
|
1337
|
+
"open": false,
|
|
1338
|
+
"fields": [
|
|
1339
|
+
{
|
|
1340
|
+
"name": "timeoutMs",
|
|
1341
|
+
"optional": true,
|
|
1342
|
+
"type": "number",
|
|
1343
|
+
"value": {
|
|
1344
|
+
"kind": "number"
|
|
1345
|
+
}
|
|
1346
|
+
}
|
|
1347
|
+
]
|
|
1348
|
+
}
|
|
1349
|
+
},
|
|
1350
|
+
{
|
|
1351
|
+
"name": "logOut",
|
|
1352
|
+
"description": "Logs 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.",
|
|
1353
|
+
"params": []
|
|
1354
|
+
},
|
|
1355
|
+
{
|
|
1356
|
+
"name": "markNotificationsRead",
|
|
1357
|
+
"description": "Marks all the person's notifications read, as the popover's \"Mark all as read\" does; doing it twice changes nothing.",
|
|
1358
|
+
"params": []
|
|
1359
|
+
},
|
|
1360
|
+
{
|
|
1361
|
+
"name": "myGrades",
|
|
1362
|
+
"description": "The person's own grade report for a course.",
|
|
1363
|
+
"params": [
|
|
1364
|
+
{
|
|
1365
|
+
"name": "courseId",
|
|
1366
|
+
"optional": false,
|
|
1367
|
+
"type": "number",
|
|
1368
|
+
"value": {
|
|
1369
|
+
"kind": "number"
|
|
1370
|
+
}
|
|
1371
|
+
}
|
|
1372
|
+
]
|
|
1373
|
+
},
|
|
1374
|
+
{
|
|
1375
|
+
"name": "notifications",
|
|
1376
|
+
"description": "The person's notifications, newest first, only the unread ones when asked.",
|
|
1377
|
+
"params": [],
|
|
1378
|
+
"options": {
|
|
1379
|
+
"name": "options",
|
|
1380
|
+
"optional": true,
|
|
1381
|
+
"open": false,
|
|
1382
|
+
"fields": [
|
|
1383
|
+
{
|
|
1384
|
+
"name": "unreadOnly",
|
|
1385
|
+
"optional": true,
|
|
1386
|
+
"type": "boolean",
|
|
1387
|
+
"value": {
|
|
1388
|
+
"kind": "boolean"
|
|
1389
|
+
}
|
|
1390
|
+
}
|
|
1391
|
+
]
|
|
1392
|
+
}
|
|
1393
|
+
},
|
|
1394
|
+
{
|
|
1395
|
+
"name": "overrideCompletion",
|
|
1396
|
+
"description": "Sets someone's completion of an activity as a teacher does from the progress report; returns the state saved.",
|
|
1397
|
+
"params": [
|
|
1398
|
+
{
|
|
1399
|
+
"name": "activityId",
|
|
1400
|
+
"optional": false,
|
|
1401
|
+
"type": "number",
|
|
1402
|
+
"value": {
|
|
1403
|
+
"kind": "number"
|
|
1404
|
+
}
|
|
1405
|
+
},
|
|
1406
|
+
{
|
|
1407
|
+
"name": "userId",
|
|
1408
|
+
"optional": false,
|
|
1409
|
+
"type": "number",
|
|
1410
|
+
"value": {
|
|
1411
|
+
"kind": "number"
|
|
1412
|
+
}
|
|
1413
|
+
},
|
|
1414
|
+
{
|
|
1415
|
+
"name": "state",
|
|
1416
|
+
"optional": false,
|
|
1417
|
+
"type": "\"incomplete\" | \"complete\" | \"complete-pass\" | \"complete-fail\"",
|
|
1418
|
+
"value": {
|
|
1419
|
+
"kind": "enum",
|
|
1420
|
+
"values": [
|
|
1421
|
+
"incomplete",
|
|
1422
|
+
"complete",
|
|
1423
|
+
"complete-pass",
|
|
1424
|
+
"complete-fail"
|
|
1425
|
+
]
|
|
1426
|
+
}
|
|
1427
|
+
}
|
|
1428
|
+
]
|
|
1429
|
+
},
|
|
1430
|
+
{
|
|
1431
|
+
"name": "participantFilters",
|
|
1432
|
+
"description": "The 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.",
|
|
1433
|
+
"params": [
|
|
1434
|
+
{
|
|
1435
|
+
"name": "courseId",
|
|
1436
|
+
"optional": false,
|
|
1437
|
+
"type": "number",
|
|
1438
|
+
"value": {
|
|
1439
|
+
"kind": "number"
|
|
1440
|
+
}
|
|
1441
|
+
}
|
|
1442
|
+
]
|
|
1443
|
+
},
|
|
1444
|
+
{
|
|
1445
|
+
"name": "participants",
|
|
1446
|
+
"description": "A 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.",
|
|
1447
|
+
"params": [
|
|
1448
|
+
{
|
|
1449
|
+
"name": "courseId",
|
|
1450
|
+
"optional": false,
|
|
1451
|
+
"type": "number",
|
|
1452
|
+
"value": {
|
|
1453
|
+
"kind": "number"
|
|
1454
|
+
}
|
|
1455
|
+
}
|
|
1456
|
+
],
|
|
1457
|
+
"options": {
|
|
1458
|
+
"name": "options",
|
|
1459
|
+
"optional": true,
|
|
1460
|
+
"open": false,
|
|
1461
|
+
"fields": [
|
|
1462
|
+
{
|
|
1463
|
+
"name": "role",
|
|
1464
|
+
"optional": true,
|
|
1465
|
+
"type": "number",
|
|
1466
|
+
"value": {
|
|
1467
|
+
"kind": "number"
|
|
1468
|
+
}
|
|
1469
|
+
},
|
|
1470
|
+
{
|
|
1471
|
+
"name": "group",
|
|
1472
|
+
"optional": true,
|
|
1473
|
+
"type": "number",
|
|
1474
|
+
"value": {
|
|
1475
|
+
"kind": "number"
|
|
1476
|
+
}
|
|
1477
|
+
},
|
|
1478
|
+
{
|
|
1479
|
+
"name": "inactiveSince",
|
|
1480
|
+
"optional": true,
|
|
1481
|
+
"type": "Date",
|
|
1482
|
+
"value": {
|
|
1483
|
+
"kind": "date"
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1486
|
+
]
|
|
1487
|
+
}
|
|
1488
|
+
},
|
|
1489
|
+
{
|
|
1490
|
+
"name": "pendingActivities",
|
|
1491
|
+
"description": "What 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.",
|
|
1492
|
+
"params": [
|
|
1493
|
+
{
|
|
1494
|
+
"name": "courseId",
|
|
1495
|
+
"optional": false,
|
|
1496
|
+
"type": "number",
|
|
1497
|
+
"value": {
|
|
1498
|
+
"kind": "number"
|
|
1499
|
+
}
|
|
1500
|
+
}
|
|
1501
|
+
]
|
|
1502
|
+
},
|
|
1503
|
+
{
|
|
1504
|
+
"name": "publicSiteInfo",
|
|
1505
|
+
"description": "What the site tells anyone before logging in, without the browser.",
|
|
1506
|
+
"params": []
|
|
1507
|
+
},
|
|
1508
|
+
{
|
|
1509
|
+
"name": "questionBanks",
|
|
1510
|
+
"description": "A course's question banks: its shared ones and the activities' own, as the banks page lists them.",
|
|
1511
|
+
"params": [
|
|
1512
|
+
{
|
|
1513
|
+
"name": "courseId",
|
|
1514
|
+
"optional": false,
|
|
1515
|
+
"type": "number",
|
|
1516
|
+
"value": {
|
|
1517
|
+
"kind": "number"
|
|
1518
|
+
}
|
|
1519
|
+
}
|
|
1520
|
+
]
|
|
1521
|
+
},
|
|
1522
|
+
{
|
|
1523
|
+
"name": "questions",
|
|
1524
|
+
"description": "A bank's categories and every question in them, category by category.",
|
|
1525
|
+
"params": [
|
|
1526
|
+
{
|
|
1527
|
+
"name": "activityId",
|
|
1528
|
+
"optional": false,
|
|
1529
|
+
"type": "number",
|
|
1530
|
+
"value": {
|
|
1531
|
+
"kind": "number"
|
|
1532
|
+
}
|
|
1533
|
+
}
|
|
1534
|
+
]
|
|
1535
|
+
},
|
|
1536
|
+
{
|
|
1537
|
+
"name": "quizInfo",
|
|
1538
|
+
"description": "A 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.",
|
|
1539
|
+
"params": [
|
|
1540
|
+
{
|
|
1541
|
+
"name": "activityId",
|
|
1542
|
+
"optional": false,
|
|
1543
|
+
"type": "number",
|
|
1544
|
+
"value": {
|
|
1545
|
+
"kind": "number"
|
|
1546
|
+
}
|
|
1547
|
+
}
|
|
1548
|
+
]
|
|
1549
|
+
},
|
|
1550
|
+
{
|
|
1551
|
+
"name": "quizResults",
|
|
1552
|
+
"description": "A 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.",
|
|
1553
|
+
"params": [
|
|
1554
|
+
{
|
|
1555
|
+
"name": "activityId",
|
|
1556
|
+
"optional": false,
|
|
1557
|
+
"type": "number",
|
|
1558
|
+
"value": {
|
|
1559
|
+
"kind": "number"
|
|
1560
|
+
}
|
|
1561
|
+
}
|
|
1562
|
+
],
|
|
1563
|
+
"options": {
|
|
1564
|
+
"name": "options",
|
|
1565
|
+
"optional": true,
|
|
1566
|
+
"open": false,
|
|
1567
|
+
"fields": [
|
|
1568
|
+
{
|
|
1569
|
+
"name": "responses",
|
|
1570
|
+
"optional": true,
|
|
1571
|
+
"type": "boolean",
|
|
1572
|
+
"value": {
|
|
1573
|
+
"kind": "boolean"
|
|
1574
|
+
}
|
|
1575
|
+
}
|
|
1576
|
+
]
|
|
1577
|
+
}
|
|
1578
|
+
},
|
|
1579
|
+
{
|
|
1580
|
+
"name": "quizStructure",
|
|
1581
|
+
"description": "A quiz's questions as its edit page lists them: slots with their page, question, type, name and mark.",
|
|
1582
|
+
"params": [
|
|
1583
|
+
{
|
|
1584
|
+
"name": "activityId",
|
|
1585
|
+
"optional": false,
|
|
1586
|
+
"type": "number",
|
|
1587
|
+
"value": {
|
|
1588
|
+
"kind": "number"
|
|
1589
|
+
}
|
|
1590
|
+
}
|
|
1591
|
+
]
|
|
1592
|
+
},
|
|
1593
|
+
{
|
|
1594
|
+
"name": "readAttempt",
|
|
1595
|
+
"description": "Every question of an attempt, page by page, with the page each is on.",
|
|
1596
|
+
"params": [
|
|
1597
|
+
{
|
|
1598
|
+
"name": "attemptId",
|
|
1599
|
+
"optional": false,
|
|
1600
|
+
"type": "number",
|
|
1601
|
+
"value": {
|
|
1602
|
+
"kind": "number"
|
|
1603
|
+
}
|
|
1604
|
+
}
|
|
1605
|
+
]
|
|
1606
|
+
},
|
|
1607
|
+
{
|
|
1608
|
+
"name": "readReview",
|
|
1609
|
+
"description": "A finished attempt's review, as far as the quiz's review options let the person see it.",
|
|
1610
|
+
"params": [
|
|
1611
|
+
{
|
|
1612
|
+
"name": "attemptId",
|
|
1613
|
+
"optional": false,
|
|
1614
|
+
"type": "number",
|
|
1615
|
+
"value": {
|
|
1616
|
+
"kind": "number"
|
|
1617
|
+
}
|
|
1618
|
+
}
|
|
1619
|
+
]
|
|
1620
|
+
},
|
|
1621
|
+
{
|
|
1622
|
+
"name": "replyToPost",
|
|
1623
|
+
"description": "Replies to a post; returns the new post's id and its discussion's.",
|
|
1624
|
+
"params": [
|
|
1625
|
+
{
|
|
1626
|
+
"name": "postId",
|
|
1627
|
+
"optional": false,
|
|
1628
|
+
"type": "number",
|
|
1629
|
+
"value": {
|
|
1630
|
+
"kind": "number"
|
|
1631
|
+
}
|
|
1632
|
+
},
|
|
1633
|
+
{
|
|
1634
|
+
"name": "input",
|
|
1635
|
+
"optional": false,
|
|
1636
|
+
"type": "PostInput & { subject?: string; }",
|
|
1637
|
+
"value": {
|
|
1638
|
+
"kind": "json"
|
|
1639
|
+
}
|
|
1640
|
+
}
|
|
1641
|
+
]
|
|
1642
|
+
},
|
|
1643
|
+
{
|
|
1644
|
+
"name": "rubric",
|
|
1645
|
+
"description": "An 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 its first participant.",
|
|
1646
|
+
"params": [
|
|
1647
|
+
{
|
|
1648
|
+
"name": "activityId",
|
|
1649
|
+
"optional": false,
|
|
1650
|
+
"type": "number",
|
|
1651
|
+
"value": {
|
|
1652
|
+
"kind": "number"
|
|
1653
|
+
}
|
|
1654
|
+
}
|
|
1655
|
+
]
|
|
1656
|
+
},
|
|
1657
|
+
{
|
|
1658
|
+
"name": "saveSubmission",
|
|
1659
|
+
"description": "Saves the submission's online text and adds files, as \"Save changes\" on the edit page does; gives the assignment afterwards.",
|
|
1660
|
+
"params": [
|
|
1661
|
+
{
|
|
1662
|
+
"name": "activityId",
|
|
1663
|
+
"optional": false,
|
|
1664
|
+
"type": "number",
|
|
1665
|
+
"value": {
|
|
1666
|
+
"kind": "number"
|
|
1667
|
+
}
|
|
1668
|
+
}
|
|
1669
|
+
],
|
|
1670
|
+
"options": {
|
|
1671
|
+
"name": "input",
|
|
1672
|
+
"optional": false,
|
|
1673
|
+
"open": false,
|
|
1674
|
+
"fields": [
|
|
1675
|
+
{
|
|
1676
|
+
"name": "onlineText",
|
|
1677
|
+
"optional": true,
|
|
1678
|
+
"type": "string",
|
|
1679
|
+
"value": {
|
|
1680
|
+
"kind": "string"
|
|
1681
|
+
}
|
|
1682
|
+
},
|
|
1683
|
+
{
|
|
1684
|
+
"name": "files",
|
|
1685
|
+
"optional": true,
|
|
1686
|
+
"type": "string[]",
|
|
1687
|
+
"value": {
|
|
1688
|
+
"kind": "strings"
|
|
1689
|
+
}
|
|
1690
|
+
}
|
|
1691
|
+
]
|
|
1692
|
+
}
|
|
1693
|
+
},
|
|
1694
|
+
{
|
|
1695
|
+
"name": "sendMessage",
|
|
1696
|
+
"description": "Sends a private message to a user, as the messaging drawer does; returns the message and its conversation.",
|
|
1697
|
+
"params": [
|
|
1698
|
+
{
|
|
1699
|
+
"name": "userId",
|
|
1700
|
+
"optional": false,
|
|
1701
|
+
"type": "number",
|
|
1702
|
+
"value": {
|
|
1703
|
+
"kind": "number"
|
|
1704
|
+
}
|
|
1705
|
+
},
|
|
1706
|
+
{
|
|
1707
|
+
"name": "text",
|
|
1708
|
+
"optional": false,
|
|
1709
|
+
"type": "string",
|
|
1710
|
+
"value": {
|
|
1711
|
+
"kind": "string"
|
|
1712
|
+
}
|
|
1713
|
+
}
|
|
1714
|
+
]
|
|
1715
|
+
},
|
|
1716
|
+
{
|
|
1717
|
+
"name": "setCompletion",
|
|
1718
|
+
"description": "Marks 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`.",
|
|
1719
|
+
"params": [
|
|
1720
|
+
{
|
|
1721
|
+
"name": "activityId",
|
|
1722
|
+
"optional": false,
|
|
1723
|
+
"type": "number",
|
|
1724
|
+
"value": {
|
|
1725
|
+
"kind": "number"
|
|
1726
|
+
}
|
|
1727
|
+
},
|
|
1728
|
+
{
|
|
1729
|
+
"name": "done",
|
|
1730
|
+
"optional": false,
|
|
1731
|
+
"type": "boolean",
|
|
1732
|
+
"value": {
|
|
1733
|
+
"kind": "boolean"
|
|
1734
|
+
}
|
|
1735
|
+
}
|
|
1736
|
+
]
|
|
1737
|
+
},
|
|
1738
|
+
{
|
|
1739
|
+
"name": "setDiscussionState",
|
|
1740
|
+
"description": "Pins 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.",
|
|
1741
|
+
"params": [
|
|
1742
|
+
{
|
|
1743
|
+
"name": "activityId",
|
|
1744
|
+
"optional": false,
|
|
1745
|
+
"type": "number",
|
|
1746
|
+
"value": {
|
|
1747
|
+
"kind": "number"
|
|
1748
|
+
}
|
|
1749
|
+
},
|
|
1750
|
+
{
|
|
1751
|
+
"name": "discussionId",
|
|
1752
|
+
"optional": false,
|
|
1753
|
+
"type": "number",
|
|
1754
|
+
"value": {
|
|
1755
|
+
"kind": "number"
|
|
1756
|
+
}
|
|
1757
|
+
}
|
|
1758
|
+
],
|
|
1759
|
+
"options": {
|
|
1760
|
+
"name": "options",
|
|
1761
|
+
"optional": false,
|
|
1762
|
+
"open": false,
|
|
1763
|
+
"fields": [
|
|
1764
|
+
{
|
|
1765
|
+
"name": "pinned",
|
|
1766
|
+
"optional": true,
|
|
1767
|
+
"type": "boolean",
|
|
1768
|
+
"value": {
|
|
1769
|
+
"kind": "boolean"
|
|
1770
|
+
}
|
|
1771
|
+
},
|
|
1772
|
+
{
|
|
1773
|
+
"name": "locked",
|
|
1774
|
+
"optional": true,
|
|
1775
|
+
"type": "boolean",
|
|
1776
|
+
"value": {
|
|
1777
|
+
"kind": "boolean"
|
|
1778
|
+
}
|
|
1779
|
+
}
|
|
1780
|
+
]
|
|
1781
|
+
}
|
|
1782
|
+
},
|
|
1783
|
+
{
|
|
1784
|
+
"name": "setQuizOverride",
|
|
1785
|
+
"description": "Sets 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.",
|
|
1786
|
+
"params": [
|
|
1787
|
+
{
|
|
1788
|
+
"name": "activityId",
|
|
1789
|
+
"optional": false,
|
|
1790
|
+
"type": "number",
|
|
1791
|
+
"value": {
|
|
1792
|
+
"kind": "number"
|
|
1793
|
+
}
|
|
1794
|
+
},
|
|
1795
|
+
{
|
|
1796
|
+
"name": "userId",
|
|
1797
|
+
"optional": false,
|
|
1798
|
+
"type": "number",
|
|
1799
|
+
"value": {
|
|
1800
|
+
"kind": "number"
|
|
1801
|
+
}
|
|
1802
|
+
}
|
|
1803
|
+
],
|
|
1804
|
+
"options": {
|
|
1805
|
+
"name": "options",
|
|
1806
|
+
"optional": false,
|
|
1807
|
+
"open": false,
|
|
1808
|
+
"fields": [
|
|
1809
|
+
{
|
|
1810
|
+
"name": "open",
|
|
1811
|
+
"optional": true,
|
|
1812
|
+
"type": "Date",
|
|
1813
|
+
"value": {
|
|
1814
|
+
"kind": "date"
|
|
1815
|
+
}
|
|
1816
|
+
},
|
|
1817
|
+
{
|
|
1818
|
+
"name": "close",
|
|
1819
|
+
"optional": true,
|
|
1820
|
+
"type": "Date",
|
|
1821
|
+
"value": {
|
|
1822
|
+
"kind": "date"
|
|
1823
|
+
}
|
|
1824
|
+
},
|
|
1825
|
+
{
|
|
1826
|
+
"name": "timeLimitMinutes",
|
|
1827
|
+
"optional": true,
|
|
1828
|
+
"type": "number",
|
|
1829
|
+
"value": {
|
|
1830
|
+
"kind": "number"
|
|
1831
|
+
}
|
|
1832
|
+
},
|
|
1833
|
+
{
|
|
1834
|
+
"name": "attempts",
|
|
1835
|
+
"optional": true,
|
|
1836
|
+
"type": "number",
|
|
1837
|
+
"value": {
|
|
1838
|
+
"kind": "number"
|
|
1839
|
+
}
|
|
1840
|
+
}
|
|
1841
|
+
]
|
|
1842
|
+
}
|
|
1843
|
+
},
|
|
1844
|
+
{
|
|
1845
|
+
"name": "siteName",
|
|
1846
|
+
"description": "The site's name, from its public settings; `undefined` where the mobile app support is off.",
|
|
1847
|
+
"params": []
|
|
1848
|
+
},
|
|
1849
|
+
{
|
|
1850
|
+
"name": "startDiscussion",
|
|
1851
|
+
"description": "Starts a discussion in a forum; returns its id.",
|
|
1852
|
+
"params": [
|
|
1853
|
+
{
|
|
1854
|
+
"name": "activityId",
|
|
1855
|
+
"optional": false,
|
|
1856
|
+
"type": "number",
|
|
1857
|
+
"value": {
|
|
1858
|
+
"kind": "number"
|
|
1859
|
+
}
|
|
1860
|
+
},
|
|
1861
|
+
{
|
|
1862
|
+
"name": "input",
|
|
1863
|
+
"optional": false,
|
|
1864
|
+
"type": "PostInput & { subject: string; }",
|
|
1865
|
+
"value": {
|
|
1866
|
+
"kind": "json"
|
|
1867
|
+
}
|
|
1868
|
+
}
|
|
1869
|
+
]
|
|
1870
|
+
},
|
|
1871
|
+
{
|
|
1872
|
+
"name": "startQuizAttempt",
|
|
1873
|
+
"description": "Starts an attempt, or continues the one in progress, and gives its questions.",
|
|
1874
|
+
"params": [
|
|
1875
|
+
{
|
|
1876
|
+
"name": "activityId",
|
|
1877
|
+
"optional": false,
|
|
1878
|
+
"type": "number",
|
|
1879
|
+
"value": {
|
|
1880
|
+
"kind": "number"
|
|
1881
|
+
}
|
|
1882
|
+
}
|
|
1883
|
+
]
|
|
1884
|
+
},
|
|
1885
|
+
{
|
|
1886
|
+
"name": "studentAssignment",
|
|
1887
|
+
"description": "An 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.",
|
|
1888
|
+
"params": [
|
|
1889
|
+
{
|
|
1890
|
+
"name": "activityId",
|
|
1891
|
+
"optional": false,
|
|
1892
|
+
"type": "number",
|
|
1893
|
+
"value": {
|
|
1894
|
+
"kind": "number"
|
|
1895
|
+
}
|
|
1896
|
+
}
|
|
1897
|
+
]
|
|
1898
|
+
},
|
|
1899
|
+
{
|
|
1900
|
+
"name": "submitForGrading",
|
|
1901
|
+
"description": "Submits 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.",
|
|
1902
|
+
"params": [
|
|
1903
|
+
{
|
|
1904
|
+
"name": "activityId",
|
|
1905
|
+
"optional": false,
|
|
1906
|
+
"type": "number",
|
|
1907
|
+
"value": {
|
|
1908
|
+
"kind": "number"
|
|
1909
|
+
}
|
|
1910
|
+
}
|
|
1911
|
+
],
|
|
1912
|
+
"options": {
|
|
1913
|
+
"name": "options",
|
|
1914
|
+
"optional": true,
|
|
1915
|
+
"open": false,
|
|
1916
|
+
"fields": [
|
|
1917
|
+
{
|
|
1918
|
+
"name": "acceptStatement",
|
|
1919
|
+
"optional": true,
|
|
1920
|
+
"type": "boolean",
|
|
1921
|
+
"value": {
|
|
1922
|
+
"kind": "boolean"
|
|
1923
|
+
}
|
|
1924
|
+
}
|
|
1925
|
+
]
|
|
1926
|
+
}
|
|
1927
|
+
},
|
|
1928
|
+
{
|
|
1929
|
+
"name": "submitSurvey",
|
|
1930
|
+
"description": "Fills 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.",
|
|
1931
|
+
"params": [
|
|
1932
|
+
{
|
|
1933
|
+
"name": "activityId",
|
|
1934
|
+
"optional": false,
|
|
1935
|
+
"type": "number",
|
|
1936
|
+
"value": {
|
|
1937
|
+
"kind": "number"
|
|
1938
|
+
}
|
|
1939
|
+
},
|
|
1940
|
+
{
|
|
1941
|
+
"name": "responses",
|
|
1942
|
+
"optional": false,
|
|
1943
|
+
"type": "Record<string, string>",
|
|
1944
|
+
"value": {
|
|
1945
|
+
"kind": "json"
|
|
1946
|
+
}
|
|
1947
|
+
}
|
|
1948
|
+
],
|
|
1949
|
+
"options": {
|
|
1950
|
+
"name": "options",
|
|
1951
|
+
"optional": true,
|
|
1952
|
+
"open": false,
|
|
1953
|
+
"fields": [
|
|
1954
|
+
{
|
|
1955
|
+
"name": "type",
|
|
1956
|
+
"optional": true,
|
|
1957
|
+
"type": "SurveyType",
|
|
1958
|
+
"value": {
|
|
1959
|
+
"kind": "enum",
|
|
1960
|
+
"values": [
|
|
1961
|
+
"questionnaire",
|
|
1962
|
+
"feedback"
|
|
1963
|
+
]
|
|
1964
|
+
}
|
|
1965
|
+
}
|
|
1966
|
+
]
|
|
1967
|
+
}
|
|
1968
|
+
},
|
|
1969
|
+
{
|
|
1970
|
+
"name": "upcomingEvents",
|
|
1971
|
+
"description": "The person's upcoming events, as the calendar's \"Upcoming events\" view lists them, in one course or all.",
|
|
1972
|
+
"params": [],
|
|
1973
|
+
"options": {
|
|
1974
|
+
"name": "options",
|
|
1975
|
+
"optional": true,
|
|
1976
|
+
"open": false,
|
|
1977
|
+
"fields": [
|
|
1978
|
+
{
|
|
1979
|
+
"name": "courseId",
|
|
1980
|
+
"optional": true,
|
|
1981
|
+
"type": "number",
|
|
1982
|
+
"value": {
|
|
1983
|
+
"kind": "number"
|
|
1984
|
+
}
|
|
1985
|
+
}
|
|
1986
|
+
]
|
|
1987
|
+
}
|
|
1988
|
+
},
|
|
1989
|
+
{
|
|
1990
|
+
"name": "updateActivity",
|
|
1991
|
+
"description": "Changes an existing activity through its form: only what's given changes; files stay as they are.",
|
|
1992
|
+
"params": [
|
|
1993
|
+
{
|
|
1994
|
+
"name": "activityId",
|
|
1995
|
+
"optional": false,
|
|
1996
|
+
"type": "number",
|
|
1997
|
+
"value": {
|
|
1998
|
+
"kind": "number"
|
|
1999
|
+
}
|
|
2000
|
+
}
|
|
2001
|
+
],
|
|
2002
|
+
"options": {
|
|
2003
|
+
"name": "input",
|
|
2004
|
+
"optional": false,
|
|
2005
|
+
"open": false,
|
|
2006
|
+
"fields": [
|
|
2007
|
+
{
|
|
2008
|
+
"name": "name",
|
|
2009
|
+
"optional": true,
|
|
2010
|
+
"type": "string",
|
|
2011
|
+
"value": {
|
|
2012
|
+
"kind": "string"
|
|
2013
|
+
}
|
|
2014
|
+
},
|
|
2015
|
+
{
|
|
2016
|
+
"name": "description",
|
|
2017
|
+
"optional": true,
|
|
2018
|
+
"type": "string",
|
|
2019
|
+
"value": {
|
|
2020
|
+
"kind": "string"
|
|
2021
|
+
},
|
|
2022
|
+
"description": "The description (HTML), shown on the activity's page."
|
|
2023
|
+
},
|
|
2024
|
+
{
|
|
2025
|
+
"name": "content",
|
|
2026
|
+
"optional": true,
|
|
2027
|
+
"type": "string",
|
|
2028
|
+
"value": {
|
|
2029
|
+
"kind": "string"
|
|
2030
|
+
},
|
|
2031
|
+
"description": "A page's content, or a label's text (HTML)."
|
|
2032
|
+
},
|
|
2033
|
+
{
|
|
2034
|
+
"name": "url",
|
|
2035
|
+
"optional": true,
|
|
2036
|
+
"type": "string",
|
|
2037
|
+
"value": {
|
|
2038
|
+
"kind": "string"
|
|
2039
|
+
},
|
|
2040
|
+
"description": "A URL resource's target."
|
|
2041
|
+
},
|
|
2042
|
+
{
|
|
2043
|
+
"name": "visibility",
|
|
2044
|
+
"optional": true,
|
|
2045
|
+
"type": "\"shown\" | \"hidden\" | \"stealth\"",
|
|
2046
|
+
"value": {
|
|
2047
|
+
"kind": "enum",
|
|
2048
|
+
"values": [
|
|
2049
|
+
"shown",
|
|
2050
|
+
"hidden",
|
|
2051
|
+
"stealth"
|
|
2052
|
+
]
|
|
2053
|
+
}
|
|
2054
|
+
},
|
|
2055
|
+
{
|
|
2056
|
+
"name": "settings",
|
|
2057
|
+
"optional": true,
|
|
2058
|
+
"type": "Record<string, FieldValue>",
|
|
2059
|
+
"value": {
|
|
2060
|
+
"kind": "json"
|
|
2061
|
+
}
|
|
2062
|
+
}
|
|
2063
|
+
]
|
|
2064
|
+
}
|
|
2065
|
+
},
|
|
2066
|
+
{
|
|
2067
|
+
"name": "updateCourse",
|
|
2068
|
+
"description": "Changes 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. Moodle's refusals (a short name already taken) come back as `FormError` by field.",
|
|
2069
|
+
"params": [
|
|
2070
|
+
{
|
|
2071
|
+
"name": "courseId",
|
|
2072
|
+
"optional": false,
|
|
2073
|
+
"type": "number",
|
|
2074
|
+
"value": {
|
|
2075
|
+
"kind": "number"
|
|
2076
|
+
}
|
|
2077
|
+
}
|
|
2078
|
+
],
|
|
2079
|
+
"options": {
|
|
2080
|
+
"name": "options",
|
|
2081
|
+
"optional": false,
|
|
2082
|
+
"open": false,
|
|
2083
|
+
"fields": [
|
|
2084
|
+
{
|
|
2085
|
+
"name": "fullName",
|
|
2086
|
+
"optional": true,
|
|
2087
|
+
"type": "string",
|
|
2088
|
+
"value": {
|
|
2089
|
+
"kind": "string"
|
|
2090
|
+
}
|
|
2091
|
+
},
|
|
2092
|
+
{
|
|
2093
|
+
"name": "shortName",
|
|
2094
|
+
"optional": true,
|
|
2095
|
+
"type": "string",
|
|
2096
|
+
"value": {
|
|
2097
|
+
"kind": "string"
|
|
2098
|
+
}
|
|
2099
|
+
},
|
|
2100
|
+
{
|
|
2101
|
+
"name": "summary",
|
|
2102
|
+
"optional": true,
|
|
2103
|
+
"type": "string",
|
|
2104
|
+
"value": {
|
|
2105
|
+
"kind": "string"
|
|
2106
|
+
}
|
|
2107
|
+
},
|
|
2108
|
+
{
|
|
2109
|
+
"name": "settings",
|
|
2110
|
+
"optional": true,
|
|
2111
|
+
"type": "Record<string, FieldValue>",
|
|
2112
|
+
"value": {
|
|
2113
|
+
"kind": "json"
|
|
2114
|
+
}
|
|
2115
|
+
}
|
|
2116
|
+
]
|
|
2117
|
+
}
|
|
2118
|
+
},
|
|
2119
|
+
{
|
|
2120
|
+
"name": "updateGradeItem",
|
|
2121
|
+
"description": "Changes 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.",
|
|
2122
|
+
"params": [
|
|
2123
|
+
{
|
|
2124
|
+
"name": "courseId",
|
|
2125
|
+
"optional": false,
|
|
2126
|
+
"type": "number",
|
|
2127
|
+
"value": {
|
|
2128
|
+
"kind": "number"
|
|
2129
|
+
}
|
|
2130
|
+
},
|
|
2131
|
+
{
|
|
2132
|
+
"name": "itemId",
|
|
2133
|
+
"optional": false,
|
|
2134
|
+
"type": "number",
|
|
2135
|
+
"value": {
|
|
2136
|
+
"kind": "number"
|
|
2137
|
+
}
|
|
2138
|
+
}
|
|
2139
|
+
],
|
|
2140
|
+
"options": {
|
|
2141
|
+
"name": "options",
|
|
2142
|
+
"optional": false,
|
|
2143
|
+
"open": false,
|
|
2144
|
+
"fields": [
|
|
2145
|
+
{
|
|
2146
|
+
"name": "category",
|
|
2147
|
+
"optional": true,
|
|
2148
|
+
"type": "number",
|
|
2149
|
+
"value": {
|
|
2150
|
+
"kind": "number"
|
|
2151
|
+
}
|
|
2152
|
+
},
|
|
2153
|
+
{
|
|
2154
|
+
"name": "weight",
|
|
2155
|
+
"optional": true,
|
|
2156
|
+
"type": "number",
|
|
2157
|
+
"value": {
|
|
2158
|
+
"kind": "number"
|
|
2159
|
+
}
|
|
2160
|
+
},
|
|
2161
|
+
{
|
|
2162
|
+
"name": "maxGrade",
|
|
2163
|
+
"optional": true,
|
|
2164
|
+
"type": "number",
|
|
2165
|
+
"value": {
|
|
2166
|
+
"kind": "number"
|
|
2167
|
+
}
|
|
2168
|
+
}
|
|
2169
|
+
]
|
|
2170
|
+
}
|
|
2171
|
+
},
|
|
2172
|
+
{
|
|
2173
|
+
"name": "userById",
|
|
2174
|
+
"description": "A user by id, or `undefined` when Moodle gives nobody (no such user, or not one the person may see).",
|
|
2175
|
+
"params": [
|
|
2176
|
+
{
|
|
2177
|
+
"name": "userId",
|
|
2178
|
+
"optional": false,
|
|
2179
|
+
"type": "number",
|
|
2180
|
+
"value": {
|
|
2181
|
+
"kind": "number"
|
|
2182
|
+
}
|
|
2183
|
+
}
|
|
2184
|
+
]
|
|
2185
|
+
},
|
|
2186
|
+
{
|
|
2187
|
+
"name": "whoAmI",
|
|
2188
|
+
"description": "Who the logged-in person is; with `courseId`, also their roles and abilities in that course.",
|
|
2189
|
+
"params": [
|
|
2190
|
+
{
|
|
2191
|
+
"name": "courseId",
|
|
2192
|
+
"optional": true,
|
|
2193
|
+
"type": "number",
|
|
2194
|
+
"value": {
|
|
2195
|
+
"kind": "number"
|
|
2196
|
+
}
|
|
2197
|
+
}
|
|
2198
|
+
]
|
|
2199
|
+
}
|
|
2200
|
+
];
|
|
2201
|
+
/** Methods with no command: they give a browser tab, which means nothing once the command exits. */
|
|
2202
|
+
export const LEFT_OUT = ["openForm", "openSitePage"];
|
|
2203
|
+
//# sourceMappingURL=commands.generated.js.map
|