diff --git a/expert/README.txt b/expert/README.txt index 89e946e..d3fd786 100644 --- a/expert/README.txt +++ b/expert/README.txt @@ -27,7 +27,7 @@ configuration): >>> concepts, resources, views = t.setup() >>> len(concepts) + len(resources) - 37 + 36 >>> loopsRoot = site['loops'] @@ -47,11 +47,11 @@ Type- and text-based queries >>> from loops.expert import query >>> qu = query.Title('ty*') >>> list(qu.apply()) - [0, 2, 68] + [0, 2, 65] >>> qu = query.Type('loops:*') >>> len(list(qu.apply())) - 37 + 36 >>> qu = query.Type('loops:concept:predicate') >>> len(list(qu.apply())) diff --git a/expert/search.txt b/expert/search.txt index d752ac1..18df101 100755 --- a/expert/search.txt +++ b/expert/search.txt @@ -66,13 +66,13 @@ zcml in real life: >>> t = searchView.typesForSearch() >>> len(t) - 16 + 15 >>> t.getTermByToken('loops:resource:*').title 'Any Resource' >>> t = searchView.conceptTypesForSearch() >>> len(t) - 13 + 12 >>> t.getTermByToken('loops:concept:*').title 'Any Concept' @@ -91,7 +91,7 @@ a controller attribute for the search view. >>> searchView.submitReplacing('1.results', '1.search.form', pageView) 'submitReplacing("1.results", "1.search.form", - "http://127.0.0.1/loops/views/page/.target99/@@searchresults.html");...' + "http://127.0.0.1/loops/views/page/.target96/@@searchresults.html");...' Basic (text/title) search ------------------------- @@ -177,7 +177,7 @@ of the concepts' titles: >>> request = TestRequest(form=form) >>> view = Search(page, request) >>> view.listConcepts() - u"{identifier: 'id', items: [{label: 'Zope (Thema)', name: 'Zope', id: '104'}, {label: 'Zope 2 (Thema)', name: 'Zope 2', id: '106'}, {label: 'Zope 3 (Thema)', name: 'Zope 3', id: '108'}]}" + u"{identifier: 'id', items: [{label: 'Zope (Thema)', name: 'Zope', id: '101'}, {label: 'Zope 2 (Thema)', name: 'Zope 2', id: '103'}, {label: 'Zope 3 (Thema)', name: 'Zope 3', id: '105'}]}" Preset Concept Types on Search Forms ------------------------------------ @@ -219,13 +219,13 @@ and thus include the customer type in the preset search types. >>> searchView.conceptsForType('loops:concept:customer') [{'token': 'none', 'title': u'not selected'}, - {'token': '77', 'title': u'Customer 1'}, - {'token': '79', 'title': u'Customer 2'}, - {'token': '81', 'title': u'Customer 3'}] + {'token': '74', 'title': u'Customer 1'}, + {'token': '76', 'title': u'Customer 2'}, + {'token': '78', 'title': u'Customer 3'}] Let's use this new search option for querying: - >>> form = {'search.4.text_selected': u'77'} + >>> form = {'search.4.text_selected': u'74'} >>> resultsView = SearchResults(page, TestRequest(form=form)) >>> results = list(resultsView.results) >>> results[0].title diff --git a/external/README.txt b/external/README.txt index f88f3aa..24e3816 100644 --- a/external/README.txt +++ b/external/README.txt @@ -17,7 +17,7 @@ Let's set up a loops site with basic and example concepts and resources. >>> concepts, resources, views = t.setup() >>> loopsRoot = site['loops'] >>> len(concepts), len(resources), len(views) - (34, 3, 1) + (33, 3, 1) Importing loops Objects @@ -44,7 +44,7 @@ Creating the corresponding objects >>> loader = Loader(loopsRoot) >>> loader.load(elements) >>> len(concepts), len(resources), len(views) - (35, 3, 1) + (34, 3, 1) >>> from loops.common import adapted >>> adMyquery = adapted(concepts['myquery']) @@ -118,7 +118,7 @@ Extracting elements >>> extractor = Extractor(loopsRoot, os.path.join(dataDirectory, 'export')) >>> elements = list(extractor.extract()) >>> len(elements) - 67 + 65 Writing object information to the external storage -------------------------------------------------- diff --git a/knowledge/data/knowledge_de.dmp b/knowledge/data/knowledge_de.dmp index 5b873e9..d1a0e36 100644 --- a/knowledge/data/knowledge_de.dmp +++ b/knowledge/data/knowledge_de.dmp @@ -1,5 +1,6 @@ type(u'competence', u'Kompetenz', viewName=u'', - typeInterface=u'', options=u'action.portlet:create_subtype,edit_concept') + typeInterface=u'loops.knowledge.qualification.interfaces.ICompetence', + options=u'action.portlet:create_subtype,edit_concept') type(u'person', u'Person', viewName=u'', typeInterface=u'loops.knowledge.interfaces.IPerson', options=u'action.portlet:createQualification,editPerson') @@ -38,6 +39,7 @@ child(u'general', u'topic', u'standard') child(u'system', u'issubtype', u'standard') +child(u'competence', u'competence', u'issubtype') #child(u'competence', u'training', u'issubtype', usePredicate=u'provides') # records diff --git a/knowledge/data/knowledge_update_de.dmp b/knowledge/data/knowledge_update_de.dmp index 4f427d1..403589f 100644 --- a/knowledge/data/knowledge_update_de.dmp +++ b/knowledge/data/knowledge_update_de.dmp @@ -1,5 +1,6 @@ type(u'competence', u'Kompetenz', viewName=u'', - typeInterface=u'', options=u'action.portlet:create_subtype,edit_concept') + typeInterface=u'loops.knowledge.qualification.interfaces.ICompetence', + options=u'action.portlet:create_subtype,edit_concept') # type(u'person', u'Person', viewName=u'', # typeInterface=u'loops.knowledge.interfaces.IPerson', # options=u'action.portlet:editPerson') @@ -38,6 +39,7 @@ child(u'general', u'requires', u'standard') child(u'system', u'issubtype', u'standard') +child(u'competence', u'competence', u'issubtype') #child(u'competence', u'training', u'issubtype', usePredicate=u'provides') # records diff --git a/knowledge/qualification/base.py b/knowledge/qualification/base.py index ab96a5d..0bdb8f5 100644 --- a/knowledge/qualification/base.py +++ b/knowledge/qualification/base.py @@ -25,4 +25,14 @@ Central part of CCM competence and certification management framework. from zope.component import adapts from zope.interface import implementer, implements +from loops.common import AdapterBase +from loops.knowledge.qualification.interfaces import ICompetence + + +class Competence(AdapterBase): + + implements(ICompetence) + + _contextAttributes = list(ICompetence) + diff --git a/knowledge/qualification/configure.zcml b/knowledge/qualification/configure.zcml index fb02f5f..d8cbc74 100644 --- a/knowledge/qualification/configure.zcml +++ b/knowledge/qualification/configure.zcml @@ -1,7 +1,10 @@ + xmlns:zope="http://namespaces.zope.org/zope" + xmlns:browser="http://namespaces.zope.org/browser" + i18n_domain="loops"> + + diff --git a/knowledge/qualification/interfaces.py b/knowledge/qualification/interfaces.py index d244cdb..85a002a 100644 --- a/knowledge/qualification/interfaces.py +++ b/knowledge/qualification/interfaces.py @@ -23,3 +23,22 @@ Interfaces for knowledge management and elearning with loops. from zope.interface import Interface, Attribute from zope import interface, component, schema +from loops.interfaces import IConceptSchema +from loops.util import _ + + +class ICompetence(IConceptSchema): + """ The competence of a person. + + Maybe assigned to the person via a 'knows' relation or + work items of type 'checkup'. + """ + + validityPeriod = schema.Int( + title=_(u'Validity Period (Months)'), + description=_(u'Number of months the competence remains valid. ' + u'Zero means unlimited validity.'), + default=0, + required=False) + + diff --git a/knowledge/tests.py b/knowledge/tests.py index c893edd..8340a79 100755 --- a/knowledge/tests.py +++ b/knowledge/tests.py @@ -7,6 +7,7 @@ from zope import component from zope.interface.verify import verifyClass from zope.testing.doctestunit import DocFileSuite +from loops.knowledge.qualification.base import Competence from loops.knowledge.survey.base import Questionnaire, Question, FeedbackItem from loops.knowledge.survey.interfaces import IQuestionnaire, IQuestion, \ IFeedbackItem @@ -21,6 +22,7 @@ def importData(loopsRoot): baseImportData(loopsRoot, importPath, 'knowledge_de.dmp') def importSurvey(loopsRoot): + component.provideAdapter(Competence) component.provideAdapter(Questionnaire, provides=IQuestionnaire) component.provideAdapter(Question, provides=IQuestion) component.provideAdapter(FeedbackItem, provides=IFeedbackItem) diff --git a/locales/de/LC_MESSAGES/loops.mo b/locales/de/LC_MESSAGES/loops.mo index d52538f..79c436f 100644 Binary files a/locales/de/LC_MESSAGES/loops.mo and b/locales/de/LC_MESSAGES/loops.mo differ diff --git a/locales/de/LC_MESSAGES/loops.po b/locales/de/LC_MESSAGES/loops.po index ff5492f..4a6cfed 100644 --- a/locales/de/LC_MESSAGES/loops.po +++ b/locales/de/LC_MESSAGES/loops.po @@ -3,7 +3,7 @@ msgstr "" "Project-Id-Version: 0.13.0\n" "POT-Creation-Date: 2007-05-22 12:00 CET\n" -"PO-Revision-Date: 2013-01-16 12:00 CET\n" +"PO-Revision-Date: 2013-02-26 12:00 CET\n" "Last-Translator: Helmut Merz \n" "Language-Team: loops developers \n" "MIME-Version: 1.0\n" @@ -170,6 +170,30 @@ msgstr "Glossareintrag anlegen..." msgid "Create Glossary Item" msgstr "Glossareintrag anlegen." +# survey / questionnaire + +msgid "Answer Range" +msgstr "Abstufung Bewertungen" + +msgid "Number of items (answer options) to select from." +msgstr "Anzahl der Abstufungen, aus denen bei der Antwort gewählt werden kann." + +msgid "Negativ" +msgstr "Negativbewertung" + +msgid "Value inversion: High selection means low value." +msgstr "Invertierung der Bewertung: Hohe gewählte Stufe bedeutet niedriger Wert." + +# competence (qualification) + +msgid "Validity Period (Months)" +msgstr "Gültigkeitszeitraum (Monate)" + +msgid "Number of months the competence remains valid. Zero means unlimited validity." +msgstr "Anzahl der Monate, die diese Kompetenz gültig bleibt. Null bedeutet unbegrenzte Gültigkeit" + +# organize + msgid "Create Person..." msgstr "Person anlegen..." @@ -212,6 +236,8 @@ msgstr "Adresse bearbeiten..." msgid "Modify address." msgstr "Adresse bearbeiten." +# general + msgid "Create Concept, Type = " msgstr "Begriff anlegen, Typ = " @@ -230,6 +256,8 @@ msgstr "Diese Ressource bearbeiten." msgid "Edit Concept" msgstr "Begriff bearbeiten" +# events and tasks + msgid "Create Event..." msgstr "Termin anlegen..." diff --git a/organize/README.txt b/organize/README.txt index 92c46e0..e013d9f 100644 --- a/organize/README.txt +++ b/organize/README.txt @@ -410,7 +410,7 @@ Send Email to Members >>> form.subject u"loops Notification from '$site'" >>> form.mailBody - u'\n\nEvent #1\nhttp://127.0.0.1/loops/views/menu/.116\n\n' + u'\n\nEvent #1\nhttp://127.0.0.1/loops/views/menu/.113\n\n' Show Presence of Other Users diff --git a/system/sync/README.txt b/system/sync/README.txt index c18c601..5ed477f 100644 --- a/system/sync/README.txt +++ b/system/sync/README.txt @@ -18,7 +18,7 @@ Let's set up a loops site with basic and example concepts and resources. >>> concepts, resources, views = t.setup() >>> loopsRoot = site['loops'] >>> len(concepts), len(resources), len(views) - (34, 3, 1) + (33, 3, 1) >>> from cybertools.tracking.btree import TrackingStorage >>> from loops.system.job import JobRecord diff --git a/xmlrpc/README.txt b/xmlrpc/README.txt index 9b2e033..3ea6557 100755 --- a/xmlrpc/README.txt +++ b/xmlrpc/README.txt @@ -35,7 +35,7 @@ ZCML setup): Let's look what setup has provided us with: >>> len(concepts) - 23 + 22 Now let's add a few more concepts: @@ -73,7 +73,7 @@ applied in an explicit assignment. >>> sorted(t['name'] for t in xrf.getConceptTypes()) [u'competence', u'customer', u'domain', u'file', u'note', u'person', - u'predicate', u'task', u'textdocument', u'topic', u'training', u'type'] + u'predicate', u'task', u'textdocument', u'topic', u'type'] >>> sorted(t['name'] for t in xrf.getPredicates()) [u'depends', u'issubtype', u'knows', u'ownedby', u'provides', u'requires', u'standard'] @@ -96,7 +96,7 @@ All methods that retrieve one object also returns its children and parents: u'hasType' >>> sorted(c['name'] for c in ch[0]['objects']) [u'competence', u'customer', u'domain', u'file', u'note', u'person', - u'predicate', u'task', u'textdocument', u'topic', u'training', u'type'] + u'predicate', u'task', u'textdocument', u'topic', u'type'] >>> pa = defaultPred['parents'] >>> len(pa) @@ -115,7 +115,7 @@ We can also retrieve children and parents explicitely: u'hasType' >>> sorted(c['name'] for c in ch[0]['objects']) [u'competence', u'customer', u'domain', u'file', u'note', u'person', - u'predicate', u'task', u'textdocument', u'topic', u'training', u'type'] + u'predicate', u'task', u'textdocument', u'topic', u'type'] >>> pa = xrf.getParents('5') >>> len(pa) @@ -174,14 +174,14 @@ Updating the concept map >>> topicId = xrf.getObjectByName('topic')['id'] >>> xrf.createConcept(topicId, u'zope2', u'Zope 2') - {'description': u'', 'title': u'Zope 2', 'type': '36', 'id': '75', + {'description': u'', 'title': u'Zope 2', 'type': '36', 'id': '72', 'name': u'zope2'} The name of the concept is checked by a name chooser; if the corresponding parameter is empty, the name will be generated from the title. >>> xrf.createConcept(topicId, u'', u'Python') - {'description': u'', 'title': u'Python', 'type': '36', 'id': '77', + {'description': u'', 'title': u'Python', 'type': '36', 'id': '74', 'name': u'python'} If we try to deassign a ``hasType`` relation nothing will happen; a