|
|
@@ -9,7 +9,7 @@ function getStudentCoderExams({page, limit}) {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-function getStudentCoderExamsGroupByCourse(){
|
|
|
+function getStudentCoderExamsGroupByCourse() {
|
|
|
return axios.get(`${prefix}/exam/student/groupByCourse`);
|
|
|
}
|
|
|
|
|
|
@@ -24,7 +24,7 @@ function getRecommendCoderExams() {
|
|
|
return axios.get(`${prefix}/exam/recommend`);
|
|
|
}
|
|
|
|
|
|
-function getRecommendCoderExamsGroupByCourse(){
|
|
|
+function getRecommendCoderExamsGroupByCourse() {
|
|
|
return axios.get(`${prefix}/exam/recommend/groupByCourse`);
|
|
|
}
|
|
|
|
|
|
@@ -36,11 +36,11 @@ function getStudentCoderExamsByCourseId(courseId) {
|
|
|
return axios.get(`${prefix}/exam/student/course`, {params: {courseId,}});
|
|
|
}
|
|
|
|
|
|
-function getTeacherCoderExamsGroupByCourse(){
|
|
|
+function getTeacherCoderExamsGroupByCourse() {
|
|
|
return axios.get(`${prefix}/exam/teacher/groupByCourse`);
|
|
|
}
|
|
|
|
|
|
-function retrievePageProblem(page, limit, typeStr, name){
|
|
|
+function retrievePageProblem(page, limit, typeStr, name) {
|
|
|
return axios.get(`${prefix}/problem`, {
|
|
|
params: {
|
|
|
page,
|
|
|
@@ -51,7 +51,7 @@ function retrievePageProblem(page, limit, typeStr, name){
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-function createCoderExam(data){
|
|
|
+function createCoderExam(data) {
|
|
|
return axios.post(`${prefix}/exam/create`, data);
|
|
|
}
|
|
|
|
|
|
@@ -119,6 +119,14 @@ function changeExamIsShownForStu(examId, status) {
|
|
|
return axios.post(`${prefix}/exam/${examId}/console?showConsole=${status}`);
|
|
|
}
|
|
|
|
|
|
+function stopRecord(recordId) {
|
|
|
+ return axios.put(`${prefix}/record/stop`, null, {
|
|
|
+ params: {
|
|
|
+ recordId,
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
const coderAPIs = {
|
|
|
getStudentCoderExams,
|
|
|
getStudentCoderExamsGroupByCourse,
|
|
|
@@ -147,7 +155,8 @@ const coderAPIs = {
|
|
|
getCommitByCommitId,
|
|
|
getRecordByRecordId,
|
|
|
getExamIsShownForStu,
|
|
|
- changeExamIsShownForStu
|
|
|
+ changeExamIsShownForStu,
|
|
|
+ stopRecord,
|
|
|
};
|
|
|
|
|
|
export default coderAPIs;
|