diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/content/ExamDeletePopup.java b/src/main/java/ch/ethz/seb/sebserver/gui/content/ExamDeletePopup.java index 1d64761f..7200fc0c 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/content/ExamDeletePopup.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/content/ExamDeletePopup.java @@ -73,8 +73,6 @@ public class ExamDeletePopup { private final static LocTextKey ACTION_DELETE = new LocTextKey("sebserver.exam.delete.action.delete"); - private final static LocTextKey ACTION_REPORT = - new LocTextKey("sebserver.exam.delete.action.report"); private final static LocTextKey DELETE_CONFIRM_TITLE = new LocTextKey("sebserver.exam.delete.confirm.title"); @@ -95,29 +93,18 @@ public class ExamDeletePopup { .setVeryLargeDialogWidth(); final String page1Id = "DELETE_PAGE"; - final String page2Id = "REPORT_PAGE"; final Predicate callback = pc -> doDelete(this.pageService, pc); final BiFunction> composePage1 = (prefPageContext, content) -> composeDeleteDialog(content, (prefPageContext != null) ? prefPageContext : pageContext); - final BiFunction> composePage2 = - (prefPageContext, content) -> composeReportDialog(content, - (prefPageContext != null) ? prefPageContext : pageContext); final WizardPage page1 = new WizardPage<>( page1Id, true, composePage1, - new WizardAction<>(ACTION_DELETE, callback), - new WizardAction<>(ACTION_REPORT, page2Id)); - - final WizardPage page2 = new WizardPage<>( - page2Id, - false, - composePage2, new WizardAction<>(ACTION_DELETE, callback)); - wizard.open(FORM_TITLE, Utils.EMPTY_EXECUTION, page1, page2); + wizard.open(FORM_TITLE, Utils.EMPTY_EXECUTION, page1); return action; }; @@ -172,6 +159,7 @@ public class ExamDeletePopup { final Composite parent, final PageContext pageContext) { + final I18nSupport i18nSupport = this.pageService.getI18nSupport(); final Composite grid = this.pageService.getWidgetFactory() .createPopupScrollComposite(parent); @@ -182,23 +170,12 @@ public class ExamDeletePopup { gridData.verticalIndent = 10; title.setLayoutData(gridData); - return () -> pageContext; - } - - private Supplier composeReportDialog( - final Composite parent, - final PageContext pageContext) { - - final Composite grid = this.pageService.getWidgetFactory() - .createPopupScrollCompositeFilled(parent); - final I18nSupport i18nSupport = this.pageService.getI18nSupport(); - - final Label title = this.pageService.getWidgetFactory() + final Label titleReport = this.pageService.getWidgetFactory() .labelLocalized(grid, CustomVariant.TEXT_H3, FORM_REPORT_INFO); - final GridData gridData = new GridData(); - gridData.horizontalIndent = 10; - gridData.verticalIndent = 10; - title.setLayoutData(gridData); + final GridData gridDataReport = new GridData(); + gridDataReport.horizontalIndent = 10; + gridDataReport.verticalIndent = 10; + titleReport.setLayoutData(gridDataReport); try { diff --git a/src/main/resources/messages.properties b/src/main/resources/messages.properties index 350d73a9..94d76690 100644 --- a/src/main/resources/messages.properties +++ b/src/main/resources/messages.properties @@ -610,13 +610,12 @@ sebserver.exam.indicator.thresholds.list.add=Add a new threshold sebserver.exam.indicator.thresholds.list.remove=Delete this threshold sebserver.exam.delete.form.title=Delete Exam -sebserver.exam.delete.form.info=Please Note:
    This deletes the exam and local import of a course or quiz in SEB Server
    This will not delete any course or quiz on a Learning Management System (LMS).
    Dependencies of the exam like indicators or SEB client connections will also be deleted.
    Please use the "Show Report" action below to see a report of all objects that will be
    deleted and check them carefully. -sebserver.exam.delete.report.info=The following objects will be deleted within this exam deletion.
Please check them carefully before delete. +sebserver.exam.delete.form.info=Please Note:
    This deletes the exam and local import of a course or quiz in SEB Server
    This will not delete any course or quiz on a Learning Management System (LMS). +sebserver.exam.delete.report.info=The following dependencies will be deleted within this exam deletion.
Please check them carefully before delete. sebserver.exam.delete.report.list.type=Type sebserver.exam.delete.report.list.name=Name sebserver.exam.delete.report.list.description=Description sebserver.exam.delete.action.delete=Delete Exam -sebserver.exam.delete.action.report=Show Report sebserver.exam.delete.confirm.title==Deletion Successful sebserver.exam.delete.confirm.message=The Exam ({0}) was successfully deleted.
Also the following number dependencies where successfully deleted: {1}.

And there where {2} errors. sebserver.exam.delete.report.list.empty=No dependencies will be deleted.