launchAssessmentTool(ureq, null);
} else if (cmd.equals("efficiencystatement")) {
// will not be disposed on course run dispose, popus up as new
// browserwindow
ControllerCreator ctrlCreator = new ControllerCreator() {
public Controller createController(UserRequest lureq, WindowControl lwControl) {
EfficiencyStatementController efficiencyStatementController = new EfficiencyStatementController(lwControl, lureq, courseRepositoryEntry.getKey());
efficiencyStatementController.setCustomCSS(CourseFactory.getCustomCourseCss(lureq.getUserSession(), uce.getCourseEnvironment()));
return efficiencyStatementController;
}
};
//wrap the content controller into a full header layout
ControllerCreator layoutCtrlr = BaseFullWebappPopupLayoutFactory.createAuthMinimalPopupLayout(ureq, ctrlCreator);
//open in new browser window
openInNewBrowserWindow(ureq, layoutCtrlr);
//
} else if (cmd.equals("personalnote")) {
// will not be disposed on course run dispose, popus up as new
// browserwindow
ControllerCreator ctrlCreator = new ControllerCreator() {
public Controller createController(UserRequest lureq, WindowControl lwControl) {
Controller notesCtr = new NoteController(lureq, course, getExtendedCourseTitle(lureq.getLocale()), lwControl);
LayoutMain3ColsController layoutCtr = new LayoutMain3ColsController(lureq, lwControl, null, null, notesCtr.getInitialComponent(), null);
layoutCtr.setCustomCSS(CourseFactory.getCustomCourseCss(lureq.getUserSession(), uce.getCourseEnvironment()));
layoutCtr.addDisposableChildController(notesCtr); // dispose glossary on layout dispose
return layoutCtr;
}
};
//wrap the content controller into a full header layout
ControllerCreator popupLayoutCtr = BaseFullWebappPopupLayoutFactory.createAuthMinimalPopupLayout(ureq, ctrlCreator);
//open in new browser window
openInNewBrowserWindow(ureq, popupLayoutCtr);
//
} else if (cmd.equals(TOOLBOX_LINK_COURSECONFIG)) {
//FIXME:pb:a better workflows to link a course detail page from course run
//was brasato getWindowControl().getDTabs().activateStatic(ureq, RepositorySite.class.getName(),RepositoryMainController.JUMPFROMEXTERN + RepositoryMainController.JUMPFROMCOURSE + courseRepositoryEntry.getKey().toString());
DTabs dts = (DTabs)Windows.getWindows(ureq).getWindow(ureq).getAttribute("DTabs");
if(dts != null){
dts.activateStatic(ureq, RepositorySite.class.getName(),RepositoryMainController.JUMPFROMEXTERN + RepositoryMainController.JUMPFROMCOURSE + courseRepositoryEntry.getKey().toString());
}else{
//help course in popup window can not display detail page
getWindowControl().setInfo("detail can not be displayed here");
}
return;
} else if (cmd.equals(ACTION_BOOKMARK)) { // add bookmark
RepositoryEntry re = RepositoryManager.getInstance().lookupRepositoryEntry(course, true);
bookmarkController = new AddAndEditBookmarkController(ureq, getWindowControl(), re.getDisplayname(), "", re, re.getOlatResource()
.getResourceableTypeName());
listenTo(bookmarkController);
contentP.pushContent(bookmarkController.getInitialComponent());
} else if (cmd.equals(ACTION_CALENDAR)) { // popup calendar
ControllerCreator ctrlCreator = new ControllerCreator() {
public Controller createController(UserRequest lureq, WindowControl lwControl) {
ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(courseRepositoryEntry);
WindowControl llwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, lwControl);
CourseCalendarController calendarController = new CourseCalendarController(lureq, llwControl, course);
// use a one-column main layout
LayoutMain3ColsController layoutCtr = new LayoutMain3ColsController(lureq, llwControl, null, null, calendarController.getInitialComponent(), null);
layoutCtr.setCustomCSS(CourseFactory.getCustomCourseCss(lureq.getUserSession(), uce.getCourseEnvironment()));
layoutCtr.addDisposableChildController(calendarController); // dispose calendar on layout dispose
return layoutCtr;
}
};
//wrap the content controller into a full header layout
ControllerCreator layoutCtrlr = BaseFullWebappPopupLayoutFactory.createAuthMinimalPopupLayout(ureq, ctrlCreator);
//open in new browser window
PopupBrowserWindow pbw = getWindowControl().getWindowBackOffice().getWindowManager().createNewPopupBrowserWindowFor(ureq, layoutCtrlr);
pbw.open(ureq);
//
}