From f9e162fa577a2a9d56b76938695ce86e823dbe50 Mon Sep 17 00:00:00 2001 From: Walther Neuper Date: Sun, 10 Jan 2010 13:27:17 +0000 Subject: cleanups --- diff --git a/ReckonPrimer.activity/exaddsimp.py b/ReckonPrimer.activity/exaddsimp.py index 9c8338d..aa1dd42 100755 --- a/ReckonPrimer.activity/exaddsimp.py +++ b/ReckonPrimer.activity/exaddsimp.py @@ -449,13 +449,16 @@ class ExAddSimp(Exercise): self.toggle_pos3_lower.set_active(False) if( self.toggle_pos3_lower.get_active() ): - self._display._sett['=input'] = list(set(self._display._sett['=input']) | set([3])) + self._display._sett['=input'] = list( + set(self._display._sett['=input']) | set([3])) else: - if( self.toggle_equal_fixed_left.get_active() ): - if( not self.toggle_pos1_lower.get_active() and not self.toggle_pos5_lower.get_active() ): + if(self.toggle_equal_fixed_left.get_active()): + if(not self.toggle_pos1_lower.get_active() and + not self.toggle_pos5_lower.get_active()): self.toggle_pos3_lower.set_active(True) else: - self._display._sett['=input'] = list(set(self._display._sett['=input']) - set([3])) + self._display._sett['=input'] = list( + set(self._display._sett['=input']) - set([3])) def toggle_pos5_lower_callback(self, widget): if( self.toggle_equal_fixed_left.get_active() ): diff --git a/ReckonPrimer.activity/exercise.py b/ReckonPrimer.activity/exercise.py index c824214..09d83ce 100755 --- a/ReckonPrimer.activity/exercise.py +++ b/ReckonPrimer.activity/exercise.py @@ -6,7 +6,7 @@ class Exercise: """This is the base class for the individual exercises. An exercise is characterized by a topic. A topic determines the fields of the settings self._sett and public methods of Exercise. - The values of self._sett may vary from exercise to exercise. + The values of self._sett may vary between exercises within 1 topic. """ def __init__(self): """ An Exercise stores data on evaluation, i.e date, duration TODO. @@ -37,7 +37,9 @@ class Exercise: self._calcs = self._generate_calcs() def get_calcs(self): - """ Get all calculations generated by the current settings. """ + """ Newly generate all calculations according to current settings + and return all calculations. """ + self._calcs = self._generate_calcs() return self._calcs def get_next_calc(self): -- cgit v0.9.1