Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/ReckonPrimer.activity/exstore.py
diff options
context:
space:
mode:
Diffstat (limited to 'ReckonPrimer.activity/exstore.py')
-rw-r--r--ReckonPrimer.activity/exstore.py21
1 files changed, 15 insertions, 6 deletions
diff --git a/ReckonPrimer.activity/exstore.py b/ReckonPrimer.activity/exstore.py
index 562ce65..412c9d3 100644
--- a/ReckonPrimer.activity/exstore.py
+++ b/ReckonPrimer.activity/exstore.py
@@ -7,7 +7,7 @@ import random
import copy
from sugar.graphics import style
-from settings import Settings
+from settings import Settings #WN.100112 remove with "treeView-Kollektion"
from coach import Coach
from collection import Collection
from task import Task
@@ -18,14 +18,22 @@ from exercises.exercise import Exercise
class ExStore:
-
+ """ Holds all exercises avaiable in RP in a tree and stores them on disk.
+ The tree ist presented looking like a filebrowser, see Display.treeview.
+ The Learner starts an Exercise by selecting an item of the tree.
+ The Author creates new Exercises copying certain Exercises by
+ drag-and-drop and then editing the title, the description and the settings.
+
+ """
+ _data = None #hold the tree with root of Collection and leafs of Task
def __init__(self, display, coach):
self._sett = Settings()
- #WN.LV diese Daten via pickle.load(...) holen ############
+ #Provisorium für die "3-Button-Version" vvvvvvvvvvvvvvvvvvvvvvvvv
self._data = [(self._sett.get_setting('addsub_simp'), []),
(self._sett.get_setting('passten'), []),
(self._sett.get_setting('times_div'), [])]
- #WN.LV [] ist die vorlaeufige Liste der errors ###########
+ #Provisorium für die "3-Button-Version" ^^^^^^^^^^^^^^^^^^^^^^^^^
+ #Provisorium für impl. "treeView-Kollektion" vvvvvvvvvvvvvvvvvvvv
_ex000 = Task({'topic' : 'times_div', #for programmers only
'title' : 'template extimesdiv',
'descript': 'multiplication, division and "in" \
@@ -76,9 +84,10 @@ class ExStore:
_coll0 = Collection("'*' und 'in' Reihen",
"hier sind alle 1x1-Reihen mit 'in'",
None, [_coll00])
- _coll0.set_data_in_pickle(_coll0)
+ _coll0.set_data_in_pickle(_coll0) #WN.100112 remove asap
+ #self._data = _coll0
+ #Provisorium für impl. "treeView-Kollektion" ^^^^^^^^^^^^^^^^^^^^
- #xxxxxxxxxxxxxxxxxxxxxxxx
self._display = display
self._coach = coach
self._active_exerc = None