mirror of https://github.com/dirtbags/moth.git
Compare commits
No commits in common. "58f60e459846e9fe29296cb3dae6dadb21cddb3e" and "124b879f03dff1b19babd2fa5839d94158241a35" have entirely different histories.
58f60e4598
...
124b879f03
|
@ -8,15 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
### Changed
|
### Changed
|
||||||
- Answer hashes are now the first 4 characters of the hex-encoded SHA1 digest
|
- Answer hashes are now the first 4 characters of the hex-encoded SHA1 digest
|
||||||
- Reworked the built-in theme
|
- Reworked the built-in theme
|
||||||
|
- [moth.mjs](theme/moth.mjs) is now the standard MOTH library for ECMAScript
|
||||||
- Devel mode no longer accepts an empty team ID
|
- Devel mode no longer accepts an empty team ID
|
||||||
- messages.html moved into theme
|
- messages.html moved into theme
|
||||||
|
|
||||||
### Added
|
|
||||||
- [moth.mjs](theme/moth.mjs) is now the standard MOTH library for ECMAScript
|
|
||||||
- Exported state now includes "Enabled" boolean
|
- Exported state now includes "Enabled" boolean
|
||||||
- New `Extra` field on puzzles will allow arbitrary metadata on puzzles.
|
|
||||||
PNNL's SCTR Osprey will use this to standardize fields for their custom theme,
|
|
||||||
but it can be generally used for anything.
|
|
||||||
|
|
||||||
## [v4.4.11] - 2023-04-11
|
## [v4.4.11] - 2023-04-11
|
||||||
### Changed
|
### Changed
|
||||||
|
|
|
@ -60,13 +60,6 @@ type Puzzle struct {
|
||||||
// AnswerHashes contains hashes of all answers for this puzzle
|
// AnswerHashes contains hashes of all answers for this puzzle
|
||||||
AnswerHashes []string
|
AnswerHashes []string
|
||||||
|
|
||||||
// Answers lists all acceptable answers, omitted in mothballs
|
|
||||||
Answers []string
|
|
||||||
|
|
||||||
// Extra is send unchanged to the client.
|
|
||||||
// Eventually, Objective, KSAs, and Success will move into Extra.
|
|
||||||
Extra map[string]any
|
|
||||||
|
|
||||||
// Objective is the learning objective for this puzzle
|
// Objective is the learning objective for this puzzle
|
||||||
Objective string
|
Objective string
|
||||||
|
|
||||||
|
@ -81,6 +74,9 @@ type Puzzle struct {
|
||||||
// Mastery describes the work required to be considered mastering this puzzle's conceptss
|
// Mastery describes the work required to be considered mastering this puzzle's conceptss
|
||||||
Mastery string
|
Mastery string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Answers lists all acceptable answers, omitted in mothballs
|
||||||
|
Answers []string
|
||||||
}
|
}
|
||||||
|
|
||||||
func (puzzle *Puzzle) computeAnswerHashes() {
|
func (puzzle *Puzzle) computeAnswerHashes() {
|
||||||
|
|
|
@ -178,17 +178,11 @@ class Puzzle {
|
||||||
this.Answers ||= []
|
this.Answers ||= []
|
||||||
this.Attachments ||= []
|
this.Attachments ||= []
|
||||||
this.Authors ||= []
|
this.Authors ||= []
|
||||||
this.Scripts ||= []
|
|
||||||
this.Debug ||= {}
|
|
||||||
this.Debug.Errors ||= []
|
this.Debug.Errors ||= []
|
||||||
this.Debug.Hints ||= []
|
this.Debug.Hints ||= []
|
||||||
this.Debug.Log ||= []
|
this.Debug.Log ||= []
|
||||||
this.Extra ||= {}
|
this.KSAs ||= []
|
||||||
|
this.Scripts ||= []
|
||||||
// Be ready to handle a future revision to the Puzzle structure
|
|
||||||
this.Objective ||= this.Extra.Objective
|
|
||||||
this.KSAs ||= this.Extra.KSAs || []
|
|
||||||
this.Success ||= this.Extra.Success || {}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue