Skip to content

Commit

Permalink
fixed Exam description
Browse files Browse the repository at this point in the history
  • Loading branch information
anhefti committed Jan 16, 2024
1 parent f267e9f commit 90401da
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ public String toString() {
builder.append(", name=");
builder.append(this.name);
builder.append(", description=");
builder.append(Utils.truncateText(this.getDescription(), 255));
builder.append(Utils.truncateText(this.getDescription(), 32));
builder.append(", startTime=");
builder.append(this.startTime);
builder.append(", endTime=");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ private FormHandle<Exam> createReadOnlyForm(
QuizData.QUIZ_ATTR_DESCRIPTION,
FORM_DESCRIPTION_TEXT_KEY,
exam.getDescription())
.asHTMLOrArea(50, exam.lmsSetupId != null)
.asHTML(50)
.readonly(true)
.withInputSpan(7)
.withEmptyCellSeparation(false))
Expand Down Expand Up @@ -562,7 +562,7 @@ private FormHandle<Exam> createEditForm(
QuizData.QUIZ_ATTR_DESCRIPTION,
FORM_DESCRIPTION_TEXT_KEY,
exam.getDescription())
.asArea()
.asHTMLOrArea(50, hasLMS)
.readonly(hasLMS))
.withAdditionalValueMapping(QuizData.QUIZ_ATTR_DESCRIPTION)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import java.util.function.Consumer;

import ch.ethz.seb.sebserver.gbl.util.Utils;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.rap.rwt.RWT;
import org.eclipse.swt.SWT;
Expand Down Expand Up @@ -187,7 +188,7 @@ void build(final FormBuilder builder) {

private String createHTMLText(final String text) {
return HTML_TEXT_BLOCK_START
+ text
+ Utils.formatHTMLLinesForceEscaped( text)
.replace("<a", "<span")
.replace("</a", "</span")
.replace("<A", "<span")
Expand Down

0 comments on commit 90401da

Please sign in to comment.