Đánh giá học sinh sau giờ học (After Class Student Evaluation)

Mục lục

API này cần các tham số SID, safekey, timeStamp, class ID, comment data,…

SID, safekey, timeStamp, class ID, comment data, etc. Returns the details of the revised evaluation under this section.

URL

https://api.eeo.cn/partner/api/course.api.php?action=updateClassStudentComment

HTTP Request Methods

  • POST

Coding format

  • UTF-8

Request data

Key Bắt buộc Yêu cầu thêm Mô tả Hướng dẫn
SID Bắt buộc ID trường Xem dữ liệu này tại Trang quản lý classin.com trong mục API
safeKey Bắt buộc Fixed 32-bit all lowercase characters Khóa bảo mật xác thực trường học safeKey=MD5(SECRET+timeStamp)
timeStamp Bắt buộc Theo Unix Epoch timestamp & có hiệu lực trong vòng 20 phút Thời gian UNIX Epoch là số giây đã trôi qua kể từ 00:00:00 (giờ chuẩn quốc tế) vào ngày 1 tháng 1 năm 1970
classId Bắt buộc ClassID ID của lớp học (lesson)
commentJson Bắt buộc   Comment data structure
  └ starNum Bắt buộc StartNum là số điểm đánh giá từ 0 đến 5, thấp hơn 0 sẽ mặc định là 0, cao hơn 5 sẽ mặc định là 5 Đánh giá (số sao)
  └ comment Bắt buộc Comment là chuỗi có độ dài ít hơn 1000 ký tự, nếu dài hơn 1000 ký tự, hệ thống sẽ tự cắt phần thừa Nọi dung đánh giá
  └ customColumn The customColumn có thể để trống trường này. Nếu điền thông tin thì độ dài tối đa 50 ký tự
  └ studentUid Bắt buộc UID của học sinh UID hệ thống trả về khi đăng ký tài khoản thành công

Response data

Key Định dạng Phản hồi Ý nghĩa
data array [] Returns Data information array
└ data returns information 1 object   Trả về nội dung đánh giá của học sinh
  └ studentUid string “1001001” UID của người dùng
  └ customColumn string Custom fields, what is passed is what is returned, if not passed, the field will not be returned Custom fields
  └ errno string 1 Mã lỗi
  └ error string “The program is running normally” Chi tiết lỗi
└ data returns information 2 object   Trả về nội dung đánh giá của học sinh
  └ studentUid string “1001002” UID của người dùng
  └ customColumn string Custom fields, what is passed is what is returned, if not passed, the field will not be returned Custom fields
  └ errno string 1 Mã lỗi
  └ error string “The program is running normally” Chi tiết lỗi
error_info object   Return information object
  └ errno number 1 Mã lỗi
  └ error string “The program is running normally” Chi tiết lỗi

Sample

  • HTTP request
POST /partner/api/course.api.php?action=updateClassStudentComment HTTP/1.1
Host: root_url
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache

SID=2339736&safeKey=d8e6b1b7b55483ba93da7bc8e1d9514f&timeStamp=1493728253&classId=27981=commentJson=[{"studentUid":"1001001","starNum":"5","comment":"评价内容","customColumn":"学生1"},{"studentUid":"1001002","starNum":"5","comment":"评价内容","customColumn":"学生2"}]
  • Shell cURL analog request instruction
curl -H "Content-Type: application/x-www-form-urlencoded" -X "POST" \
      -d "SID=1234567" \
      -d "safeKey=0f7781b3033527a8cc2b1abbf45a5fd2" \
      -d "timeStamp=1484719085" \
      -d "classId=27981" \
      -d 'commentJson= \
        [ \
          { \
            "studentUid": "1001002", \
            "starNum": "5", \
            "comment": "评价内容", \
            "customColumn": "用户自定义标识" \
          } \
        ]' \
      "https://api.eeo.cn/partner/api/course.api.php?action=updateClassStudentComment"

Response sample(The normal return json packet example)

{
    "data": [
        {
            "studentUid": "1001001",
            "customColumn": "学生1",
            "errno": 1,
            "error": "程序正常执行"
        },
        {
            "studentUid": "1001002",
            "customColumn": "学生2",
            "errno": 1,
            "error": "程序正常执行"
        }
    ],
    "error_info": {
        "errno": 1,
        "error": "程序正常执行"
    }
}

Error Code Description

Error Code Description
1 Thành công
100 Parameters sai định dạng hoặc không hoàn chỉnh
102 Không có quyền thao tác (Xác thực bảo mật thất bại)
104 Thao tác thất bại
167 Không có học sinh này trong lớp
228 Không có học sinh này trong trường
233 Không có lớp học này trong trường
369 Hệ thống không hỗ trợ loại khóa học/lớp học này
400 Dữ liệu không hợp lệ