@insignia-education/api-sdk-js 0.25.10 → 0.25.12
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 +6 -0
- package/src/api/v1/Teacher.js +3 -1
package/package.json
CHANGED
package/src/api/v1/Employee.js
CHANGED
|
@@ -18,6 +18,12 @@ export default class Employee {
|
|
|
18
18
|
teacherCourses: (teacherId) => this.#client.get(`${base}/teachers/${teacherId}/courses`),
|
|
19
19
|
/** All sessions for one course_date, any teacher. */
|
|
20
20
|
courseDateSessions: (courseDateId) => this.#client.get(`${base}/course-dates/${courseDateId}/sessions`),
|
|
21
|
+
/** Ranked roster ({id, name, email, rank}) of any course_date. */
|
|
22
|
+
courseDateStudents: (courseDateId) => this.#client.get(`${base}/course-dates/${courseDateId}/students`),
|
|
23
|
+
/** One enrolled student's quiz attempts in this course_date's course (any teacher's date) — same shape as Teacher.dashboard().courseDateStudentQuizzes(). Grade them with Users.quizzes(studentId).detail()/grade(). Not enrolled → 403. */
|
|
24
|
+
courseDateStudentQuizzes: (courseDateId, studentId) => this.#client.get(`${base}/course-dates/${courseDateId}/students/${studentId}/quizzes`),
|
|
25
|
+
/** Save the ranking of one course_date's students: `studentIds` in order, first = rank 1. Returns the re-ranked roster. Ids not enrolled → 422. */
|
|
26
|
+
rankCourseDateStudents: (courseDateId, studentIds) => this.#client.put(`${base}/course-dates/${courseDateId}/students/ranking`, { student_ids: studentIds }),
|
|
21
27
|
/** Mark a student's attendance on any teacher's session. */
|
|
22
28
|
markAttendance: (sessionId, studentId, present) =>
|
|
23
29
|
this.#client.patch(`${base}/sessions/${sessionId}/attendance`, { student_id: studentId, present }),
|
package/src/api/v1/Teacher.js
CHANGED
|
@@ -54,8 +54,10 @@ export default class Teacher {
|
|
|
54
54
|
courseDates: () => this.#client.get(`${base}/course-dates`),
|
|
55
55
|
/** All sessions for one CourseDate, each with a `students` roster ({id, name, present}). */
|
|
56
56
|
courseDateSessions: (courseDateId) => this.#client.get(`${base}/course-dates/${courseDateId}/sessions`),
|
|
57
|
-
/** Enrolled roster ({id, name, email}) for one CourseDate, read straight off enrollment — shows up even before any session has been synced. Read-only: does not move students between dates. */
|
|
57
|
+
/** Enrolled roster ({id, name, email, rank}, ranked first — unranked last) for one CourseDate, read straight off enrollment — shows up even before any session has been synced. Read-only: does not move students between dates. */
|
|
58
58
|
courseDateStudents: (courseDateId) => this.#client.get(`${base}/course-dates/${courseDateId}/students`),
|
|
59
|
+
/** Save the teacher's ranking of one CourseDate's students: `studentIds` in order, first = rank 1. Returns the re-ranked roster ({id, name, email, rank}). Ids not enrolled → 422. */
|
|
60
|
+
rankCourseDateStudents: (courseDateId, studentIds) => this.#client.put(`${base}/course-dates/${courseDateId}/students/ranking`, { student_ids: studentIds }),
|
|
59
61
|
/** One student's quiz attempts in this CourseDate's course, every one of them - not just needs_teacher_correction=1 (auto-graded ones never show up in the "Quizzes por corregir" surfaces below). Each row carries `quiz.needs_teacher_correction`, `level`/`lesson`, `final_score_percentage`; filter by level/lesson client-side. */
|
|
60
62
|
courseDateStudentQuizzes: (courseDateId, studentId) => this.#client.get(`${base}/course-dates/${courseDateId}/students/${studentId}/quizzes`),
|
|
61
63
|
/** { url, pending } — the zip archive of this group's course materials, or pending:true while it's (re)building. */
|