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

OO-1694: use the current course id and not the saved one

parent 13211cbe
No related branches found
No related tags found
No related merge requests found
......@@ -104,7 +104,7 @@ public class DENCourseNode extends AbstractAccessableCourseNode {
String message = trans.translate("guestnoaccess.message");
controller = MessageUIFactory.createInfoMessage(ureq, wControl, title, message);
} else {
controller = new DENRunController(ureq, wControl, getModuleConfiguration(), this);
controller = new DENRunController(ureq, wControl, getModuleConfiguration(), userCourseEnv, this);
}
Controller ctrl = TitledWrapperHelper.getWrapper(ureq, wControl, controller, this, "o_en_icon");
......
......@@ -47,6 +47,7 @@ import org.olat.course.CourseFactory;
import org.olat.course.ICourse;
import org.olat.course.groupsandrights.CourseGroupManager;
import org.olat.course.nodes.ObjectivesHelper;
import org.olat.course.run.userview.UserCourseEnvironment;
import org.olat.modules.ModuleConfiguration;
import de.bps.course.nodes.DENCourseNode;
......@@ -88,10 +89,10 @@ public class DENRunController extends BasicController implements GenericEventLis
* @param denCourseNode
* @param userCourseEnv
*/
public DENRunController(UserRequest ureq, WindowControl wControl, ModuleConfiguration moduleConfig, DENCourseNode denCourseNode) {
public DENRunController(UserRequest ureq, WindowControl wControl, ModuleConfiguration moduleConfig, UserCourseEnvironment userCourseEnv, DENCourseNode denCourseNode) {
super(ureq, wControl);
this.courseNode = denCourseNode;
this.ores = CourseFactory.loadCourse((Long)moduleConfig.get(DENCourseNode.CONF_COURSE_ID));
this.ores = CourseFactory.loadCourse(userCourseEnv.getCourseEnvironment().getCourseResourceableId());
this.cancelEnrollEnabled = ((Boolean) moduleConfig.get(DENCourseNode.CONF_CANCEL_ENROLL_ENABLED)).booleanValue();
denManager = DENManager.getInstance();
......
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