- SCUPIOJ
24 获取作业中题目 v2
测试中
GET
http://127.0.0.1:8000/home/<str:coursename>/<str:assignmentname>/
OJ
获取在str:coursename班级中,str:assignmentname作业中的所有题目
注意
后端对non_programming_answer字段的显示做出了区分
- 对于老师与管理员:在任何时间都可以获得这个字段
- 对于学生:在作业截止之前是没有这个字段的,在作业截止之后会有这个字段
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后 拼接 Token示例:
Authorization: Bearer ********************
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'http://127.0.0.1:8000/home/<str:coursename>/<str:assignmentname>/'
返回响应
🟢200成功
application/json
Body
array of:
id
integer
必需
title
string
必需
content_problem
string
必需
score
integer
题目设定分数
type
string
必需
response_limit
integer | null
必需
non_programming_answer
string | null
必需
score_get
integer
题目学生得分
示例
[
{
"id": 1,
"title": "Problem 1",
"content_problem": "Describe the process of normalization in databases.",
"score": 10,
"type": "text",
"response_limit": 500,
"non_programming_answer": "Normalization is the process of organizing data in a database...",
"score_get": 10
},
{
"id": 2,
"title": "Problem 2",
"content_problem": "What is the time complexity of a binary search algorithm?",
"score": 5,
"type": "choice",
"response_limit": null,
"non_programming_answer": "<-&a&->",
"score_get": 5
},
{
"id": 3,
"title": "Problem 3",
"content_problem": "Write a function to reverse a string.",
"score": 15,
"type": "programming",
"response_limit": 9,
"non_programming_answer": null,
"score_get": 0
}
]