Skip to content
Snippets Groups Projects
Commit eba90418 authored by uhensler's avatar uhensler
Browse files

OO-4241: Enable course element "Assignment of dates" in learning path courses

parent 1cec835f
No related branches found
No related tags found
No related merge requests found
...@@ -61,7 +61,7 @@ import de.bps.course.nodes.den.DENRunController; ...@@ -61,7 +61,7 @@ import de.bps.course.nodes.den.DENRunController;
*/ */
public class DENCourseNode extends AbstractAccessableCourseNode { public class DENCourseNode extends AbstractAccessableCourseNode {
private static final String TYPE = "den"; public static final String TYPE = "den";
/** is cancel of the enrollment allowed */ /** is cancel of the enrollment allowed */
public static final String CONF_CANCEL_ENROLL_ENABLED = "cancel_enroll_enabled"; public static final String CONF_CANCEL_ENROLL_ENABLED = "cancel_enroll_enabled";
public static final String CONF_COURSE_ID = "den_course_id"; public static final String CONF_COURSE_ID = "den_course_id";
......
/**
* <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 de.bps.course.nodes.den;
import org.olat.course.learningpath.LearningPathOnlyAssessmentHandler;
import org.springframework.stereotype.Service;
import de.bps.course.nodes.DENCourseNode;
/**
*
* Initial date: 24.02.2020<br>
* @author uhensler, urs.hensler@frentix.com, http://www.frentix.com
*
*/
@Service
public class DENAssessmentHandler extends LearningPathOnlyAssessmentHandler {
@Override
public String acceptCourseNodeType() {
return DENCourseNode.TYPE;
}
}
/**
* <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 de.bps.course.nodes.den;
import org.olat.core.gui.UserRequest;
import org.olat.core.gui.control.Controller;
import org.olat.core.gui.control.WindowControl;
import org.olat.course.learningpath.LearningPathConfigs;
import org.olat.course.learningpath.LearningPathEditConfigs;
import org.olat.course.learningpath.LearningPathNodeHandler;
import org.olat.course.learningpath.model.ModuleLearningPathConfigs;
import org.olat.course.learningpath.ui.LearningPathNodeConfigController;
import org.olat.course.nodes.CourseNode;
import org.olat.repository.RepositoryEntry;
import org.springframework.stereotype.Service;
import de.bps.course.nodes.DENCourseNode;
/**
*
* Initial date: 24.02.2020<br>
* @author uhensler, urs.hensler@frentix.com, http://www.frentix.com
*
*/
@Service
public class DENLearningPathNodeHandler implements LearningPathNodeHandler {
private static final LearningPathEditConfigs EDIT_CONFIGS = LearningPathEditConfigs.builder()
.enableNodeVisited()
.enableConfirmed()
.build();
@Override
public String acceptCourseNodeType() {
return DENCourseNode.TYPE;
}
@Override
public boolean isSupported() {
return true;
}
@Override
public LearningPathConfigs getConfigs(CourseNode courseNode) {
return new ModuleLearningPathConfigs(courseNode.getModuleConfiguration(), true);
}
@Override
public Controller createConfigEditController(UserRequest ureq, WindowControl wControl, RepositoryEntry courseEntry,
CourseNode courseNode) {
return new LearningPathNodeConfigController(ureq, wControl, courseEntry, courseNode, EDIT_CONFIGS);
}
@Override
public LearningPathEditConfigs getEditConfigs() {
return EDIT_CONFIGS;
}
@Override
public void onMigrated(CourseNode courseNode) {
//
}
}
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