Пример #1
0
 /**
  * 竞赛删除试卷
  *
  * @param request
  * @param name
  * @return
  */
 @RequestMapping("/deleteexam")
 public void deleteexam(
     HttpServletRequest request, HttpServletResponse response, int competionId, int examId) {
   try {
     PrintWriter out = response.getWriter();
     examService.removeExam(competionId, examId);
     String str = "{'sucess':'sucess'}";
     out.write(str);
   } catch (Exception e) {
     e.printStackTrace();
   }
 }
Пример #2
0
 /**
  * 竞赛选择试卷
  *
  * @param request
  * @param name
  * @return
  */
 @RequestMapping("/selectexam")
 public void selectexam(
     HttpServletRequest request, HttpServletResponse response, int competionId, int examId) {
   try {
     PrintWriter out = response.getWriter();
     String time = examService.selectexam(competionId, examId);
     String str = "{'sucess':'sucess','time':'" + time + "'}";
     out.write(str);
   } catch (Exception e) {
     e.printStackTrace();
   }
 }
Пример #3
0
 /**
  * 竞赛创建试卷
  *
  * @param request
  * @param name
  * @return
  */
 @RequestMapping("/addexam")
 public void addexam(
     HttpServletRequest request,
     HttpServletResponse response,
     int userId,
     int competionId,
     String name,
     int categoryId) {
   try {
     PrintWriter out = response.getWriter();
     examService.createExam(name, userId, competionId, categoryId);
     String str = "{'sucess':'sucess'}";
     out.write(str);
   } catch (Exception e) {
     e.printStackTrace();
   }
 }