Skip to content
Snippets Groups Projects
Commit 102ffa12 authored by srosse's avatar srosse
Browse files

Merge OpenOLAT default branch to OpenOLAT absence with cd0462ab14cfdf97e3550a54870f6aee8f758de9

parents 140ac9a7 12033e76
No related branches found
No related tags found
No related merge requests found
Showing
with 93 additions and 34 deletions
...@@ -943,12 +943,11 @@ class UsermanagerUserSearchForm extends FormBasicController { ...@@ -943,12 +943,11 @@ class UsermanagerUserSearchForm extends FormBasicController {
FormItem fi = userPropertyHandler.addFormItem( FormItem fi = userPropertyHandler.addFormItem(
getLocale(), null, getClass().getCanonicalName(), false, formLayout getLocale(), null, getClass().getCanonicalName(), false, formLayout
); );
// OO-155: Do not validate items, this is a search form! // Do not validate items, this is a search form!
if (fi instanceof TextElement) { if (fi instanceof TextElement) {
TextElement textElement = (TextElement) fi; TextElement textElement = (TextElement) fi;
textElement.setItemValidatorProvider(null); textElement.setItemValidatorProvider(null);
} }
System.out.println(fi);
fi.setElementCssClass("o_sel_user_search_".concat(userPropertyHandler.getName().toLowerCase())); fi.setElementCssClass("o_sel_user_search_".concat(userPropertyHandler.getName().toLowerCase()));
fi.setTranslator(getTranslator()); fi.setTranslator(getTranslator());
......
...@@ -59,11 +59,19 @@ function o_mathjax(fct_success) { ...@@ -59,11 +59,19 @@ function o_mathjax(fct_success) {
extensions: ["jsMath2jax.js"], extensions: ["jsMath2jax.js"],
messageStyle: 'none', messageStyle: 'none',
showProcessingMessages: false, showProcessingMessages: false,
showMathMenu: false,
menuSettings: { },
jsMath2jax: { jsMath2jax: {
preview: "none" preview: "none"
}, },
tex2jax: { tex2jax: {
ignoreClass: "math" ignoreClass: "math"
},
"HTML-CSS": {
EqnChunk: 5, EqnChunkFactor: 1, EqnChunkDelay: 100
},
"fast-preview": {
disabled: true
} }
}); });
if(!(typeof fct_success === "undefined")) { if(!(typeof fct_success === "undefined")) {
......
...@@ -597,6 +597,27 @@ public class IFrameDeliveryMapper implements Mapper { ...@@ -597,6 +597,27 @@ public class IFrameDeliveryMapper implements Mapper {
appendStaticJs("js/prototype/prototype.js"); appendStaticJs("js/prototype/prototype.js");
} }
/*
MathJax.Hub.Config({
extensions: ["jsMath2jax.js"],
messageStyle: 'none',
showProcessingMessages: false,
showMathMenu: false,
menuSettings: { },
jsMath2jax: {
preview: "none"
},
tex2jax: {
ignoreClass: "math"
},
"HTML-CSS": {
EqnChunk: 5, EqnChunkFactor: 1, EqnChunkDelay: 100
},
"fast-preview": {
disabled: true
}
});
*/
public void appendJsMath() { public void appendJsMath() {
append("<script type=\"text/javascript\" src=\""); append("<script type=\"text/javascript\" src=\"");
append(WebappHelper.getMathJaxCdn()); append(WebappHelper.getMathJaxCdn());
...@@ -604,12 +625,21 @@ public class IFrameDeliveryMapper implements Mapper { ...@@ -604,12 +625,21 @@ public class IFrameDeliveryMapper implements Mapper {
append("<script type=\"text/javascript\">\n"); append("<script type=\"text/javascript\">\n");
append("MathJax.Hub.Config({\n"); append("MathJax.Hub.Config({\n");
append(" extensions: [\"jsMath2jax.js\"],\n"); append(" extensions: [\"jsMath2jax.js\"],\n");
append(" messageStyle: 'none',\n");
append(" showProcessingMessages: false,\n"); append(" showProcessingMessages: false,\n");
append(" showMathMenu: false,\n");
append(" menuSettings: { },\n");
append(" jsMath2jax: {\n"); append(" jsMath2jax: {\n");
append(" preview: \"none\"\n"); append(" preview: \"none\"\n");
append(" },\n"); append(" },\n");
append(" tex2jax: {\n"); append(" tex2jax: {\n");
append(" ignoreClass: \"math\"\n"); append(" ignoreClass: \"math\"\n");
append(" },\n");
append(" \"HTML-CSS\": {\n");
append(" EqnChunk: 5, EqnChunkFactor: 1, EqnChunkDelay: 100\n");
append(" },\n");
append(" \"fast-preview\": {\n");
append(" disabled: true\n");
append(" }\n"); append(" }\n");
append("});"); append("});");
append("</script>"); append("</script>");
......
...@@ -50,6 +50,7 @@ import org.olat.course.nodes.CourseNode; ...@@ -50,6 +50,7 @@ import org.olat.course.nodes.CourseNode;
import org.olat.course.nodes.pf.ui.PFRunController; import org.olat.course.nodes.pf.ui.PFRunController;
import org.olat.course.run.environment.CourseEnvironment; import org.olat.course.run.environment.CourseEnvironment;
import org.olat.repository.RepositoryEntry; import org.olat.repository.RepositoryEntry;
import org.olat.user.UserManager;
/** /**
* *
* Initial date: 05.01.2017<br> * Initial date: 05.01.2017<br>
...@@ -70,13 +71,15 @@ public class PFNotifications { ...@@ -70,13 +71,15 @@ public class PFNotifications {
private NotificationsManager notificationsManager; private NotificationsManager notificationsManager;
private PFManager pfManager; private PFManager pfManager;
private UserManager userManager;
public PFNotifications(Subscriber subscriber, Locale locale, Date compareDate, PFManager pfManager, public PFNotifications(Subscriber subscriber, Locale locale, Date compareDate, PFManager pfManager,
NotificationsManager notificationsManager) { NotificationsManager notificationsManager,UserManager userManager) {
this.subscriber = subscriber; this.subscriber = subscriber;
this.compareDate = compareDate; this.compareDate = compareDate;
this.notificationsManager = notificationsManager; this.notificationsManager = notificationsManager;
this.pfManager = pfManager; this.pfManager = pfManager;
this.userManager = userManager;
translator = Util.createPackageTranslator(PFRunController.class, locale); translator = Util.createPackageTranslator(PFRunController.class, locale);
} }
...@@ -135,8 +138,9 @@ public class PFNotifications { ...@@ -135,8 +138,9 @@ public class PFNotifications {
String forby = translator.translate("notifications.entry." + String forby = translator.translate("notifications.entry." +
(filePath.contains(PFManager.FILENAME_DROPBOX) ? "by" : "for")); (filePath.contains(PFManager.FILENAME_DROPBOX) ? "by" : "for"));
String userDisplayName = userManager.getUserDisplayName(participant);
String desc = translator.translate("notifications.entry." + action, String desc = translator.translate("notifications.entry." + action,
new String[] { filePath, forby, participant.getName() }); new String[] { filePath, forby, userDisplayName});
String businessPath = p.getBusinessPath(); String businessPath = p.getBusinessPath();
String urlToSend = BusinessControlFactory.getInstance() String urlToSend = BusinessControlFactory.getInstance()
.getURLFromBusinessPathString(businessPath); .getURLFromBusinessPathString(businessPath);
......
...@@ -45,6 +45,7 @@ import org.olat.course.run.environment.CourseEnvironment; ...@@ -45,6 +45,7 @@ import org.olat.course.run.environment.CourseEnvironment;
import org.olat.group.BusinessGroup; import org.olat.group.BusinessGroup;
import org.olat.group.BusinessGroupService; import org.olat.group.BusinessGroupService;
import org.olat.repository.RepositoryManager; import org.olat.repository.RepositoryManager;
import org.olat.user.UserManager;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
/** /**
...@@ -63,6 +64,8 @@ public class PFNotificationsHandler implements NotificationsHandler { ...@@ -63,6 +64,8 @@ public class PFNotificationsHandler implements NotificationsHandler {
private NotificationsManager notificationsManager; private NotificationsManager notificationsManager;
@Autowired @Autowired
private PFManager pfManager; private PFManager pfManager;
@Autowired
private UserManager userManager;
public PFNotificationsHandler() { public PFNotificationsHandler() {
...@@ -81,7 +84,7 @@ public class PFNotificationsHandler implements NotificationsHandler { ...@@ -81,7 +84,7 @@ public class PFNotificationsHandler implements NotificationsHandler {
final Translator translator = Util.createPackageTranslator(PFRunController.class, locale); final Translator translator = Util.createPackageTranslator(PFRunController.class, locale);
PFNotifications notifications = new PFNotifications(subscriber, locale, compareDate, PFNotifications notifications = new PFNotifications(subscriber, locale, compareDate,
pfManager, notificationsManager); pfManager, notificationsManager, userManager);
List<SubscriptionListItem> items = notifications.getItems(); List<SubscriptionListItem> items = notifications.getItems();
if (items.isEmpty()) { if (items.isEmpty()) {
......
...@@ -35,7 +35,7 @@ download.link=Mehrere Ordner herunterladen ...@@ -35,7 +35,7 @@ download.link=Mehrere Ordner herunterladen
tab.coach=Betreuer Ansicht tab.coach=Betreuer Ansicht
tab.participant=Teilnehmer Ansicht tab.participant=Teilnehmer Ansicht
notifications.header.course=Ordner in Kurs "{0}" notifications.header.course=Ordner in Kurs "{0}"
notifications.entry.upload=Das Dokument {0}" wurde eingestellt {1} {2}. notifications.entry.upload=Das Dokument "{0}" wurde eingestellt {1} {2}.
notifications.entry.modify=Das Dokument "{0}" wurde ge\u00E4ndert {1} {2}. notifications.entry.modify=Das Dokument "{0}" wurde ge\u00E4ndert {1} {2}.
notifications.entry.for=f\u00FCr notifications.entry.for=f\u00FCr
notifications.entry.by=von notifications.entry.by=von
......
...@@ -36,7 +36,7 @@ tab.coach=Coach view ...@@ -36,7 +36,7 @@ tab.coach=Coach view
tab.participant=Participant view tab.participant=Participant view
notifications.header.course=Folder in course "{0}" notifications.header.course=Folder in course "{0}"
notifications.entry.upload=A new file "{0}" has been uploaded {1} {2}. notifications.entry.upload=A new file "{0}" has been uploaded {1} {2}.
notifications.entry.modify=File "{0}" has been modified by {1} {2}. notifications.entry.modify=File "{0}" has been modified {1} {2}.
notifications.entry.for=for notifications.entry.for=for
notifications.entry.by=by notifications.entry.by=by
notifications.header=Participants of of the course "{0}" uploaded new files. notifications.header=Participants of of the course "{0}" uploaded new files.
......
...@@ -18,8 +18,8 @@ limit.count.coach.info=D\u00E8s que le nombre maximum de documents est atteint, ...@@ -18,8 +18,8 @@ limit.count.coach.info=D\u00E8s que le nombre maximum de documents est atteint,
limit.count.info=Vous ne pouvez t\u00E9l\u00E9verser ou cr\u00E9er que {0} documents au total. limit.count.info=Vous ne pouvez t\u00E9l\u00E9verser ou cr\u00E9er que {0} documents au total.
notifications.entry.by=par notifications.entry.by=par
notifications.entry.for=de notifications.entry.for=de
notifications.entry.modify=Document "{0}" a \u00E9t\u00E9 modifi\u00E9 par {1} {2}. notifications.entry.modify=Document "{0}" a \u00E9t\u00E9 modifi\u00E9 {1} {2}.
notifications.entry.upload=Un nouveau document "{0}" a \u00E9t\u00E9 t\u00E9l\u00E9vers\u00E9 par {1} {2}. notifications.entry.upload=Un nouveau document "{0}" a \u00E9t\u00E9 t\u00E9l\u00E9vers\u00E9 {1} {2}.
notifications.header=Membres du cours "{0}" ont t\u00E9l\u00E9charger de nouveaux documents. notifications.header=Membres du cours "{0}" ont t\u00E9l\u00E9charger de nouveaux documents.
notifications.header.course=Dossier du cours "{0}" notifications.header.course=Dossier du cours "{0}"
open.box=Ouvrir open.box=Ouvrir
......
...@@ -17,8 +17,8 @@ limit.count.coach.info=Una volta che si raggiunge il numero massimo di file, l'u ...@@ -17,8 +17,8 @@ limit.count.coach.info=Una volta che si raggiunge il numero massimo di file, l'u
limit.count.info=\u00C8 possibile caricare o creare {0} file totali. limit.count.info=\u00C8 possibile caricare o creare {0} file totali.
notifications.entry.by=da notifications.entry.by=da
notifications.entry.for=per notifications.entry.for=per
notifications.entry.modify=Il documento "{0}" \u00E8 stato modificato da {1} {2}. notifications.entry.modify=Il documento "{0}" \u00E8 stato modificato {1} {2}.
notifications.entry.upload=Un nuovo documento "{0}" \u00E8 stato caricato da {1} {2}. notifications.entry.upload=Un nuovo documento "{0}" \u00E8 stato caricato {1} {2}.
notifications.header=I partecipanti del corso "{0}" hanno caricato nuovi file. notifications.header=I partecipanti del corso "{0}" hanno caricato nuovi file.
notifications.header.course=Cartella nel corso "{0}" notifications.header.course=Cartella nel corso "{0}"
open.box=Aprire cartella open.box=Aprire cartella
......
...@@ -17,7 +17,7 @@ limit.count.coach.info=Assim que o n\u00FAmero m\u00E1ximo de arquivos for ating ...@@ -17,7 +17,7 @@ limit.count.coach.info=Assim que o n\u00FAmero m\u00E1ximo de arquivos for ating
limit.count.info=Voc\u00EA s\u00F3 pode carregar ou criar {0} arquivos no total. limit.count.info=Voc\u00EA s\u00F3 pode carregar ou criar {0} arquivos no total.
notifications.entry.by=por notifications.entry.by=por
notifications.entry.for=para notifications.entry.for=para
notifications.entry.modify=O arquivo "{0}" foi modificado por {1} {2}. notifications.entry.modify=O arquivo "{0}" foi modificado {1} {2}.
notifications.entry.upload=Um novo arquivo "{0}" foi enviado {1} {2}. notifications.entry.upload=Um novo arquivo "{0}" foi enviado {1} {2}.
notifications.header=Os participantes do curso "{0}" enviaram novos arquivos. notifications.header=Os participantes do curso "{0}" enviaram novos arquivos.
notifications.header.course=Pasta em curso "{0}" notifications.header.course=Pasta em curso "{0}"
......
...@@ -28,6 +28,7 @@ import org.olat.core.gui.components.form.flexible.impl.FormBasicController; ...@@ -28,6 +28,7 @@ import org.olat.core.gui.components.form.flexible.impl.FormBasicController;
import org.olat.core.gui.components.form.flexible.impl.FormLayoutContainer; import org.olat.core.gui.components.form.flexible.impl.FormLayoutContainer;
import org.olat.core.gui.control.Controller; import org.olat.core.gui.control.Controller;
import org.olat.core.gui.control.WindowControl; import org.olat.core.gui.control.WindowControl;
import org.olat.core.util.Formatter;
import org.olat.core.util.StringHelper; import org.olat.core.util.StringHelper;
import org.olat.core.util.Util; import org.olat.core.util.Util;
import org.olat.core.util.filter.impl.NekoHTMLFilter; import org.olat.core.util.filter.impl.NekoHTMLFilter;
...@@ -134,9 +135,10 @@ public class QTI12MetadataController extends FormBasicController { ...@@ -134,9 +135,10 @@ public class QTI12MetadataController extends FormBasicController {
for(Response response:responses) { for(Response response:responses) {
String responseSummary = getResponseSummary(response); String responseSummary = getResponseSummary(response);
if(responseSummary != null) { if(responseSummary != null) {
boolean correct = response.isCorrect(); boolean correct = response.isCorrect();
String points = Float.toString(response.getPoints()); String points = Float.toString(response.getPoints());
ResponseAndPoints responseInfos = new ResponseAndPoints(responseSummary, points, correct); ResponseAndPoints responseInfos = new ResponseAndPoints(Formatter.formatLatexFormulas(responseSummary), points, correct);
responsesPoints.add(responseInfos); responsesPoints.add(responseInfos);
} }
} }
...@@ -154,7 +156,7 @@ public class QTI12MetadataController extends FormBasicController { ...@@ -154,7 +156,7 @@ public class QTI12MetadataController extends FormBasicController {
if(response.isCorrect()) { if(response.isCorrect()) {
String responseSummary = getResponseSummary(response); String responseSummary = getResponseSummary(response);
if(responseSummary != null) { if(responseSummary != null) {
correctResponseNames.add(responseSummary); correctResponseNames.add(Formatter.formatLatexFormulas(responseSummary));
} }
} }
} }
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<h3><i class="o_icon $series.itemCss""> </i> $title</h3> <h3><i class="o_icon $series.itemCss""> </i> $title</h3>
#if ($question && $question != "") #if ($question && $question != "")
<h4>$r.translate("chart.item")</h4> <h4>$r.translate("chart.item")</h4>
<div class="o_qti_statistics_question clearfix">$question</div> <div class="o_qti_statistics_question clearfix">$r.formatLatexFormulas($question)</div>
#end #end
<h4>$r.translate("fig.title")</h4> <h4>$r.translate("fig.title")</h4>
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
<strong>$responseInfo.label.</strong> <strong>$responseInfo.label.</strong>
#if($responseInfo.points) $r.translate("answer.points", $responseInfo.formattedPoints) #end #if($responseInfo.points) $r.translate("answer.points", $responseInfo.formattedPoints) #end
#if($responseInfo.wrongAnswersAvailable) #if($responseInfo.wrongAnswersAvailable)
<span class="o_qti_statistics_answer"><strong>$responseInfo.text</strong></span> <span class="o_qti_statistics_answer"><strong>$r.formatLatexFormulas($responseInfo.text)</strong></span>
<p class="o_qti_statistics_wrong_answer">#if($responseInfo.survey) <p class="o_qti_statistics_wrong_answer">#if($responseInfo.survey)
<i>$r.translate("fib.answer")</i> <i>$r.translate("fib.answer")</i>
#else #else
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
#end #end
$responseInfo.formattedWrongAnswers</p> $responseInfo.formattedWrongAnswers</p>
#else #else
<span class="o_qti_statistics_answer">$responseInfo.text</span> <span class="o_qti_statistics_answer">$r.formatLatexFormulas($responseInfo.text)</span>
#end #end
</li> </li>
#end #end
......
...@@ -354,11 +354,13 @@ public class AssessmentResultController extends FormBasicController { ...@@ -354,11 +354,13 @@ public class AssessmentResultController extends FormBasicController {
TestPlanNode section = node.getParent(); TestPlanNode section = node.getParent();
Results sectionResults = resultsMap.get(section); Results sectionResults = resultsMap.get(section);
sectionResults.addSubResults(assessmentItemResults); if(sectionResults != null) {
if(assessmentItemResults.hasMaxScore()) { sectionResults.addSubResults(assessmentItemResults);
sectionResults.addMaxScore(assessmentItemResults); if(assessmentItemResults.hasMaxScore()) {
if(assessmentItemResults.hasScore()) { sectionResults.addMaxScore(assessmentItemResults);
sectionResults.addScore(assessmentItemResults); if(assessmentItemResults.hasScore()) {
sectionResults.addScore(assessmentItemResults);
}
} }
} }
} }
......
...@@ -9,11 +9,10 @@ ...@@ -9,11 +9,10 @@
<h5>$r.translate("section"): $r.escapeHtml($sectionTitle)</h5> <h5>$r.translate("section"): $r.escapeHtml($sectionTitle)</h5>
#end #end
<h3><i class="o_icon $itemCss""> </i> $r.escapeHtml($title)</h3> <h3><i class="o_icon $itemCss""> </i> $r.escapeHtml($title)</h3>
#if ($question && $question != "") #if($r.isNotEmpty($question))
<h4>$r.translate("chart.item")</h4> <h4>$r.translate("chart.item")</h4>
<div class="o_qti_statistics_question clearfix">$r.escapeHtml($question)</div> <div class="o_qti_statistics_question clearfix">$r.escapeHtml($question)</div>
#end #end
<h4>$r.translate("fig.title")</h4> <h4>$r.translate("fig.title")</h4>
<table class="o_qti_statistics_figures"><tbody> <table class="o_qti_statistics_figures"><tbody>
#if($numOfParticipants) #if($numOfParticipants)
......
...@@ -23,8 +23,8 @@ import java.util.List; ...@@ -23,8 +23,8 @@ import java.util.List;
import org.olat.core.gui.UserRequest; import org.olat.core.gui.UserRequest;
import org.olat.core.gui.control.WindowControl; import org.olat.core.gui.control.WindowControl;
import org.olat.core.util.Formatter;
import org.olat.core.util.StringHelper; import org.olat.core.util.StringHelper;
import org.olat.core.util.filter.FilterFactory;
import org.olat.ims.qti.statistics.model.StatisticsItem; import org.olat.ims.qti.statistics.model.StatisticsItem;
import org.olat.ims.qti21.model.statistics.ChoiceStatistics; import org.olat.ims.qti21.model.statistics.ChoiceStatistics;
import org.olat.ims.qti21.model.xml.AssessmentHtmlBuilder; import org.olat.ims.qti21.model.xml.AssessmentHtmlBuilder;
...@@ -65,7 +65,7 @@ public class HottextInteractionStatisticsController extends ChoiceInteractionSta ...@@ -65,7 +65,7 @@ public class HottextInteractionStatisticsController extends ChoiceInteractionSta
String text = choice.getLabel(); String text = choice.getLabel();
if(!StringHelper.containsNonWhitespace(text)) { if(!StringHelper.containsNonWhitespace(text)) {
text = new AssessmentHtmlBuilder().inlineStaticString(((Hottext)choice).getInlineStatics()); text = new AssessmentHtmlBuilder().inlineStaticString(((Hottext)choice).getInlineStatics());
text = FilterFactory.getHtmlTagsFilter().filter(text); text = Formatter.formatLatexFormulas(text);
} }
return text; return text;
} }
......
...@@ -29,8 +29,8 @@ import org.olat.core.gui.components.velocity.VelocityContainer; ...@@ -29,8 +29,8 @@ import org.olat.core.gui.components.velocity.VelocityContainer;
import org.olat.core.gui.control.Event; import org.olat.core.gui.control.Event;
import org.olat.core.gui.control.WindowControl; import org.olat.core.gui.control.WindowControl;
import org.olat.core.gui.control.controller.BasicController; import org.olat.core.gui.control.controller.BasicController;
import org.olat.core.util.Formatter;
import org.olat.core.util.Util; import org.olat.core.util.Util;
import org.olat.core.util.filter.FilterFactory;
import org.olat.ims.qti.statistics.QTIType; import org.olat.ims.qti.statistics.QTIType;
import org.olat.ims.qti.statistics.ui.ResponseInfos; import org.olat.ims.qti.statistics.ui.ResponseInfos;
import org.olat.ims.qti.statistics.ui.Series; import org.olat.ims.qti.statistics.ui.Series;
...@@ -129,7 +129,7 @@ public class KPrimStatisticsController extends BasicController { ...@@ -129,7 +129,7 @@ public class KPrimStatisticsController extends BasicController {
for(SimpleAssociableChoice choice:fourMatchSet.getSimpleAssociableChoices()) { for(SimpleAssociableChoice choice:fourMatchSet.getSimpleAssociableChoices()) {
if(choice.getIdentifier().equals(choiceIdentifier)) { if(choice.getIdentifier().equals(choiceIdentifier)) {
String textFlow = assessmentHtmlBuilder.flowStaticString(choice.getFlowStatics()); String textFlow = assessmentHtmlBuilder.flowStaticString(choice.getFlowStatics());
text = FilterFactory.getHtmlTagAndDescapingFilter().filter(textFlow); text = Formatter.formatLatexFormulas(textFlow);
} }
} }
responseInfos.add(new ResponseInfos(label, text, null, correctRight, survey, true)); responseInfos.add(new ResponseInfos(label, text, null, correctRight, survey, true));
......
...@@ -236,6 +236,7 @@ public class MatchStatisticsController extends BasicController { ...@@ -236,6 +236,7 @@ public class MatchStatisticsController extends BasicController {
this.choice = choice; this.choice = choice;
this.choiceIdentifier = choice.getIdentifier(); this.choiceIdentifier = choice.getIdentifier();
summary = assessmentHtmlBuilder.flowStaticString(choice.getFlowStatics()); summary = assessmentHtmlBuilder.flowStaticString(choice.getFlowStatics());
} }
public Identifier getChoiceIdentifier() { public Identifier getChoiceIdentifier() {
......
...@@ -23,8 +23,8 @@ import java.util.List; ...@@ -23,8 +23,8 @@ import java.util.List;
import org.olat.core.gui.UserRequest; import org.olat.core.gui.UserRequest;
import org.olat.core.gui.control.WindowControl; import org.olat.core.gui.control.WindowControl;
import org.olat.core.util.Formatter;
import org.olat.core.util.StringHelper; import org.olat.core.util.StringHelper;
import org.olat.core.util.filter.FilterFactory;
import org.olat.ims.qti.statistics.model.StatisticsItem; import org.olat.ims.qti.statistics.model.StatisticsItem;
import org.olat.ims.qti21.model.statistics.ChoiceStatistics; import org.olat.ims.qti21.model.statistics.ChoiceStatistics;
import org.olat.ims.qti21.model.xml.AssessmentHtmlBuilder; import org.olat.ims.qti21.model.xml.AssessmentHtmlBuilder;
...@@ -62,7 +62,7 @@ public class SimpleChoiceInteractionStatisticsController extends ChoiceInteracti ...@@ -62,7 +62,7 @@ public class SimpleChoiceInteractionStatisticsController extends ChoiceInteracti
String text = choice.getLabel(); String text = choice.getLabel();
if(!StringHelper.containsNonWhitespace(text)) { if(!StringHelper.containsNonWhitespace(text)) {
text = new AssessmentHtmlBuilder().flowStaticString(((SimpleChoice)choice).getFlowStatics()); text = new AssessmentHtmlBuilder().flowStaticString(((SimpleChoice)choice).getFlowStatics());
text = FilterFactory.getHtmlTagsFilter().filter(text); text = Formatter.formatLatexFormulas(text);
} }
return text; return text;
} }
......
...@@ -5,14 +5,14 @@ ...@@ -5,14 +5,14 @@
<tr> <tr>
<th></th> <th></th>
#foreach($targetChoice in $targetChoices) #foreach($targetChoice in $targetChoices)
<th>${targetChoice.getSummary()} <th>$r.formatLatexFormulas(${targetChoice.getSummary()})</th>
#end #end
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
#foreach($sourceChoice in $sourceChoices) #foreach($sourceChoice in $sourceChoices)
<tr> <tr>
<th>${sourceChoice.getSummary()}</th> <th>$r.formatLatexFormulas(${sourceChoice.getSummary()})</th>
#foreach($targetChoice in $targetChoices) #foreach($targetChoice in $targetChoices)
<td> <td>
#set($scoreWrapper = $r.get("${sourceChoice.getChoiceIdentifier().toString()}-${targetChoice.getChoiceIdentifier().toString()}")) #set($scoreWrapper = $r.get("${sourceChoice.getChoiceIdentifier().toString()}-${targetChoice.getChoiceIdentifier().toString()}"))
......
...@@ -309,8 +309,19 @@ public class MessageListController extends BasicController implements GenericEve ...@@ -309,8 +309,19 @@ public class MessageListController extends BasicController implements GenericEve
} }
} else if(message != null) { } else if(message != null) {
MessageView view = loadView(ureq, message); MessageView view = loadView(ureq, message);
backupViews.add(view); int index = 0;
for(int i=0; i<backupViews.size(); i++) {
if(backupViews.get(i).getKey().equals(message.getKey())) {
backupViews.remove(backupViews.get(i));
index = i;
break;
}
}
if(index >= 0) {
backupViews.add(index, view);
} else {
backupViews.add(view);
}
mainVC.contextPut("messages", backupViews); mainVC.contextPut("messages", backupViews);
messageTableCtrl.loadMessages(new ArrayList<>(0)); messageTableCtrl.loadMessages(new ArrayList<>(0));
......
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