Index: lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/service/AssessmentServiceImpl.java =================================================================== diff -u -r2d0422cb41945e1e1b52ad67403354df34fae0aa -rb9a48a62716b4def723a7935b94e30eca3f5c71a --- lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/service/AssessmentServiceImpl.java (.../AssessmentServiceImpl.java) (revision 2d0422cb41945e1e1b52ad67403354df34fae0aa) +++ lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/service/AssessmentServiceImpl.java (.../AssessmentServiceImpl.java) (revision b9a48a62716b4def723a7935b94e30eca3f5c71a) @@ -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 =================================================================== diff -u -r2d0422cb41945e1e1b52ad67403354df34fae0aa -rb9a48a62716b4def723a7935b94e30eca3f5c71a --- lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/service/IAssessmentService.java (.../IAssessmentService.java) (revision 2d0422cb41945e1e1b52ad67403354df34fae0aa) +++ lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/service/IAssessmentService.java (.../IAssessmentService.java) (revision b9a48a62716b4def723a7935b94e30eca3f5c71a) @@ -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 =================================================================== diff -u -r2d0422cb41945e1e1b52ad67403354df34fae0aa -rb9a48a62716b4def723a7935b94e30eca3f5c71a --- lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/web/action/LearningAction.java (.../LearningAction.java) (revision 2d0422cb41945e1e1b52ad67403354df34fae0aa) +++ lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/web/action/LearningAction.java (.../LearningAction.java) (revision b9a48a62716b4def723a7935b94e30eca3f5c71a) @@ -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);