EvaluationActivity.java 文件源码

java
阅读 17 收藏 0 点赞 0 评论 0

项目:liferaylms-portlet 作者:
public void publish(ActionRequest actionRequest,ActionResponse actionResponse) throws Exception{

    LearningActivity learningActivity = LearningActivityLocalServiceUtil.getLearningActivity(ParamUtil.getLong(actionRequest, "actId"));

    Document document = SAXReaderUtil.read(learningActivity.getExtracontent());
    Element rootElement = document.getRootElement();

    Element publishDate = rootElement.element("publishDate");
    if(publishDate==null){
        rootElement.addElement("publishDate").setText(_dateFormat.format(new Date()));
    }
    learningActivity.setExtracontent(document.formattedString());
    LearningActivityLocalServiceUtil.updateLearningActivity(learningActivity);


    PortletURL viewPortletURL = ((LiferayPortletResponse)actionResponse).createRenderURL();
    viewPortletURL.setParameter("jspPage","/html/evaluationtaskactivity/view.jsp");

    String returnToFullPageURL = actionRequest.getParameter("returnToFullPageURL");
    if(Validator.isNotNull(returnToFullPageURL)) {
        viewPortletURL.setParameter("returnToFullPageURL", returnToFullPageURL);
    }

    actionResponse.sendRedirect(viewPortletURL.toString());
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号