Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalther Neuper <neuper@neuper.(none)>2009-12-12 13:46:05 (GMT)
committer Walther Neuper <neuper@neuper.(none)>2009-12-12 13:46:05 (GMT)
commit0c71b7c74218316ff55a8fce49dd03158abec9e0 (patch)
tree31ca82900023b30411f3c5b4852ce3a86e133a62
parentd58bac36c9781a0609079e6bb0cff14af01371dc (diff)
added collection
-rwxr-xr-xReckonPrimer.activity/session.py2
-rwxr-xr-xReckonPrimer.activity/settings.py45
2 files changed, 29 insertions, 18 deletions
diff --git a/ReckonPrimer.activity/session.py b/ReckonPrimer.activity/session.py
index 813e9ba..19be2f1 100755
--- a/ReckonPrimer.activity/session.py
+++ b/ReckonPrimer.activity/session.py
@@ -2,6 +2,7 @@
from author import Author
from coach import Coach
+from collection import Collection
from display import Display
from learner import Learner
@@ -20,6 +21,7 @@ class Session:
self._author = Author()
self._co.register(self, self._dis, self._learner)
self._dis.register(self, self._co, self._learner)
+ self._collect = Collection()
self._co.create_exercises() #TODO.WN091101 replace by storing Exerc.s
self._calcs = None #pop !
diff --git a/ReckonPrimer.activity/settings.py b/ReckonPrimer.activity/settings.py
index 4ada373..84c9ba3 100755
--- a/ReckonPrimer.activity/settings.py
+++ b/ReckonPrimer.activity/settings.py
@@ -1,11 +1,11 @@
-# -*- coding: UTF8 -*-
+# -*- coding: utf-8 -*-
# (c) Patrick Loder 2009
import pickle
import os
class Settings:
"""
- a setting is a dictionary, the settings is a dict of dicts.
+ a setting is a dictionary, the settings are a dict of dicts.
if there is no file then the default settings are taken ...
... see save_last_sett, load_last_sett #due to Sugar write-constraints
@@ -19,30 +19,36 @@ class Settings:
#+ and - between min and max, max <= 10
self._default_addsub_simp = \
{'topic' : 'addsub_simp',
- 'ID' : 'addsub_simp_01',
- 'descr' : 'all additions with result 5', #describe this setting
- 'MAX' : 50, # maximum of calcs generated;
+ 'title' : 'template exaddsimp',
+ 'descript': 'addition and subtraction without carry, \
+ i.e. without passing the 10 barrier. ',
+ 'icon' : None, # for quick reference of the exercise
+ 'calclines': 1, # no. of lines for calc to be input.
+ 'MAX' : 30, # maximum of calcs generated.
# Generate fills up by varying input.
'MIN' : 20, # minimum of calcs generated UNUSED
'min' : 0, # minimum in size of a number in a calc
- 'max' : 5, # maximum in size of a number in a calc
+ 'max' : 1, # maximum in size of a number in a calc
# 0 <= min <= max <= 10
'+' : True, # make all additions min..max
'-' : True, # make all subtactions min..max
'_+_=_' : True, # = is _right_ from operator, e.g. 1+2=3
'input=' : [1,3,5],# list of positions in calc: 1 | 3 | 5
- # where input is possible;
+ # where input is possible;
# actual positions chosen by Generate.
- '_=_+_' : False, # = is _left_ from operator, e.g. 3=1+2
+ '_=_+_' : False, # = is _left_ from operator, e.g. 3=1+2
'=input' : [1,3,5],# analogous to '_+_=_'
- 'shuffle': True, # shuffle _all_ the calcs
- 'cut-max': True # cut set of all calcs down to MAX
+ 'shuffle': True, # shuffle _all_ the calcs
+ 'cut-max': True # cut set of all calcs down to MAX
}
self._default_passten = \
{'topic' : 'passten',
- 'ID' : 'passten_01',
- 'descr' : 'subtractions passing 10',
+ 'title' : 'template expassten',
+ 'descript': 'addition and subtraction with carry, \
+ i.e. with passing the 10 barrier. ',
+ 'icon' : None, # for quick reference of the exercise
+ 'calclines' : 1, # or 2 iff 'newline' : True.
'MAX' : 150, # maximum of calcs generated;
# TODO: Generate fills up by varying input.
'MIN' : 10, # minimum of calcs generated 090416WN:UNUSED
@@ -66,8 +72,11 @@ class Settings:
self._default_times_div = \
{'topic' : 'times_div',
- 'ID' : 'times_div_01',
- 'descr' : 'n times 2',
+ 'title' : 'template extimesdiv',
+ 'descript': 'multiplication, division and "in" \
+ from 2 to 19 and 20 to 190. ',
+ 'icon' : None, # for quick reference of the exercise
+ 'calclines' : 1, # no. of lines for calc to be input.
'MAX' : 100, # maximum of calcs generated;
# TODO: Generate fills up by varying input.
'MIN' : 10, # minimum of calcs generated 090416WN:UNUSED
@@ -91,6 +100,10 @@ class Settings:
'default_times_div' : self._default_times_div
#!!!extend here with additional topic!!!
}
+
+ def get_setting(self, key):
+ print("in Settings.get_setting, key=" + key)
+ return (key, self._setts['default_' + key])
def load_last_sett(self, key):
_dict = None
@@ -144,8 +157,4 @@ class Settings:
# ####FIXME exit
# return (key, _setts)
########################## + toggle Coach.get_setting ###################
- #for testing passten: get setts from default_*
- def get_setting(self, key):
- print("in Settings.get_setting, key=" + key)
- return (key, self._setts['default_' + key])