@insignia-education/api-sdk-js 0.15.75 → 0.15.77
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/Employee.js +2 -0
- package/src/api/v1/Teacher.js +8 -1
package/package.json
CHANGED
package/src/api/v1/Employee.js
CHANGED
|
@@ -14,6 +14,8 @@ export default class Employee {
|
|
|
14
14
|
individualAvailability: () => this.#client.get(`${base}/teachers/individual-availability`),
|
|
15
15
|
/** One teacher's Individual + Quiz session instances — the admin "teacher schedule" page's sessions tab. */
|
|
16
16
|
teacherSessions: (teacherId) => this.#client.get(`${base}/teachers/${teacherId}/sessions`),
|
|
17
|
+
/** Courses this teacher is assigned to teach — the admin "teacher schedule" page's per-course subtabs. */
|
|
18
|
+
teacherCourses: (teacherId) => this.#client.get(`${base}/teachers/${teacherId}/courses`),
|
|
17
19
|
/** All sessions for one course_date, any teacher. */
|
|
18
20
|
courseDateSessions: (courseDateId) => this.#client.get(`${base}/course-dates/${courseDateId}/sessions`),
|
|
19
21
|
/** Mark a student's attendance on any teacher's session. */
|
package/src/api/v1/Teacher.js
CHANGED
|
@@ -70,7 +70,14 @@ export default class Teacher {
|
|
|
70
70
|
courseCorrectableQuizzes: (courseId) => this.#client.get(`${base}/courses/${courseId}/quizzes/correctable`),
|
|
71
71
|
/** Full attempt detail (all score fields, answers, quiz.questions.answers eager-loaded) for one of this teacher's own students. */
|
|
72
72
|
quizDetail: (id) => this.#client.get(`${base}/quizzes/${id}`),
|
|
73
|
-
/**
|
|
73
|
+
/**
|
|
74
|
+
* Grade (or partially grade) an attempt: any field omitted keeps its current value, so open/audio/session
|
|
75
|
+
* can be saved independently of finalizing (teacher_graded_at). `data` may include:
|
|
76
|
+
* `open_grades` ({question_id: bool}, replaces score_open — server sums each correct question's own
|
|
77
|
+
* point value), `score_audio`, `score_session_percentage`, `teacher_graded_at`,
|
|
78
|
+
* `comments_positive`/`comments_negative`/`comments_general` (only saved if the quiz's matching
|
|
79
|
+
* comment_*_enabled flag is on), `course_selected` (only saved if course_as_comment_enabled).
|
|
80
|
+
*/
|
|
74
81
|
gradeQuiz: (id, data) => this.#client.patch(`${base}/quizzes/${id}/grade`, data),
|
|
75
82
|
/** Mark one student's attendance (present: true/false) on one of this teacher's own sessions. */
|
|
76
83
|
markAttendance: (sessionId, studentId, present) => this.#client.patch(`${base}/sessions/${sessionId}/attendance`, { student_id: studentId, present }),
|