diff --git a/src/main/java/org/olat/course/assessment/handler/AssessmentHandler.java b/src/main/java/org/olat/course/assessment/handler/AssessmentHandler.java index 056ba8e38d6a604d2c1951f363153484de0b365d..9ee0a8267399a0a4acd7498cb9e8feae6cda272f 100644 --- a/src/main/java/org/olat/course/assessment/handler/AssessmentHandler.java +++ b/src/main/java/org/olat/course/assessment/handler/AssessmentHandler.java @@ -26,6 +26,7 @@ import org.olat.core.gui.control.Controller; import org.olat.core.gui.control.WindowControl; import org.olat.course.assessment.ui.tool.AssessmentCourseNodeController; import org.olat.course.nodes.CourseNode; +import org.olat.course.nodes.CourseNodeProvider; import org.olat.course.run.scoring.AssessmentEvaluation; import org.olat.course.run.scoring.ScoreCalculator; import org.olat.course.run.userview.UserCourseEnvironment; @@ -44,9 +45,7 @@ import org.olat.repository.RepositoryEntry; * @author uhensler, urs.hensler@frentix.com, http://www.frentix.com * */ -public interface AssessmentHandler { - - public String acceptCourseNodeType(); +public interface AssessmentHandler extends CourseNodeProvider { public AssessmentConfig getAssessmentConfig(CourseNode courseNode); diff --git a/src/main/java/org/olat/course/learningpath/LearningPathNodeHandler.java b/src/main/java/org/olat/course/learningpath/LearningPathNodeHandler.java index 11d3a5de32d9a59486a8240f72b5dba0364761d2..f17ec3a69f9ed2cfc300f2b858e6419292d107e5 100644 --- a/src/main/java/org/olat/course/learningpath/LearningPathNodeHandler.java +++ b/src/main/java/org/olat/course/learningpath/LearningPathNodeHandler.java @@ -23,6 +23,7 @@ import org.olat.core.gui.UserRequest; import org.olat.core.gui.control.Controller; import org.olat.core.gui.control.WindowControl; import org.olat.course.nodes.CourseNode; +import org.olat.course.nodes.CourseNodeProvider; /** * @@ -30,9 +31,7 @@ import org.olat.course.nodes.CourseNode; * @author uhensler, urs.hensler@frentix.com, http://www.frentix.com * */ -public interface LearningPathNodeHandler { - - public String acceptCourseNodeType(); +public interface LearningPathNodeHandler extends CourseNodeProvider { public boolean isSupported(); diff --git a/src/main/java/org/olat/course/learningpath/evaluation/NodeDurationEvaluatorProvider.java b/src/main/java/org/olat/course/learningpath/evaluation/NodeDurationEvaluatorProvider.java index 16a20f3350cef38704e7e097d7b299fd318a2404..1d3a9f5c57363ccb90f9796c34aa4582de6818eb 100644 --- a/src/main/java/org/olat/course/learningpath/evaluation/NodeDurationEvaluatorProvider.java +++ b/src/main/java/org/olat/course/learningpath/evaluation/NodeDurationEvaluatorProvider.java @@ -19,6 +19,8 @@ */ package org.olat.course.learningpath.evaluation; +import org.olat.course.nodes.CourseNodeProvider; + /** * Interface to provide an individual * {@link org.olat.course.learningpath.evaluation.DurationEvaluator} for a course @@ -32,9 +34,7 @@ package org.olat.course.learningpath.evaluation; * @author uhensler, urs.hensler@frentix.com, http://www.frentix.com * */ -public interface NodeDurationEvaluatorProvider { - - public String acceptCourseNodeType(); +public interface NodeDurationEvaluatorProvider extends CourseNodeProvider { public DurationEvaluator getDurationEvaluator(); diff --git a/src/main/java/org/olat/course/learningpath/evaluation/NodeLinearStatusEvaluatorProvider.java b/src/main/java/org/olat/course/learningpath/evaluation/NodeLinearStatusEvaluatorProvider.java index 50a3dd7df3344ea32d084f8dfd529f2b1e10fca0..e563d72b95f3d3f8b0c1596baf961ce9b4dbe349 100644 --- a/src/main/java/org/olat/course/learningpath/evaluation/NodeLinearStatusEvaluatorProvider.java +++ b/src/main/java/org/olat/course/learningpath/evaluation/NodeLinearStatusEvaluatorProvider.java @@ -19,6 +19,8 @@ */ package org.olat.course.learningpath.evaluation; +import org.olat.course.nodes.CourseNodeProvider; + /** * Interface to provide an individual * {@link org.olat.course.learningpath.evaluation.StatusEvaluator} for a course @@ -32,9 +34,7 @@ package org.olat.course.learningpath.evaluation; * @author uhensler, urs.hensler@frentix.com, http://www.frentix.com * */ -public interface NodeLinearStatusEvaluatorProvider { - - public String acceptCourseNodeType(); +public interface NodeLinearStatusEvaluatorProvider extends CourseNodeProvider { public StatusEvaluator getStatusEvaluator(); diff --git a/src/main/java/org/olat/course/learningpath/evaluation/NodeObligationEvaluatorProvider.java b/src/main/java/org/olat/course/learningpath/evaluation/NodeObligationEvaluatorProvider.java index 7f75c859371dfbb796a46b28962b894ee6128c95..9fc7915c3b6bee86fffbf3a18ae3b7f2a54f9e61 100644 --- a/src/main/java/org/olat/course/learningpath/evaluation/NodeObligationEvaluatorProvider.java +++ b/src/main/java/org/olat/course/learningpath/evaluation/NodeObligationEvaluatorProvider.java @@ -19,6 +19,8 @@ */ package org.olat.course.learningpath.evaluation; +import org.olat.course.nodes.CourseNodeProvider; + /** * * Interface to provide an individual * {@link org.olat.course.learningpath.evaluation.ObligationEvaluator} for a @@ -32,9 +34,7 @@ package org.olat.course.learningpath.evaluation; * @author uhensler, urs.hensler@frentix.com, http://www.frentix.com * */ -public interface NodeObligationEvaluatorProvider { - - public String acceptCourseNodeType(); +public interface NodeObligationEvaluatorProvider extends CourseNodeProvider { public ObligationEvaluator getObligationEvaluator(); } diff --git a/src/main/java/org/olat/course/nodes/CourseNodeProvider.java b/src/main/java/org/olat/course/nodes/CourseNodeProvider.java new file mode 100644 index 0000000000000000000000000000000000000000..52e1b73c3d0f0379073ed25c6fa080ca7b31da3e --- /dev/null +++ b/src/main/java/org/olat/course/nodes/CourseNodeProvider.java @@ -0,0 +1,32 @@ +/** + * <a href="http://www.openolat.org"> + * OpenOLAT - Online Learning and Training</a><br> + * <p> + * Licensed under the Apache License, Version 2.0 (the "License"); <br> + * you may not use this file except in compliance with the License.<br> + * You may obtain a copy of the License at the + * <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache homepage</a> + * <p> + * Unless required by applicable law or agreed to in writing,<br> + * software distributed under the License is distributed on an "AS IS" BASIS, <br> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. <br> + * See the License for the specific language governing permissions and <br> + * limitations under the License. + * <p> + * Initial code contributed and copyrighted by<br> + * frentix GmbH, http://www.frentix.com + * <p> + */ +package org.olat.course.nodes; + +/** + * + * Initial date: 2 Sep 2019<br> + * @author uhensler, urs.hensler@frentix.com, http://www.frentix.com + * + */ +public interface CourseNodeProvider { + + public String acceptCourseNodeType(); + +} \ No newline at end of file