Skip to content

Commit

Permalink
Support answerImage in order items
Browse files Browse the repository at this point in the history
  • Loading branch information
nymanjens committed Dec 30, 2022
1 parent 833f75b commit 6f9c2fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ class QuizConfigParsableValue @Inject() (implicit
"questionDetail" -> Optional(StringValue),
"masterNotes" -> Optional(StringValue),
"image" -> Optional(ImageValue),
"answerImage" -> Optional(ImageValue),
"tag" -> Optional(StringValue),
"orderedItemsThatWillBePresentedInAlphabeticalOrder" -> Required(
ListParsableValue(OrderItemValue)(_.item)
Expand All @@ -435,6 +436,7 @@ class QuizConfigParsableValue @Inject() (implicit
question = map.required[String]("question"),
questionDetail = map.optional("questionDetail"),
image = map.optional("image"),
answerImage = map.optional("answerImage"),
masterNotes = map.optional("masterNotes"),
tag = map.optional("tag"),
orderedItemsThatWillBePresentedInAlphabeticalOrder =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,7 @@ object QuizConfig {
override val answerDetail: Option[String],
override val masterNotes: Option[String],
override val image: Option[Image],
override val answerImage: Option[Image],
pointsToGain: FixedPointNumber,
override val maxTime: Duration,
) extends StandardSinglePartQuestionBase {
Expand Down Expand Up @@ -601,7 +602,6 @@ object QuizConfig {
override def answerAsString: String = {
orderedItemsThatWillBePresentedInAlphabeticalOrder.map(i => toCharacterCode(i)).mkString
}
override def answerImage: Option[Image] = None
override def audioSrc: Option[String] = None
override def answerAudioSrc: Option[String] = None
override def videoSrc: Option[String] = None
Expand Down

0 comments on commit 6f9c2fb

Please sign in to comment.