Modular refactor: Very minor changes (comments, etc.)
This commit is contained in:
@@ -240,7 +240,7 @@ class LoncapaProblem(object):
|
||||
# used to be
|
||||
# if problemtree.tag in html_special_response:
|
||||
|
||||
if problemtree.tag in inputtypes.SimpleInput.get_xml_tags():
|
||||
if problemtree.tag in inputtypes.get_input_xml_tags():
|
||||
# status is currently the answer for the problem ID for the input element,
|
||||
# but it will turn into a dict containing both the answer and any associated message
|
||||
# for the problem ID for the input element.
|
||||
@@ -267,6 +267,8 @@ class LoncapaProblem(object):
|
||||
# print "[courseware.capa.capa_problem.extract_html] msg = ",msg
|
||||
|
||||
# do the rendering
|
||||
# This should be broken out into a helper function
|
||||
# that handles all input objects
|
||||
render_object = inputtypes.SimpleInput(system = self.system,
|
||||
xml = problemtree,
|
||||
state = {'value':value,
|
||||
|
||||
@@ -32,6 +32,10 @@ from lxml import etree
|
||||
|
||||
from mitxmako.shortcuts import render_to_string
|
||||
|
||||
def get_input_xml_tags():
|
||||
''' Eventually, this will be for all registered input types '''
|
||||
return SimpleInput.get_xml_tags()
|
||||
|
||||
class SimpleInput():# XModule
|
||||
''' Type for simple inputs -- plain HTML with a form element
|
||||
State is a dictionary with optional keys:
|
||||
|
||||
Reference in New Issue
Block a user