Exemplo n.º 1
0
  /*
   * 载入评价学生页面
   */
  public String goJudgeStudentPage() {
    // 准备评价题目
    ListOfJjudgeQuestion = judgeStudentService.loadJudgeQuestion();
    // 根据recordId获取courseRecord信息
    CourseRecord courseRecord = recordService.getRecordById(recordId);
    // 获取课程ID
    courseId = courseRecord.getCourse().getCourseID();
    users = courseRecord.getCourse().getUsers();

    return "loadJudgeStudentPage";
  }
Exemplo n.º 2
0
  /*
   * 新增评价学生
   */
  public String addJudgeStudent() {
    HttpServletRequest request = ServletActionContext.getRequest();
    HttpSession session = request.getSession();
    User user = (User) session.getAttribute("user");

    judgeStudent.setTeacherName(user.getUserName());

    Course course = new Course();
    course.setCourseID(courseId);
    judgeStudent.setCourse(course);
    try {
      judgeStudentService.addJudge(judgeStudent, answer);
      addJudgeResult = "success";
    } catch (Exception e) {
      addJudgeResult = "error";
    }
    return "judgeResult";
  }