[关闭]
@fuyb1986 2018-03-21T08:04:12.000000Z 字数 1874 阅读 660

教室的评价

儿童编程


获取成对的教室评价

Method and URL Structure

Method Resource URL Authorization
GET /classroom/classroom_two_evaluations/ NO

Request Parameters

Name Description Required
student 学生用户名 YES

cURL Example

  1. curl -X GET -H 'Authorization: token 95b7b4d8fff5d76c9d3d2954fe5c7d456c110a8c' -H 'Content-Type: application/json' http://localhost/classroom/classroom_two_evaluations/?student=18012345678

Reponse

  1. {
  2. "count":1,
  3. "next":null,
  4. "previous":null,
  5. "results":[{
  6. "pk":2,
  7. "name":"三年级(9)班",
  8. "types":"onetoone",
  9. "status":"finish",
  10. "scores": 0,
  11. "student_evaluation":{
  12. "pk":4,
  13. "owner":null,
  14. "evaluation_type":"teacher",
  15. "scores":5,
  16. "scores_display":"五星",
  17. "image":"http://www.example.com/1.png",
  18. "content":"评价内容",
  19. "create_time":"2018-01-04T16:35:08.255734",
  20. "record":null
  21. },
  22. "teacher_evaluation":{
  23. "pk":3,
  24. "evaluation_type":"student",
  25. "scores":5,
  26. "scores_display":"五星",
  27. "image":"http://www.example.com/1.png",
  28. "content":"评价内容",
  29. "create_time":"2018-01-04T16:35:08.176043",
  30. "record":null
  31. }
  32. }...]
  33. }

对上完课程的教室评分

Method and URL Structure

Method Resource URL Authorization
POST /classroom/score/${pk}/ NO

Request Parameters

Name Description Required
scores 分数: 1 ~ 5 分 YES

Request Data

  1. {
  2. "scores": 5
  3. }

cURL Example

  1. curl -X POST -H 'Authorization: token 95b7b4d8fff5d76c9d3d2954fe5c7d456c110a8c' -H 'Content-Type: application/json' http://localhost/classroom/score/123456/

获取老师的评论

Method and URL Structure

Method Resource URL Authorization
GET /classroom/evaluations/ NO

Request Parameters

Name Description Required
teacher 老师用户名 YES
all 所有 YES

cURL Example

  1. curl -X GET -H 'Authorization: token 95b7b4d8fff5d76c9d3d2954fe5c7d456c110a8c' -H 'Content-Type: application/json' http://localhost/classroom/evaluations/?teacher=18012345678

Reponse

  1. {
  2. "count":1,
  3. "previous":null,
  4. "next":null,
  5. "results":[{
  6. "scores_display":"五星",
  7. "evaluation_type":"student",
  8. "content":"评价内容",
  9. "record":null,
  10. "create_time":"2018-03-21T15:57:40.917837",
  11. "scores":5,
  12. "owner":{
  13. "name":"赵小明",
  14. "avatar":"http://www.example.com/xiaoming.jpg"
  15. },
  16. "pk":1,"image":"http://www.example.com/1.png"
  17. }..]
  18. }
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注