Index: lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/service/AssessmentServiceImpl.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/service/AssessmentServiceImpl.java,v diff -u -r1.48.2.45 -r1.48.2.46 --- lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/service/AssessmentServiceImpl.java 14 Mar 2017 17:57:06 -0000 1.48.2.45 +++ lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/service/AssessmentServiceImpl.java 14 Mar 2017 18:06:07 -0000 1.48.2.46 @@ -506,7 +506,7 @@ @Override public boolean storeUserAnswers(Assessment assessment, Long userId, List> pagedQuestions, Long singleMarkHedgingQuestionUid, - boolean isAutosave) { + boolean isAutosave) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { int maximumGrade = 0; float grade = 0; @@ -583,8 +583,11 @@ * @param isAutosave * in case of autosave there is no need to calculate marks * @return grade that user scored by answering that question + * @throws NoSuchMethodException + * @throws InvocationTargetException + * @throws IllegalAccessException */ - private float storeUserAnswer(AssessmentResult assessmentResult, AssessmentQuestion question, boolean isAutosave) { + private float storeUserAnswer(AssessmentResult assessmentResult, AssessmentQuestion question, boolean isAutosave) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { AssessmentQuestionResult questionResult = null; // get questionResult from DB instance of AssessmentResult @@ -597,20 +600,7 @@ if (assessmentResult.getFinishDate() == null && questionResult == null) { //it should get here only in case teacher edited content in monitor which led to removal of autosave questionResult AssessmentQuestion modifiedQuestion = assessmentQuestionDao.getByUid(question.getUid()); - try { - PropertyUtils.copyProperties(question, modifiedQuestion); -// question.getOptions().clear(); -// question.getOptions().addAll(modifiedQuestion.getOptions()); - } catch (IllegalAccessException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (InvocationTargetException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (NoSuchMethodException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } + PropertyUtils.copyProperties(question, modifiedQuestion); return 0; // questionResult = createQuestionResultObject(question); Index: lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/service/IAssessmentService.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/service/IAssessmentService.java,v diff -u -r1.26.2.16 -r1.26.2.17 --- lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/service/IAssessmentService.java 14 Mar 2017 17:57:06 -0000 1.26.2.16 +++ lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/service/IAssessmentService.java 14 Mar 2017 18:06:07 -0000 1.26.2.17 @@ -221,9 +221,12 @@ * indicates whether it's autosave request * * @return whether storing results is allowed, false otherwise + * @throws NoSuchMethodException + * @throws InvocationTargetException + * @throws IllegalAccessException */ boolean storeUserAnswers(Assessment assessment, Long userId, List> pagedQuestions, - Long singleMarkHedgingQuestionUid, boolean isAutosave); + Long singleMarkHedgingQuestionUid, boolean isAutosave) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException; /** * Return the latest result (it can be unfinished). Index: lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/web/action/LearningAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/web/action/LearningAction.java,v diff -u -r1.42.2.21 -r1.42.2.22 --- lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/web/action/LearningAction.java 14 Mar 2017 17:57:06 -0000 1.42.2.21 +++ lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/web/action/LearningAction.java 14 Mar 2017 18:06:08 -0000 1.42.2.22 @@ -424,9 +424,12 @@ /** * Shows next page. It's available only to leaders as non-leaders see all questions on one page. + * @throws NoSuchMethodException + * @throws InvocationTargetException + * @throws IllegalAccessException */ private ActionForward nextPage(ActionMapping mapping, ActionForm form, HttpServletRequest request, - HttpServletResponse response) throws ServletException { + HttpServletResponse response) throws ServletException, IllegalAccessException, InvocationTargetException, NoSuchMethodException { IAssessmentService service = getAssessmentService(); String sessionMapID = WebUtil.readStrParam(request, AssessmentConstants.ATTR_SESSION_MAP_ID); SessionMap sessionMap = (SessionMap) request.getSession() @@ -469,9 +472,12 @@ /** * Handling submittion of MarkHedging type of Questions (in case of leader aware tool). + * @throws NoSuchMethodException + * @throws InvocationTargetException + * @throws IllegalAccessException */ private ActionForward submitSingleMarkHedgingQuestion(ActionMapping mapping, ActionForm form, - HttpServletRequest request, HttpServletResponse response) throws ServletException { + HttpServletRequest request, HttpServletResponse response) throws ServletException, IllegalAccessException, InvocationTargetException, NoSuchMethodException { IAssessmentService service = getAssessmentService(); String sessionMapID = WebUtil.readStrParam(request, AssessmentConstants.ATTR_SESSION_MAP_ID); SessionMap sessionMap = (SessionMap) request.getSession() @@ -522,9 +528,12 @@ /** * Display same entire authoring page content from HttpSession variable. + * @throws NoSuchMethodException + * @throws InvocationTargetException + * @throws IllegalAccessException */ private ActionForward submitAll(ActionMapping mapping, ActionForm form, HttpServletRequest request, - HttpServletResponse response) throws ServletException { + HttpServletResponse response) throws ServletException, IllegalAccessException, InvocationTargetException, NoSuchMethodException { String sessionMapID = WebUtil.readStrParam(request, AssessmentConstants.ATTR_SESSION_MAP_ID); SessionMap sessionMap = (SessionMap) request.getSession() .getAttribute(sessionMapID); @@ -714,9 +723,12 @@ /** * auto saves responses + * @throws NoSuchMethodException + * @throws InvocationTargetException + * @throws IllegalAccessException */ private ActionForward autoSaveAnswers(ActionMapping mapping, ActionForm form, HttpServletRequest request, - HttpServletResponse response) { + HttpServletResponse response) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { IAssessmentService service = getAssessmentService(); String sessionMapID = WebUtil.readStrParam(request, AssessmentConstants.ATTR_SESSION_MAP_ID); SessionMap sessionMap = (SessionMap) request.getSession() @@ -1178,8 +1190,11 @@ /** * Store user answers in DB in last unfinished attempt and notify teachers about it. + * @throws NoSuchMethodException + * @throws InvocationTargetException + * @throws IllegalAccessException */ - private boolean storeUserAnswersIntoDatabase(SessionMap sessionMap, boolean isAutosave) { + private boolean storeUserAnswersIntoDatabase(SessionMap sessionMap, boolean isAutosave) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { List> pagedQuestions = (List>) sessionMap .get(AssessmentConstants.ATTR_PAGED_QUESTIONS);