只有老师和管理员可以调用
修改在str:coursename班级中,str:assignmentname作业中的题目的内容,允许批量修改,只需要将修改之后的题目信息放在list中
注意需含有修改题目的id,id可用get获得,返回修改后题目的信息
Authorization: Bearer ********************
[
{
"id": 14,
"title": "NEWProblem 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..."
},
{
"id": 15,
"title": "NEWProblem 2",
"content_problem": "What is the time complexity of a binary search algorithm?",
"score": 5,
"type": "choice",
"response_limit": null,
"non_programming_answer": "O(log n)"
},
{
"id": 16,
"title": "NEWProblem 3",
"content_problem": "Write a function to reverse a string.ASDFASDFASDFADS",
"score": 15,
"type": "programming",
"response_limit": null,
"non_programming_answer": null
}
]
curl --location --request PUT 'http://127.0.0.1:8000/home/<str:coursename>/<str:assignmentname>/' \
--header 'Content-Type: application/json' \
--data-raw '[
{
"id": 14,
"title": "NEWProblem 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..."
},
{
"id": 15,
"title": "NEWProblem 2",
"content_problem": "What is the time complexity of a binary search algorithm?",
"score": 5,
"type": "choice",
"response_limit": null,
"non_programming_answer": "O(log n)"
},
{
"id": 16,
"title": "NEWProblem 3",
"content_problem": "Write a function to reverse a string.ASDFASDFASDFADS",
"score": 15,
"type": "programming",
"response_limit": null,
"non_programming_answer": null
}
]'
[
{
"id": 14,
"title": "NEWProblem 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..."
},
{
"id": 15,
"title": "NEWProblem 2",
"content_problem": "What is the time complexity of a binary search algorithm?",
"score": 5,
"type": "choice",
"response_limit": null,
"non_programming_answer": "O(log n)"
},
{
"id": 16,
"title": "NEWProblem 3",
"content_problem": "Write a function to reverse a string.ASDFASDFASDFADS",
"score": 15,
"type": "programming",
"response_limit": null,
"non_programming_answer": null
}
]