Skip to content
Snippets Groups Projects
Commit cfc3d4b9 authored by srosse's avatar srosse
Browse files

OO-2761: mark news for QTI 2.1 assessment in course

parent 0edc1546
No related branches found
No related tags found
No related merge requests found
...@@ -57,6 +57,7 @@ import org.olat.course.CourseModule; ...@@ -57,6 +57,7 @@ import org.olat.course.CourseModule;
import org.olat.course.DisposedCourseRestartController; import org.olat.course.DisposedCourseRestartController;
import org.olat.course.assessment.AssessmentHelper; import org.olat.course.assessment.AssessmentHelper;
import org.olat.course.assessment.AssessmentManager; import org.olat.course.assessment.AssessmentManager;
import org.olat.course.assessment.manager.AssessmentNotificationsHandler;
import org.olat.course.auditing.UserNodeAuditManager; import org.olat.course.auditing.UserNodeAuditManager;
import org.olat.course.highscore.ui.HighScoreRunController; import org.olat.course.highscore.ui.HighScoreRunController;
import org.olat.course.nodes.AssessableCourseNode; import org.olat.course.nodes.AssessableCourseNode;
...@@ -129,6 +130,8 @@ public class QTI21AssessmentRunController extends BasicController implements Gen ...@@ -129,6 +130,8 @@ public class QTI21AssessmentRunController extends BasicController implements Gen
private QTI21Service qtiService; private QTI21Service qtiService;
@Autowired @Autowired
private CourseModule courseModule; private CourseModule courseModule;
@Autowired
private AssessmentNotificationsHandler assessmentNotificationsHandler;
public QTI21AssessmentRunController(UserRequest ureq, WindowControl wControl, public QTI21AssessmentRunController(UserRequest ureq, WindowControl wControl,
UserCourseEnvironment userCourseEnv, QTICourseNode courseNode) { UserCourseEnvironment userCourseEnv, QTICourseNode courseNode) {
...@@ -645,7 +648,10 @@ public class QTI21AssessmentRunController extends BasicController implements Gen ...@@ -645,7 +648,10 @@ public class QTI21AssessmentRunController extends BasicController implements Gen
@Override @Override
public void submit(Float score, Boolean pass, Long assessmentId) { public void submit(Float score, Boolean pass, Long assessmentId) {
if(anonym) return; if(anonym) {
assessmentNotificationsHandler.markPublisherNews(getIdentity(), userCourseEnv.getCourseEnvironment().getCourseResourceableId());
return;
}
if(courseNode instanceof IQTESTCourseNode) { if(courseNode instanceof IQTESTCourseNode) {
Boolean visibility; Boolean visibility;
...@@ -664,6 +670,8 @@ public class QTI21AssessmentRunController extends BasicController implements Gen ...@@ -664,6 +670,8 @@ public class QTI21AssessmentRunController extends BasicController implements Gen
if(increment) { if(increment) {
ThreadLocalUserActivityLogger.log(QTI21LoggingAction.QTI_CLOSE_IN_COURSE, getClass()); ThreadLocalUserActivityLogger.log(QTI21LoggingAction.QTI_CLOSE_IN_COURSE, getClass());
} }
assessmentNotificationsHandler.markPublisherNews(getIdentity(), userCourseEnv.getCourseEnvironment().getCourseResourceableId());
} else if(courseNode instanceof SelfAssessableCourseNode) { } else if(courseNode instanceof SelfAssessableCourseNode) {
boolean increment = incrementAttempts.getAndSet(false); boolean increment = incrementAttempts.getAndSet(false);
if(increment) { if(increment) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment