Skip to content

Commit

Permalink
points in sTeX problems
Browse files Browse the repository at this point in the history
  • Loading branch information
Jazzpirate committed Oct 12, 2023
1 parent f8b0e7a commit 6edb37f
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -875,39 +875,39 @@ trait SHTMLDocumentServer { this : STeXServer =>
}
}
case class ProblemHint(orig: HTMLNode) extends SHTMLNode(orig) {
def copy = Solution(orig.copy)
def copy = ProblemHint(orig.copy)

override def onAdd: Unit = {
super.onAdd
plain.attributes((this.namespace, "data-problem-hint")) = "true"
}
}
case class ProblemNote(orig: HTMLNode) extends SHTMLNode(orig) {
def copy = Solution(orig.copy)
def copy = ProblemNote(orig.copy)

override def onAdd: Unit = {
super.onAdd
plain.attributes((this.namespace, "data-problem-note")) = "true"
}
}
case class ProblemGNote(orig: HTMLNode) extends SHTMLNode(orig) {
def copy = Solution(orig.copy)
def copy = ProblemGNote(orig.copy)

override def onAdd: Unit = {
super.onAdd
plain.attributes((this.namespace, "data-problem-g-note")) = "true"
}
}
case class ProblemPoints(orig: HTMLNode) extends SHTMLNode(orig) {
def copy = Solution(orig.copy)
def copy = ProblemPoints(orig.copy)

override def onAdd: Unit = {
super.onAdd
plain.attributes((this.namespace, "data-problem-points")) = "true"
plain.attributes((this.namespace, "data-problem-points")) = plain.attributes.getOrElse((HTMLParser.ns_shtml,"problempoints"),"0")
}
}
case class ProblemMinutes(orig: HTMLNode) extends SHTMLNode(orig) {
def copy = Solution(orig.copy)
def copy = ProblemMinutes(orig.copy)

override def onAdd: Unit = {
super.onAdd
Expand Down

0 comments on commit 6edb37f

Please sign in to comment.