|
|
@@ -4,12 +4,15 @@ import cn.seecoder.seecoderportalcommon.vo.CreateEvalExamVO;
|
|
|
import cn.seecoder.seecoderportalcommon.vo.QuestionScoreMapVO;
|
|
|
import cn.seecoder.seecoderportalserver.security.SecurityUtils;
|
|
|
import cn.seecoder.seecoderportalserver.service.ExamService;
|
|
|
+import cn.seecoder.seecoderportalserver.serviceImpl.subsystem.EaiService;
|
|
|
import cn.seecoder.seecoderportalserver.utility.OkResponse;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
+import org.springframework.security.core.annotation.AuthenticationPrincipal;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
import springfox.documentation.annotations.ApiIgnore;
|
|
|
@@ -387,4 +390,33 @@ public class ExamController {
|
|
|
return OkResponse.of(examService.findEaiTeacherExamsByCourseId(courseId));
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据id删除某个写作作业
|
|
|
+ * @param teacherId
|
|
|
+ * @param assignmentId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @DeleteMapping("eai/assignment/delete")
|
|
|
+ public JSONObject deleteWritingAssignment(
|
|
|
+ @AuthenticationPrincipal(expression = "id") Long teacherId,
|
|
|
+ @RequestParam Long assignmentId
|
|
|
+ ) {
|
|
|
+ return examService.deleteAssignment(teacherId,assignmentId);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据id删除某个口语作业
|
|
|
+ * @param teacherId
|
|
|
+ * @param assignmentId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @DeleteMapping("eai/speaking_assignment/delete")
|
|
|
+ public JSONObject deleteSpeakingAssignment(
|
|
|
+ @AuthenticationPrincipal(expression = "id") Long teacherId,
|
|
|
+ @RequestParam Long assignmentId
|
|
|
+ ) {
|
|
|
+ return examService.deleteSpeakAssignment(teacherId,assignmentId);
|
|
|
+ }
|
|
|
+
|
|
|
}
|