mark.setPublishedMark(mark.getMark());
    public List<InfoSiteDistributedTestAdvisory> run(Integer executionCourseId, Integer distributedTestId, Double newValue, Integer questionId,            Integer studentId, TestQuestionStudentsChangesType studentsType, String path) throws FenixServiceException, ExcepcaoPersistencia {        List<InfoSiteDistributedTestAdvisory> infoSiteDistributedTestAdvisoryList = new ArrayList<InfoSiteDistributedTestAdvisory>();        ISuportePersistente persistentSuport = PersistenceSupportFactory.getDefaultPersistenceSupport();        IPersistentStudentTestQuestion persistentStudentTestQuestion = persistentSuport.getIPersistentStudentTestQuestion();        List<StudentTestQuestion> studentsTestQuestionList = new ArrayList<StudentTestQuestion>();        if (studentsType.getType().intValue() == TestQuestionStudentsChangesType.THIS_STUDENT) {            studentsTestQuestionList.add(persistentStudentTestQuestion.readByQuestionAndStudentAndDistributedTest(questionId, studentId,                    distributedTestId));        } else if (studentsType.getType().intValue() == TestQuestionStudentsChangesType.STUDENTS_FROM_TEST_VARIATION) {            studentsTestQuestionList.addAll(persistentStudentTestQuestion.readByQuestionAndDistributedTest(questionId, distributedTestId));        } else if (studentsType.getType().intValue() == TestQuestionStudentsChangesType.STUDENTS_FROM_TEST) {            StudentTestQuestion studentTestQuestion = persistentStudentTestQuestion.readByQuestionAndStudentAndDistributedTest(questionId,                    studentId, distributedTestId);            studentsTestQuestionList.addAll(persistentStudentTestQuestion.readByOrderAndDistributedTest(studentTestQuestion.getTestQuestionOrder(),                    distributedTestId));        } else if (studentsType.getType().intValue() == TestQuestionStudentsChangesType.ALL_STUDENTS) {            studentsTestQuestionList.addAll(persistentStudentTestQuestion.readByQuestion(questionId));        }        for (StudentTestQuestion studentTestQuestion : studentsTestQuestionList) {            InfoSiteDistributedTestAdvisory infoSiteDistributedTestAdvisory = new InfoSiteDistributedTestAdvisory();            infoSiteDistributedTestAdvisory.setInfoDistributedTest(InfoDistributedTest.newInfoFromDomain(studentTestQuestion.getDistributedTest()));            infoSiteDistributedTestAdvisory.setInfoAdvisory(null);            List<InfoStudent> group = new ArrayList<InfoStudent>();            if (!group.contains(studentTestQuestion.getStudent().getPerson())) {                group.add(InfoStudent.newInfoFromDomain(studentTestQuestion.getStudent()));            }            if (studentTestQuestion.getResponse() != null                    && studentTestQuestion.getDistributedTest().getTestType().equals(new TestType(TestType.EVALUATION))) {                studentTestQuestion.setTestQuestionMark(getNewQuestionMark(studentTestQuestion, newValue, path.replace('\\', '/')));                OnlineTest onlineTest = (OnlineTest) persistentSuport.getIPersistentOnlineTest().readByDistributedTest(                        studentTestQuestion.getDistributedTest().getIdInternal());                ExecutionCourse executionCourse = (ExecutionCourse) persistentSuport.getIPersistentExecutionCourse().readByOID(                        ExecutionCourse.class, executionCourseId);                Attends attend = persistentSuport.getIFrequentaPersistente().readByAlunoAndDisciplinaExecucao(                        studentTestQuestion.getStudent().getIdInternal(), executionCourse.getIdInternal());                Mark mark = persistentSuport.getIPersistentMark().readBy(onlineTest, attend);                if (mark != null) {                    mark.setMark(getNewStudentMark(persistentSuport, studentTestQuestion.getDistributedTest(), studentTestQuestion.getStudent()));                    mark.setPublishedMark(mark.getMark());                }            }            studentTestQuestion.setTestQuestionValue(newValue);            infoSiteDistributedTestAdvisory.setInfoStudentList(group);            infoSiteDistributedTestAdvisoryList.add(infoSiteDistributedTestAdvisory);            StudentTestLog studentTestLog = DomainFactory.makeStudentTestLog();            studentTestLog.setDistributedTest(studentTestQuestion.getDistributedTest());            studentTestLog.setStudent(studentTestQuestion.getStudent());            studentTestLog.setDate(Calendar.getInstance().getTime());            ResourceBundle bundle = ResourceBundle.getBundle("ServidorApresentacao.ApplicationResources");            studentTestLog.setEvent(MessageFormat.format(bundle.getString("message.changeStudentValueLogMessage"), new Object[] { newValue }));        }        return infoSiteDistributedTestAdvisoryList;    }