This repository was archived by the owner on Jun 7, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed
Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change 2626
2727def setup (app ):
2828 app .add_directive ('mchoice' , MChoice )
29+ app .add_directive ('mchoicemf' , MChoiceMF )
30+ app .add_directive ('mchoicema' , MChoiceMA )
31+ app .add_directive ('mchoicerandommf' , MChoiceRandomMF )
2932 app .add_directive ('fillintheblank' , FillInTheBlank )
3033 app .add_directive ('blank' , Blank )
3134 app .add_directive ('addbutton' , AddButton )
Original file line number Diff line number Diff line change @@ -153,5 +153,27 @@ def run(self):
153153 mcNode .template_end = TEMPLATE_END
154154
155155 #self.state.nested_parse(self.content, self.content_offset, mcNode)
156-
157156 return [mcNode ]
157+
158+ class MChoiceMF (MChoice ):
159+ def run (self ):
160+ print ("This directive has been depreciated. Please convert to the new directive 'mchoice'" )
161+ mcmfNode = super (MChoiceMF ,self ).run ()[0 ]
162+
163+ return [mcmfNode ]
164+
165+ class MChoiceMA (MChoice ):
166+ def run (self ):
167+ self .options ['multipleAnswers' ] = 'multipleAnswers'
168+ print ("This directive has been depreciated. Please convert to the new directive 'mchoice'" )
169+ mchoicemaNode = super (MChoiceMA ,self ).run ()[0 ]
170+
171+ return [mchoicemaNode ]
172+
173+ class MChoiceRandomMF (MChoice ):
174+ def run (self ):
175+ self .options ['random' ] = 'random'
176+ print ("This directive has been depreciated. Please convert to the new directive 'mchoice'" )
177+ mchoicerandommfNode = super (MChoiceRandomMF ,self ).run ()[0 ]
178+
179+ return [mchoicerandommfNode ]
You can’t perform that action at this time.
0 commit comments