@insignia-education/api-sdk-js 0.15.57 → 0.15.59
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/package.json +1 -1
- package/src/api/v1/Teacher.js +4 -0
- package/src/api/v1/Users.js +7 -0
package/package.json
CHANGED
package/src/api/v1/Teacher.js
CHANGED
|
@@ -56,6 +56,10 @@ export default class Teacher {
|
|
|
56
56
|
courseDateContentDownload: (courseDateId) => this.#client.get(`${base}/course-dates/${courseDateId}/content-download`),
|
|
57
57
|
/** Ungraded quiz submissions from one CourseDate's own students. */
|
|
58
58
|
courseDateUngradedQuizzes: (courseDateId) => this.#client.get(`${base}/course-dates/${courseDateId}/quizzes/ungraded`),
|
|
59
|
+
/** Already-graded quiz submissions from one CourseDate's own students, optionally narrowed to one quiz. */
|
|
60
|
+
courseDateGradedQuizzes: (courseDateId, quizId = null) => this.#client.get(`${base}/course-dates/${courseDateId}/quizzes/graded`, quizId ? { quiz_id: quizId } : {}),
|
|
61
|
+
/** Distinct { id, title } quizzes needing correction under this CourseDate's course — for the graded-tab quiz filter. */
|
|
62
|
+
courseDateCorrectableQuizzes: (courseDateId) => this.#client.get(`${base}/course-dates/${courseDateId}/quizzes/correctable`),
|
|
59
63
|
/** Ungraded quiz submissions grouped by course, for every course this teacher teaches. */
|
|
60
64
|
ungradedQuizzes: () => this.#client.get(`${base}/quizzes/ungraded`),
|
|
61
65
|
/** Full attempt detail (all score fields, answers, quiz.questions.answers eager-loaded) for one of this teacher's own students. */
|
package/src/api/v1/Users.js
CHANGED
|
@@ -57,6 +57,13 @@ export default class Users {
|
|
|
57
57
|
create: (data) => client.put(base, data),
|
|
58
58
|
edit: (id, data) => client.patch(`${base}/${id}`, data),
|
|
59
59
|
delete: (id) => client.del(`${base}/${id}`),
|
|
60
|
+
/**
|
|
61
|
+
* Upload the PDF a student attaches as their answer to a
|
|
62
|
+
* document_upload question (formData must contain `file`). The
|
|
63
|
+
* server derives the storage path/filename — nothing else to pass.
|
|
64
|
+
*/
|
|
65
|
+
uploadAnswerDocument: (quizId, answerId, formData) =>
|
|
66
|
+
client.upload(`${base}/${quizId}/answers/${answerId}/document`, formData),
|
|
60
67
|
};
|
|
61
68
|
}
|
|
62
69
|
|