From d6a2933eb0dc84ac6032c98d11e74d3c4be82b7f Mon Sep 17 00:00:00 2001 From: Jazzpirate Date: Thu, 12 Oct 2023 15:14:55 +0200 Subject: [PATCH] points in sTeX problems --- .../info/kwarc/mmt/stex/Extensions/DocumentExtension.scala | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mmt-stex/src/info/kwarc/mmt/stex/Extensions/DocumentExtension.scala b/src/mmt-stex/src/info/kwarc/mmt/stex/Extensions/DocumentExtension.scala index 25616f914..f0d865c24 100644 --- a/src/mmt-stex/src/info/kwarc/mmt/stex/Extensions/DocumentExtension.scala +++ b/src/mmt-stex/src/info/kwarc/mmt/stex/Extensions/DocumentExtension.scala @@ -903,7 +903,11 @@ trait SHTMLDocumentServer { this : STeXServer => override def onAdd: Unit = { super.onAdd - plain.attributes((this.namespace, "data-problem-points")) = plain.attributes.getOrElse((HTMLParser.ns_shtml,"problempoints"),"0") + this.findAncestor { + case p: Problem => p + }.foreach { p => + p.plain.attributes((this.namespace, "data-problem-points")) = plain.attributes.getOrElse((HTMLParser.ns_shtml, "problempoints"), "0") + } } } case class ProblemMinutes(orig: HTMLNode) extends SHTMLNode(orig) {