From 3d0b3772e59d409f561dd1bc8e53bd1532c48aa1 Mon Sep 17 00:00:00 2001
From: uhensler <urs.hensler@frentix.com>
Date: Mon, 26 Aug 2019 09:47:08 +0200
Subject: [PATCH] OO-4186: Remove unnecessary type checking of
 ProjectBrokerCourseNode

---
 .../java/org/olat/course/assessment/AssessmentHelper.java   | 6 +-----
 .../olat/course/nodes/iq/QTI21AssessmentRunController.java  | 1 -
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/src/main/java/org/olat/course/assessment/AssessmentHelper.java b/src/main/java/org/olat/course/assessment/AssessmentHelper.java
index 36a3130c87c..469a20601e7 100644
--- a/src/main/java/org/olat/course/assessment/AssessmentHelper.java
+++ b/src/main/java/org/olat/course/assessment/AssessmentHelper.java
@@ -54,7 +54,6 @@ import org.olat.course.assessment.model.AssessmentNodesLastModified;
 import org.olat.course.nodes.CourseNode;
 import org.olat.course.nodes.CourseNodeConfiguration;
 import org.olat.course.nodes.CourseNodeFactory;
-import org.olat.course.nodes.ProjectBrokerCourseNode;
 import org.olat.course.nodes.STCourseNode;
 import org.olat.course.nodes.ScormCourseNode;
 import org.olat.course.nodes.iq.IQEditController;
@@ -415,10 +414,7 @@ public class AssessmentHelper {
 		CourseAssessmentService courseAssessmentService = CoreSpringFactory.getImpl(CourseAssessmentService.class);
 		AssessmentConfig assessmentConfig = courseAssessmentService.getAssessmentConfig(courseNode);
 		if (numOfChildren > 0 || assessmentConfig.isAssessable()) {
-			if(courseNode instanceof ProjectBrokerCourseNode) {
-				//ProjectBroker : no assessment-tool in V1.0 , remove project broker completely form assessment-tool gui
-				assessmentNodeData.setSelectable(false);
-			} else if (assessmentConfig.isAssessable()) {
+			 if (assessmentConfig.isAssessable()) {
 				AssessmentEvaluation scoreEvaluation = scoreAccounting.evalCourseNode(courseNode);
 				assessmentNodeData.setAssessmentStatus(scoreEvaluation.getAssessmentStatus());
 				assessmentNodeData.setNumOfAssessmentDocs(scoreEvaluation.getNumOfAssessmentDocs());
diff --git a/src/main/java/org/olat/course/nodes/iq/QTI21AssessmentRunController.java b/src/main/java/org/olat/course/nodes/iq/QTI21AssessmentRunController.java
index c1d117e87c9..ac1d73b3398 100644
--- a/src/main/java/org/olat/course/nodes/iq/QTI21AssessmentRunController.java
+++ b/src/main/java/org/olat/course/nodes/iq/QTI21AssessmentRunController.java
@@ -602,7 +602,6 @@ public class QTI21AssessmentRunController extends BasicController implements Gen
 	private void doDownloadSignature(UserRequest ureq) {
 		MediaResource resource = null;
 		if(courseNode instanceof IQTESTCourseNode) {
-			IQTESTCourseNode testCourseNode = (IQTESTCourseNode)courseNode;
 			AssessmentEntry assessmentEntry = courseAssessmentService.getAssessmentEntry(courseNode, userCourseEnv);
 			AssessmentTestSession session = qtiService.getAssessmentTestSession(assessmentEntry.getAssessmentId());
 			File signature = qtiService.getAssessmentResultSignature(session);
-- 
GitLab