package net.sourceforge.fenixedu.presentationTier.Action; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import net.sourceforge.fenixedu.domain.inquiries.TeacherInquiryTemplate; import net.sourceforge.fenixedu.injectionCode.AccessControl; import net.sourceforge.fenixedu.presentationTier.Action.base.FenixDispatchAction; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; public class RespondToTeachingInquiriesQuestion extends FenixDispatchAction { public final ActionForward showQuestion(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { final TeacherInquiryTemplate currentTemplate = TeacherInquiryTemplate.getCurrentTemplate(); request.setAttribute("inquiryTemplate", currentTemplate); request.setAttribute("executionCourses", AccessControl.getPerson().getExecutionCoursesWithTeachingInquiriesToAnswer()); return mapping.findForward("respondToInquiriesQuestion"); } private ActionForward forward(final String path) { final ActionForward actionForward = new ActionForward(); actionForward.setPath(path); actionForward.setRedirect(true); return actionForward; } public final ActionForward respondLater(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { return forward("/home.do"); } }