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

OO-2237: filter the entries by the newly created section

parent 7fc309d4
No related branches found
No related tags found
No related merge requests found
...@@ -406,14 +406,15 @@ public class BinderPageListController extends AbstractPageListController { ...@@ -406,14 +406,15 @@ public class BinderPageListController extends AbstractPageListController {
@Override @Override
public void event(UserRequest ureq, Controller source, Event event) { public void event(UserRequest ureq, Controller source, Event event) {
if(newSectionCtrl == source || newAssignmentCtrl == source) { if(newSectionCtrl == source) {
if(event == Event.DONE_EVENT) { if(event == Event.DONE_EVENT) {
filteringSection = newSectionCtrl.getSection();
loadModel(ureq, null); loadModel(ureq, null);
fireEvent(ureq, Event.CHANGED_EVENT); fireEvent(ureq, Event.CHANGED_EVENT);
} }
cmc.deactivate(); cmc.deactivate();
cleanUp(); cleanUp();
} else if(newSectionCtrl == source || newPageCtrl == source || newAssignmentCtrl == source) { } else if(newPageCtrl == source) {
if(event == Event.DONE_EVENT) { if(event == Event.DONE_EVENT) {
loadModel(ureq, null); loadModel(ureq, null);
Page newPage = newPageCtrl.getPage(); Page newPage = newPageCtrl.getPage();
...@@ -427,6 +428,13 @@ public class BinderPageListController extends AbstractPageListController { ...@@ -427,6 +428,13 @@ public class BinderPageListController extends AbstractPageListController {
} }
cmc.deactivate(); cmc.deactivate();
cleanUp(); cleanUp();
} else if(newAssignmentCtrl == source) {
if(event == Event.DONE_EVENT) {
loadModel(ureq, null);
fireEvent(ureq, Event.CHANGED_EVENT);
}
cmc.deactivate();
cleanUp();
} else if(cmc == source) { } else if(cmc == source) {
cleanUp(); cleanUp();
} }
......
...@@ -35,6 +35,7 @@ import org.olat.modules.portfolio.BinderRef; ...@@ -35,6 +35,7 @@ import org.olat.modules.portfolio.BinderRef;
import org.olat.modules.portfolio.BinderSecurityCallback; import org.olat.modules.portfolio.BinderSecurityCallback;
import org.olat.modules.portfolio.PortfolioService; import org.olat.modules.portfolio.PortfolioService;
import org.olat.modules.portfolio.Section; import org.olat.modules.portfolio.Section;
import org.olat.modules.portfolio.SectionRef;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
/** /**
...@@ -145,7 +146,8 @@ public class SectionEditController extends FormBasicController { ...@@ -145,7 +146,8 @@ public class SectionEditController extends FormBasicController {
if(section == null) { if(section == null) {
String title = titleEl.getValue(); String title = titleEl.getValue();
String description = descriptionEl.getValue(); String description = descriptionEl.getValue();
portfolioService.appendNewSection(title, description, beginDateEl.getDate(), endDateEl.getDate(), binder); SectionRef sectionRef = portfolioService.appendNewSection(title, description, beginDateEl.getDate(), endDateEl.getDate(), binder);
section = portfolioService.getSection(sectionRef);
} else { } else {
Section reloadedSection = portfolioService.getSection(section); Section reloadedSection = portfolioService.getSection(section);
reloadedSection.setTitle(titleEl.getValue()); reloadedSection.setTitle(titleEl.getValue());
......
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