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

OO-3228: add some listenTo

parent 969746b8
No related branches found
No related tags found
No related merge requests found
......@@ -87,6 +87,9 @@ public class ItemNodeTabbedFormController extends TabbableDefaultController {
itemCtrl = new EssayItemController(ureq, getWindowControl(), item, qtiPackage, getTranslator(), restrictedEdit);
break;
}
if(itemCtrl != null) {
listenTo(itemCtrl);
}
}
/**
......@@ -151,11 +154,12 @@ public class ItemNodeTabbedFormController extends TabbableDefaultController {
int questionType = item.getQuestion().getType();
tabbedPane.addTab(translate("tab.question"), itemCtrl.getInitialComponent());
listenTo(itemCtrl);
if (!isSurvey && questionType != Question.TYPE_ESSAY) {
tabbedPane.addTab(translate("tab.feedback"), feedbackPanel);
}
Controller itemPreviewController = new ItemPreviewController(getWindowControl(), item, qtiPackage, getTranslator());
listenTo(itemPreviewController);
tabbedPane.addTab(translate("tab.preview"), itemPreviewController.getInitialComponent());
tabbedPane.addListener(itemPreviewController);
}
......
......@@ -361,8 +361,7 @@ public class QTIQPoolServiceProvider implements QPoolSPI {
@Override
public Controller getPreviewController(UserRequest ureq, WindowControl wControl, QuestionItem item, boolean summary) {
QTI12PreviewController previewCtrl = new QTI12PreviewController(ureq, wControl, item, summary);
return previewCtrl;
return new QTI12PreviewController(ureq, wControl, item, summary);
}
@Override
......@@ -372,9 +371,6 @@ public class QTIQPoolServiceProvider implements QPoolSPI {
@Override
public Controller getEditableController(UserRequest ureq, WindowControl wControl, QuestionItem item) {
QTI12EditorController previewCtrl = new QTI12EditorController(ureq, wControl, item);
return previewCtrl;
return new QTI12EditorController(ureq, wControl, item);
}
}
\ No newline at end of file
......@@ -139,7 +139,7 @@ public class AssessmentItemEditorController extends BasicController {
displayTabPosition = tabbedPane.addTab(translate("preview"), displayCtrl);
solutionCtrl = new AssessmentItemPreviewSolutionController(ureq, getWindowControl(), resolvedAssessmentItem, rootDirectory, itemFile);
listenTo(displayCtrl);
listenTo(solutionCtrl);
solutionTabPosition = tabbedPane.addTab(translate("preview.solution"), solutionCtrl);
}
......@@ -181,7 +181,7 @@ public class AssessmentItemEditorController extends BasicController {
displayTabPosition = tabbedPane.addTab(translate("preview"), displayCtrl);
solutionCtrl = new AssessmentItemPreviewSolutionController(ureq, getWindowControl(), resolvedAssessmentItem, rootDirectory, itemFile);
listenTo(displayCtrl);
listenTo(solutionCtrl);
solutionTabPosition = tabbedPane.addTab(translate("preview.solution"), solutionCtrl);
}
......
......@@ -85,11 +85,13 @@ public class MetadatasController extends BasicController {
if (qpoolModule.isPoolsEnabled()) {
poolsCtrl = new PoolsMetadataController(ureq, wControl, item);
listenTo(poolsCtrl);
mainVC.put("details_pools", poolsCtrl.getInitialComponent());
}
if (qpoolModule.isSharesEnabled()) {
sharesController = new SharesMetadataController(ureq, wControl, item);
listenTo(sharesController);
mainVC.put("details_shares", sharesController.getInitialComponent());
}
......
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