Commit c04455c5 by Vik Paruchuri

Fix html display

parent 6a535262
......@@ -635,9 +635,9 @@ class OpenEndedModule():
#set context variables and render template
if self.state != self.INITIAL:
latest = self.latest_answer()
previous_answer = latest if latest is not None else ''
previous_answer = latest if latest is not None else self.initial_display
else:
previous_answer = ''
previous_answer = self.initial_display
context = {
'prompt': self.prompt,
......@@ -648,6 +648,7 @@ class OpenEndedModule():
'cols' : 80,
'hidden' : '',
'id' : 'open_ended',
'msg' : "",
}
html = system.render_template('open_ended.html', context)
......
<section id="openended_${id}" class="open-ended-child" data-state="${state}">
${prompt|n}
<textarea rows="${rows}" cols="${cols}" name="input_${id}" class="short-form-response" id="input_${id}"
% if hidden:
style="display:none;"
% endif
>${value|h}</textarea>
>${previous_answer|h}</textarea>
<div class="grader-status">
% if state == 'initial':
......@@ -21,14 +22,16 @@
% endif
</div>
<input type="button" value="Submit" class="submit-button" name="show"/>
<span id="answer_${id}"></span>
% if status == 'queued':
% if state == 'assessing':
<input name="reload" class="reload" type="button" value="Recheck for Feedback" onclick="document.location.reload(true);" />
% endif
<div class="external-grader-message">
${msg|n}
% if status in ['correct','incorrect']:
% if state == 'done':
<div class="collapsible evaluation-response">
<header>
<a href="#">Respond to Feedback</a>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment