package servlet;

import core.process.C_MentorFillReview;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Map;

@WebServlet("/home/mentor-fill-review")
public class S_MentorFillReview extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        String id = request.getParameter("id");
        Map<String,String> vMap = servlet.Utils.getVMap(vName,request);

        C_MentorFillReview p=new C_MentorFillReview();
        p.setGraduationDesignId(id);
        p.setVMap(vMap);
        try {
            p.teacherTeamFillOpeningReportOpinion();
        } catch (Exception e) {
            e.printStackTrace();
            response.sendRedirect("/op_fail.jsp");
        }

    }
    static String[] vName = {
            "total_grade",
            "review_opinion"
    };
}