use of org.olat.core.gui.control.generic.wizard.StepRunnerCallback in project openolat by klemens.
the class BusinessGroupMembersController method doImportMembers.
private void doImportMembers(UserRequest ureq) {
removeAsListenerAndDispose(importMembersWizard);
Step start = new ImportMember_1a_LoginListStep(ureq, null, businessGroup, false);
StepRunnerCallback finish = new StepRunnerCallback() {
@Override
public Step execute(UserRequest uureq, WindowControl wControl, StepsRunContext runContext) {
addMembers(runContext);
if (runContext.containsKey("notFounds")) {
showWarning("user.notfound", runContext.get("notFounds").toString());
}
return StepsMainRunController.DONE_MODIFIED;
}
};
importMembersWizard = new StepsMainRunController(ureq, getWindowControl(), start, finish, null, translate("import.member"), "o_sel_group_import_logins_wizard");
listenTo(importMembersWizard);
getWindowControl().pushAsModalDialog(importMembersWizard.getInitialComponent());
}
use of org.olat.core.gui.control.generic.wizard.StepRunnerCallback in project openolat by klemens.
the class BusinessGroupMembersController method doChooseMembers.
private void doChooseMembers(UserRequest ureq) {
removeAsListenerAndDispose(importMembersWizard);
Step start = new ImportMember_1b_ChooseMemberStep(ureq, null, businessGroup, false);
StepRunnerCallback finish = new StepRunnerCallback() {
@Override
public Step execute(UserRequest uureq, WindowControl wControl, StepsRunContext runContext) {
addMembers(runContext);
return StepsMainRunController.DONE_MODIFIED;
}
};
importMembersWizard = new StepsMainRunController(ureq, getWindowControl(), start, finish, null, translate("add.member"), "o_sel_group_import_1_wizard");
listenTo(importMembersWizard);
getWindowControl().pushAsModalDialog(importMembersWizard.getInitialComponent());
}
use of org.olat.core.gui.control.generic.wizard.StepRunnerCallback in project openolat by klemens.
the class QTIEditorMainController method doImportTable.
private void doImportTable(UserRequest ureq) {
removeAsListenerAndDispose(importTableWizard);
final ItemsPackage importPackage = new ItemsPackage();
final ImportOptions options = new ImportOptions();
options.setShuffle(!qtiPackage.getQTIDocument().isSurvey());
Step start = new QImport_1_InputStep(ureq, importPackage, options, null);
StepRunnerCallback finish = new StepRunnerCallback() {
@Override
public Step execute(UserRequest uureq, WindowControl wControl, StepsRunContext runContext) {
runContext.put("importPackage", importPackage);
return StepsMainRunController.DONE_MODIFIED;
}
};
importTableWizard = new StepsMainRunController(ureq, getWindowControl(), start, finish, null, translate("tools.import.table"), "o_mi_table_import_wizard");
listenTo(importTableWizard);
getWindowControl().pushAsModalDialog(importTableWizard.getInitialComponent());
}
use of org.olat.core.gui.control.generic.wizard.StepRunnerCallback in project openolat by klemens.
the class AssessmentTestComposerController method doImportTable.
private void doImportTable(UserRequest ureq) {
removeAsListenerAndDispose(importTableWizard);
final AssessmentItemsPackage importPackage = new AssessmentItemsPackage();
final ImportOptions options = new ImportOptions();
options.setShuffle(!survey);
Step start = new QImport_1_InputStep(ureq, importPackage, options, null);
StepRunnerCallback finish = new StepRunnerCallback() {
@Override
public Step execute(UserRequest uureq, WindowControl wControl, StepsRunContext runContext) {
runContext.put("importPackage", importPackage);
return StepsMainRunController.DONE_MODIFIED;
}
};
importTableWizard = new StepsMainRunController(ureq, getWindowControl(), start, finish, null, translate("tools.import.table"), "o_mi_table_import_wizard");
listenTo(importTableWizard);
getWindowControl().pushAsModalDialog(importTableWizard.getInitialComponent());
}
use of org.olat.core.gui.control.generic.wizard.StepRunnerCallback in project openolat by klemens.
the class MessageListController method doExportForumItem.
private void doExportForumItem(UserRequest ureq, MessageView messageToMove) {
if (foCallback.mayEditMessageAsModerator()) {
StepRunnerCallback finish = new FinishCallback();
Translator trans = Util.createPackageTranslator(Step_1_SelectCourse.class, getLocale());
Step start = new Step_1_SelectCourse(ureq);
Message message = forumManager.getMessageById(messageToMove.getKey());
String wizardTitle = trans.translate("title.wizard.movethread", new String[] { message.getTitle() });
exportCtrl = new StepsMainRunController(ureq, getWindowControl(), start, finish, null, wizardTitle, "o_sel_bulk_assessment_wizard");
StepsRunContext runContext = exportCtrl.getRunContext();
// can be threadtop message
runContext.put(SendMailStepForm.MESSAGE_TO_MOVE, message);
// starting thread
runContext.put(SendMailStepForm.START_THREADTOP, message.getThreadtop() == null ? message : message.getThreadtop());
// get start course
PropertyManager propertyManager = PropertyManager.getInstance();
Long forumResourceableId = forum.getResourceableId();
Property forumproperty = propertyManager.getPropertyByLongValue(forumResourceableId, FOCourseNode.FORUM_KEY);
if (forumproperty != null) {
Long resourcetypeId = forumproperty.getResourceTypeId();
String resourcetypeName = forumproperty.getResourceTypeName();
OLATResourceable olatResourceable = olatManager.findResourceable(resourcetypeId, resourcetypeName);
RepositoryEntry startCourse = repositoryManager.lookupRepositoryEntry(olatResourceable, false);
if (startCourse != null) {
runContext.put(SendMailStepForm.START_COURSE, startCourse);
}
}
listenTo(exportCtrl);
getWindowControl().pushAsModalDialog(exportCtrl.getInitialComponent());
} else {
showWarning("may.not.move.message");
}
}
Aggregations