Remove explain attribute in favor of solution stanza as exemplified in edx4edx
This commit is contained in:
@@ -78,11 +78,6 @@ class CapaModule(XModule):
|
||||
|
||||
dom2 = etree.fromstring(definition['data'])
|
||||
|
||||
self.explanation = "problems/" + only_one(dom2.xpath('/problem/@explain'),
|
||||
default="closed")
|
||||
# TODO: Should be converted to: self.explanation=only_one(dom2.xpath('/problem/@explain'), default="closed")
|
||||
self.explain_available = only_one(dom2.xpath('/problem/@explain_available'))
|
||||
|
||||
display_due_date_string = self.metadata.get('due', None)
|
||||
if display_due_date_string is not None:
|
||||
self.display_due_date = dateutil.parser.parse(display_due_date_string)
|
||||
@@ -244,16 +239,6 @@ class CapaModule(XModule):
|
||||
if self.max_attempts is None and self.rerandomize != "always":
|
||||
save_button = False
|
||||
|
||||
# Check if explanation is available, and if so, give a link
|
||||
explain = ""
|
||||
if self.lcp.done and self.explain_available == 'attempted':
|
||||
explain = self.explanation
|
||||
if self.closed() and self.explain_available == 'closed':
|
||||
explain = self.explanation
|
||||
|
||||
if len(explain) == 0:
|
||||
explain = False
|
||||
|
||||
context = {'problem': content,
|
||||
'id': self.id,
|
||||
'check_button': check_button,
|
||||
@@ -263,7 +248,6 @@ class CapaModule(XModule):
|
||||
'ajax_url': self.system.ajax_url,
|
||||
'attempts_used': self.attempts,
|
||||
'attempts_allowed': self.max_attempts,
|
||||
'explain': explain,
|
||||
'progress': self.get_progress(),
|
||||
}
|
||||
|
||||
|
||||
@@ -30,9 +30,6 @@
|
||||
% if answer_available:
|
||||
<input class="show" type="button" value="Show Answer">
|
||||
% endif
|
||||
% if explain :
|
||||
<a href="/courseware/6.002_Spring_2012/${ explain }" class="new-page">Explanation</a>
|
||||
% endif
|
||||
% if attempts_allowed :
|
||||
<section class="submission_feedback">
|
||||
You have used ${ attempts_used } of ${ attempts_allowed } submissions
|
||||
|
||||
Reference in New Issue
Block a user