From c7d80a91eeff6875ba48096fa4cb92b06a3ebe40 Mon Sep 17 00:00:00 2001 From: Will Daly Date: Tue, 5 Mar 2013 17:30:38 -0500 Subject: [PATCH] Changed name of survey_question to is_survey_question for clarity --- common/lib/xmodule/xmodule/capa_module.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/lib/xmodule/xmodule/capa_module.py b/common/lib/xmodule/xmodule/capa_module.py index b42b7e4ccc..9ae6583c50 100644 --- a/common/lib/xmodule/xmodule/capa_module.py +++ b/common/lib/xmodule/xmodule/capa_module.py @@ -279,7 +279,7 @@ class CapaModule(XModule): """ Return True/False to indicate whether to show the "Reset" button. """ - survey_question = (self.max_attempts == 0) + is_survey_question = (self.max_attempts == 0) if self.rerandomize in ["always", "onreset"]: @@ -287,7 +287,7 @@ class CapaModule(XModule): # then do NOT show the reset button. # If the problem hasn't been submitted yet, then do NOT show # the reset button. - if (self.closed() and not survey_question) or not self.is_completed(): + if (self.closed() and not is_survey_question) or not self.is_completed(): return False else: return True @@ -307,14 +307,14 @@ class CapaModule(XModule): if self.force_save_button == "true": return not self.closed() else: - survey_question = (self.max_attempts == 0) + is_survey_question = (self.max_attempts == 0) needs_reset = self.is_completed() and self.rerandomize == "always" # If the problem is closed (and not a survey question with max_attempts==0), # then do NOT show the reset button # If we're waiting for the user to reset a randomized problem # then do NOT show the reset button - if (self.closed() and not survey_question) or needs_reset: + if (self.closed() and not is_survey_question) or needs_reset: return False else: return True