SEBSERV-444 fixed also in exam delete message
This commit is contained in:
parent
4b051fbc97
commit
768fcea15b
4 changed files with 6 additions and 5 deletions
|
@ -16,6 +16,7 @@ import java.util.function.Predicate;
|
||||||
import java.util.function.Supplier;
|
import java.util.function.Supplier;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import org.apache.commons.text.StringEscapeUtils;
|
||||||
import org.eclipse.swt.layout.GridData;
|
import org.eclipse.swt.layout.GridData;
|
||||||
import org.eclipse.swt.widgets.Composite;
|
import org.eclipse.swt.widgets.Composite;
|
||||||
import org.eclipse.swt.widgets.Label;
|
import org.eclipse.swt.widgets.Label;
|
||||||
|
@ -161,7 +162,7 @@ public class ExamDeletePopup {
|
||||||
new ActionEvent(action),
|
new ActionEvent(action),
|
||||||
action.pageContext());
|
action.pageContext());
|
||||||
|
|
||||||
final String examName = examToDelete.toName().name;
|
final String examName = StringEscapeUtils.escapeXml11(examToDelete.toName().name);
|
||||||
final List<EntityKey> dependencies = report.results.stream()
|
final List<EntityKey> dependencies = report.results.stream()
|
||||||
.filter(key -> !key.equals(entityKey))
|
.filter(key -> !key.equals(entityKey))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
|
@ -46,7 +46,7 @@ public final class Message extends MessageBox {
|
||||||
super.prepareOpen();
|
super.prepareOpen();
|
||||||
} catch (final IllegalArgumentException e) {
|
} catch (final IllegalArgumentException e) {
|
||||||
// fallback on markup text error
|
// fallback on markup text error
|
||||||
super.setMessage(StringEscapeUtils.escapeHtml4(super.getMessage()));
|
super.setMessage(StringEscapeUtils.escapeXml11(super.getMessage()));
|
||||||
super.prepareOpen();
|
super.prepareOpen();
|
||||||
}
|
}
|
||||||
final GridLayout layout = (GridLayout) super.shell.getLayout();
|
final GridLayout layout = (GridLayout) super.shell.getLayout();
|
||||||
|
|
|
@ -63,7 +63,7 @@ public class MockCourseAccessAPI implements CourseAccessAPI {
|
||||||
"quiz1", institutionId, lmsSetupId, lmsType, "Demo Quiz 1 (MOCKUP)", "<p>Demo Quiz Mockup</p>",
|
"quiz1", institutionId, lmsSetupId, lmsType, "Demo Quiz 1 (MOCKUP)", "<p>Demo Quiz Mockup</p>",
|
||||||
"2020-01-01T09:00:00Z", null, "http://lms.mockup.com/api/"));
|
"2020-01-01T09:00:00Z", null, "http://lms.mockup.com/api/"));
|
||||||
this.mockups.add(new QuizData(
|
this.mockups.add(new QuizData(
|
||||||
"quiz2", institutionId, lmsSetupId, lmsType, "Demo Quiz 2 (MOCKUP) äöüèÜÄÖ ?< ",
|
"quiz2 äöüèÜÄÖ ?<", institutionId, lmsSetupId, lmsType, "Demo Quiz 2 (MOCKUP) äöüèÜÄÖ ?< ",
|
||||||
"<p>Demo Quiz Mockup</p>",
|
"<p>Demo Quiz Mockup</p>",
|
||||||
"2020-01-01T09:00:00Z", "2025-01-01T09:00:00Z", "http://lms.mockup.com/api/"));
|
"2020-01-01T09:00:00Z", "2025-01-01T09:00:00Z", "http://lms.mockup.com/api/"));
|
||||||
this.mockups.add(new QuizData(
|
this.mockups.add(new QuizData(
|
||||||
|
|
|
@ -36,12 +36,12 @@ public class ExamAPITest extends AdministrationAPIIntegrationTester {
|
||||||
sebAdminAccess,
|
sebAdminAccess,
|
||||||
sebAdminAccess,
|
sebAdminAccess,
|
||||||
"LmsSetupMock",
|
"LmsSetupMock",
|
||||||
"quiz2",
|
"quiz2 äöüèÜÄÖ ?<",
|
||||||
ExamType.MANAGED,
|
ExamType.MANAGED,
|
||||||
"user5");
|
"user5");
|
||||||
|
|
||||||
assertNotNull(exam);
|
assertNotNull(exam);
|
||||||
assertEquals("quiz2", exam.getExternalId());
|
assertEquals("quiz2 äöüèÃÃà ?<", exam.getExternalId()); // Note cannot set right collation on h2
|
||||||
assertEquals(ExamType.MANAGED, exam.getType());
|
assertEquals(ExamType.MANAGED, exam.getType());
|
||||||
assertFalse(exam.getSupporter().isEmpty());
|
assertFalse(exam.getSupporter().isEmpty());
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue