From e7d44a260624643bd365405baafd949efde9074a Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Mon, 2 Jul 2012 20:28:38 -0400 Subject: [PATCH] Remove explain attribute in favor of solution stanza as exemplified in edx4edx --- common/lib/xmodule/xmodule/capa_module.py | 16 ---------------- lms/templates/problem.html | 3 --- 2 files changed, 19 deletions(-) diff --git a/common/lib/xmodule/xmodule/capa_module.py b/common/lib/xmodule/xmodule/capa_module.py index 7744b3029f..67e3aac93d 100644 --- a/common/lib/xmodule/xmodule/capa_module.py +++ b/common/lib/xmodule/xmodule/capa_module.py @@ -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(), } diff --git a/lms/templates/problem.html b/lms/templates/problem.html index d051740710..a78a1042a6 100644 --- a/lms/templates/problem.html +++ b/lms/templates/problem.html @@ -30,9 +30,6 @@ % if answer_available: % endif - % if explain : - Explanation - % endif % if attempts_allowed :
You have used ${ attempts_used } of ${ attempts_allowed } submissions