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

OO-725: save the access settings of the video course element

parent c5bf1dc6
No related branches found
No related tags found
No related merge requests found
......@@ -92,6 +92,7 @@ public class VideoEditController extends ActivateableTabbableDefaultController
private VelocityContainer videoConfigurationVc;
private ModuleConfiguration config;
private final VideoCourseNode videoNode;
private RepositoryEntry repositoryEntry;
private ReferencableEntriesSearchController searchController;
......@@ -108,6 +109,8 @@ public class VideoEditController extends ActivateableTabbableDefaultController
public VideoEditController(VideoCourseNode videoNode, UserRequest ureq, WindowControl wControl, ICourse course, UserCourseEnvironment euce) {
super(ureq, wControl);
this.config = videoNode.getModuleConfiguration();
this.videoNode = videoNode;
main = new Panel("videomain");
videoConfigurationVc = createVelocityContainer("edit");
......@@ -187,8 +190,7 @@ public class VideoEditController extends ActivateableTabbableDefaultController
);
listenTo(cmc);
cmc.activate();
}
if(source == previewLink){
} else if(source == previewLink){
VideoDisplayController previewController = null;
switch(config.getStringValue(VideoEditController.CONFIG_KEY_DESCRIPTION_SELECT)){
......@@ -214,6 +216,7 @@ public class VideoEditController extends ActivateableTabbableDefaultController
* @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest,
* org.olat.core.gui.control.Controller, org.olat.core.gui.control.Event)
*/
@Override
public void event(UserRequest urequest, Controller source, Event event) {
if (source == searchController) {
if (event == ReferencableEntriesSearchController.EVENT_REPOSITORY_ENTRY_SELECTED) {
......@@ -236,6 +239,12 @@ public class VideoEditController extends ActivateableTabbableDefaultController
listenTo(videoOptions);
}
}
} else if (source == accessibilityCondContr) {
if (event == Event.CHANGED_EVENT) {
Condition cond = accessibilityCondContr.getCondition();
videoNode.setPreConditionAccess(cond);
fireEvent(urequest, NodeEditController.NODECONFIG_CHANGED_EVENT);
}
}
if (event == NodeEditController.NODECONFIG_CHANGED_EVENT){
......
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