ClassIn-API là giải pháp kết nối cơ bản nhất. Thông qua tài liệu này, bạn có thể học cách đồng bộ hóa nhanh chóng dữ liệu lịch học và dữ liệu người dùng. Tài liệu này hướng dẫn cách gọi một loạt các API để đồng bộ hóa dữ liệu lịch học và người dùng với nền tảng ClassIn khi người dùng đăng ký thông tin hoặc tham gia vào lớp học trên nền tảng của nhà trường/tổ chức.
Lưu ý: Giải pháp này chỉ giới hạn ở việc đạt được khả năng kết nối nhanh nhằm đáp ứng mục đích đồng bộ dữ liệu giữa các nền tảng thông qua API. Để tích hợp tốt hơn nền tảng của bạn với ClassIn, cần phải cải thiện các thao tác sửa đổi và xóa dữ liệu liên quan.
Ghi chú về đồng bộ hóa dữ liệu #
Quá trình tích hợp API, dữ liệu sẽ được đồng bộ hóa một chiều, tức là từ nền tảng của bạn → eeo (hệ thống của classin), dữ liệu hoạt động của eeo sẽ không được đồng bộ hóa trở lại nền tảng của bạn; eeo hiện không có phương thức để nhà trường/ tổ chức chủ động lấy dữ liệu (chỉ có thể đăng ký để nhận dữ liệu gửi về từ chúng tôi). Nhằm tránh vấn đề bất đồng bộ dữ liệu giữa hai hệ thống chúng tôi có các đề xuất sau để bạn tham khảo:
1. Nhà trường/tổ chức cần phải chủ động lưu trữ dữ liệu có liên quan (bao gồm nhưng không giới hạn ở ID người dùng, ID khóa học, ID bài học, v.v.) trong cơ sở dữ liệu của nhà trường/tổ chức;
2. Tài khoản quản lý phụ (sub-account) không nên được cấp quyền quản lý các mục thuộc phần ‘Giảng dạy’ tại Trang quản lý trừ khi cần thiết;
3. Vai trò giáo viên chủ nhiệm không nên được thiết lập trừ khi cần thiết cho khóa học;
4. Tại giao diện Trang quản lý classin.com – Cài đặt – Cài đặt lớp học, vui lòng tắt ‘Trạng thái mặc định cho phép giáo viên thêm tiết học/lớp học trừ’ khi cần thiết;
1. Thêm người dùng #
Dữ liệu người dùng phải được đăng ký tài khoản ClassIn và thêm vào danh sách học sinh hoặc giáo viên của trường trước khi được thêm vào bất kỳ khóa học nào; UID là mã định danh duy nhất của người dùng trong ClassIn. UID có thể có nhiều danh tính trong trường cùng một lúc, chẳng hạn như giáo viên của tổ chức, học sinh, tài khoản quản trị phụ, v.v.;
1.1 Mô tả quy trình #
- Gọi API đăng ký để lấy UID người dùng. Chi tiết vui lòng tham khảo Tạo tài khoản người (Register user) và truyền tham số addToSchoolMember để thêm người dùng vào trường với vai trò tương ứng.
- Để thêm vai trò cho người dùng, gọi API Thêm giáo viên (Add teacher) và Thêm học sinh (Add student). Tuy nhiên, bạn nên gán luôn vai trò cho người dùng ngay khi dùng API tạo tài khoản (Register user).
1.2 Ghi chú #
- Nếu tài khoản người dùng đã đăng ký ClassIn, trường addToSchoolMember vẫn sẽ được truyền. Lúc này, người dùng vẫn sẽ được thêm vào danh sách của nhà trường/tổ chức và được gán với vai trò tương ứng, nhưng mật khẩu tài khoản, ảnh đại diện và biệt danh sẽ không bị đặt lại;
- ID trả về bởi giao diện thêm (thêm giáo viên, thêm học sinh) là ID thể hiện mối quan hệ giữa tài khoản người dùng và trường học. Tham số này không nên được sử dụng khi lên lịch lớp học. Hãy sử dụng UID trả về bởi giao diện tạo tài khoản để thực hiện thao tác lên lịch học.
2. Thêm lịch học #
2.1 Tình huống 1: Nhà trường sếp lịch học cho học sinh #
Quản trị viên hoặc giáo viên của trường sẽ tạo khóa học trên nền tảng nhà trường/ tổ chức, sau đó phân bổ thêm học sinh vào các khóa học để lên lịch học. Ở mỗi thao tác trên nền tảng của nhà trường/ tổ chức, thì hệ thống của bạn sẽ gọi API để đồng bộ dữ liệu đến hệ thống của eeo (ClassIn). Lúc này, học sinh chỉ cần vào lớp học trực tuyến trên ứng dụng ClassIn theo đúng thời gian học. Lưu ý: Thao tác này phải được thực hiện sau khi đã hoàn tất thêm người dùng vào trường;
- Bước 1: Dựa theo thông tin khóa học (lớp học) trên nền tảng, gọi API để tạo khóa học, tham khảo mục Tạo khóa học ;
- Bước 2: Thêm học viên vào khóa học, tham khảo mục Thêm từng học sinh/người dự thính vào khóa học và Thêm nhiều học sinh/người dự thính vào khóa học;
- Bước 3: Tạo bài học, tham khảo mục Tạo từng lớp học và Tạo nhiều lớp học cùng lúc;
2.2 Tình huống 2: Học sinh tự sếp lịch học từ hệ thống đặt lịch #
Lưu ý: Thao tác này phải được thực hiện sau khi đã hoàn tất thêm người dùng vào trường;
- Bước 1: Hệ thống đặt lịch của trường cần gọi API Tạo khóa học để đảm bảo các khóa học đang hiển thị trên lịch tương ứng với khóa học trong hệ thống của eeo (ClassIn);
- Bước 2: Thêm học viên vào khóa học tương ứng thông qua API Thêm từng học sinh/người dự thính vào khóa học;
- Bước 3: Tạo lớp học tương ứng theo thông tin đặt lịch của học sinh, tham khảo Tạo từng lớp học và Tạo nhiều lớp học cùng lúc;
Basic API Integration Solution: It enables you to synchronize data of users and classrooms from your system to the ClassIn. This session introduces APIs you are going to call from your system’s backend when a student registers and joins in a class in your platform.
Note: This solution can solve to synchronize data through APIs and to finish the integration quickly. In order to better integrate your platform to ClassIn, it is necessary to integrate other functions such as modifying and deleting relevant data
About Data Synchronization #
In API integration, data is synchronized in a single direction, from your system to ClassIn, which means operations in the School Dashboard and the ClassIn app will not be synchronized back to your system. Currently, we do not support the GET method. To avoid data conflict between the two systems, you should:
- 1. Store data related to users and their courses/lessons in your database for your future reference.
- 2. Do not permit sub-accounts to operate Teaching tab in the School Dashboard unless it is necessary.
- 3. When creating a course, do not set the head teacher(course advisor) unnecessarily.
1. Add Users #
- Before scheduling classes for teachers and students, you need to map the users’ accounts in the two systems, the EEO and your own system. The overall steps are to register a ClassIn account for the user and get the user’s UID in the ClassIn, and then add the user to your ClassIn school account. UID is the unique identifier of the user in ClassIn. One UID can have multiple identities in a school, such as school teacher, student, or sub-account in the School Dashboard, etc
1.1 Steps #
- To obtain the user’s UID, the user registration interface must be called . Please refer to Register User for detailed information. Make sure to pass the
addToSchoolMember
parameter to add the user with the desired identity. - Alternatively, if you do not pass the ‘addToSchoolMember’ parameter, you can also add users to the school by calling the interface of Add Teacher or Add School Student . However, it is recommended to use the register user interface to complete the registration process and add the teacher or student identities at the same time .
1.2 Notes #
- 1. When the user account is already registered in ClassIn, by passing
addToSchoolMember
, the user will still be added to the school’s admin dashboard and assigned the corresponding identity. However, the account password, avatar, and nickname will not be reset. - 2. The data returned by the interfaces of adding school teachers and students is the relationship ID between the user and the school. This parameter should not be used during class scheduling. You need to use the UID returned by the interface of registration.
2. Schedule Classes #
2.1 Mode A: School’s Admin Staff Arranges Classes For Students #
- The admin staff or teachers in your school need to create courses first, and add students to courses, and create lessons on your platform in advance. For students, they only need to attend the virtual classroom when lessons start.
Notes:You need to add users to your school first. Let the user has a valid identity in your school. Then can you arrange courses and lessons for the school teachers and students successfully.
- step 1 Call Create Course to create a course according to the info of courses existing in your platform.
- step 2 Add students to the course. Then the students can attend all the lessons in the course. You need the APIs of Add a Single Student/Auditing Student to the Course or Add Multiple Students/Auditing Students to the Course.
- step 3 Create a lesson in the course by calling Add a Single Lesson or Add Multiple Lessons. Students will attend the virtual classroom in the lesson.
2.2 Mode B:Students Book Classes Direclty #
Notes:You need to add users to your school first. Let the user has a valid identity in your school. Then can the student book classes successfully on your platform.
- step 1 Create a course specifically for the student, using the API, Create Course. The course can contain the lessons the student is going to take.
- step 2 Add the student to his/her course by calling the API, Add a Single Student/Auditing Student to the Course.
- step 3 Create lessons according to the student’s class-booking info in your system. APIs needed are Add a Single Lesson and Add Multiple Lessons.