From 6ec68a333ae18afe8bda6b08b0edd2afd9fe5f28 Mon Sep 17 00:00:00 2001 From: John Donaldson Date: Tue, 9 Jul 2019 17:36:01 +0100 Subject: [PATCH] Adding stubs for NICE objectives --- devel/moth.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/devel/moth.py b/devel/moth.py index 612d371..60db4c1 100644 --- a/devel/moth.py +++ b/devel/moth.py @@ -80,6 +80,10 @@ class Puzzle: self.hint = None self.files = {} self.body = io.StringIO() + self.objective = None # Text describing the expected learning outcome from solving this puzzle + self.success = None # TODO + self.solution = None # Text describing how to solve the puzzle + self.ksa = [] # A list of references to related NICE KSAs (e.g. K0058, . . .) self.logs = [] self.randseed = category_seed * self.points self.rand = random.Random(self.randseed) @@ -128,6 +132,14 @@ class Puzzle: # Make sure this shows up in the header block of the HTML output. self.files[val] = PuzzleFile(stream, val, visible=False) self.scripts.append(val) + elif key == "objective": + self.objective = val + elif key == "success": + self.success = val + elif key == "solution": + self.solution = val + elif key == "ksa": + self.solution = val else: raise ValueError("Unrecognized header field: {}".format(key)) else: @@ -278,6 +290,10 @@ class Puzzle: 'scripts': self.scripts, 'pattern': self.pattern, 'body': self.html_body(), + 'objective': self.objective, + 'success': self.success, + 'solution': self.solution, + 'ksa': self.ksa, } def hashes(self):