schooltool.intervention-2.7.1/ 0000775 0001750 0001750 00000000000 12567055416 017576 5 ustar menesis menesis 0000000 0000000 schooltool.intervention-2.7.1/base.cfg 0000664 0001750 0001750 00000002766 12417742104 021173 0 ustar menesis menesis 0000000 0000000 [buildout]
extends = http://ftp.schooltool.org/schooltool/trunk/versions.cfg
versions = versions
newest = false
find-links =
http://ftp.schooltool.org/schooltool/trunk/
http://ftp.schooltool.org/schooltool/trunk/dev/
parts = package test supervisor celery scripts ctags omelette
[package]
recipe = zc.recipe.egg:eggs
unzip = true
# set eggs to package name in buildout.cfg
eggs =
[scripts]
recipe = zc.recipe.egg:scripts
unzip = true
eggs =
${package:eggs}
ZODB3
schooltool
schooltool.devtools
scripts = # ZODB3:
runzeo
zeopack
# schooltool.devtools:
i18nextract
runfdoctests
# schooltool:
make-schooltool-instance
start-schooltool-instance
schooltool-server
interpreter = python
[supervisor]
recipe = zc.recipe.egg:scripts
unzip = true
eggs = supervisor
scripts = supervisord
supervisorctl
pidproxy
# Useful script if you want to toy with supervisor settings
#echo_supervisord_conf
initialization =
import os
if os.path.exists('instance'): os.chdir('instance')
[celery]
recipe = zc.recipe.egg:scripts
unzip = true
eggs = ${package:eggs}
celery
redis
[test]
recipe = schooltool.devtools:testrunner
eggs = ${package:eggs}
defaults = ['--tests-pattern', '^f?tests$', '-v', '--auto-color']
[ctags]
recipe = z3c.recipe.tag:tags
eggs = ${test:eggs}
[omelette]
recipe = collective.recipe.omelette
eggs = ${test:eggs}
ignores = roman zope.ucol site
schooltool.intervention-2.7.1/buildout.cfg 0000644 0001750 0001750 00000000331 12567055415 022100 0 ustar menesis menesis 0000000 0000000 [buildout]
extends = base.cfg
develop = .
[versions]
# Unset versions of packages you want to develop
schooltool.intervention =
[package]
eggs = schooltool.intervention
[test]
eggs = schooltool.intervention [test]
schooltool.intervention-2.7.1/develop.cfg 0000664 0001750 0001750 00000000176 12142450750 021706 0 ustar menesis menesis 0000000 0000000 [buildout]
extends = deploy.cfg
parts += coverage
[coverage]
recipe = zc.recipe.egg:scripts
unzip = true
eggs = z3c.coverage
schooltool.intervention-2.7.1/src/ 0000775 0001750 0001750 00000000000 12567055416 020365 5 ustar menesis menesis 0000000 0000000 schooltool.intervention-2.7.1/src/schooltool/ 0000775 0001750 0001750 00000000000 12567055416 022552 5 ustar menesis menesis 0000000 0000000 schooltool.intervention-2.7.1/src/schooltool/__init__.py 0000664 0001750 0001750 00000000070 12142450750 024645 0 ustar menesis menesis 0000000 0000000 __import__('pkg_resources').declare_namespace(__name__)
schooltool.intervention-2.7.1/src/schooltool/intervention/ 0000775 0001750 0001750 00000000000 12567055416 025276 5 ustar menesis menesis 0000000 0000000 schooltool.intervention-2.7.1/src/schooltool/intervention/stesting.py 0000644 0001750 0001750 00000002230 12300710717 027466 0 ustar menesis menesis 0000000 0000000 #
# SchoolTool - common information systems platform for school administration
# Copyright (c) 2014 Shuttleworth Foundation
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
#
"""
Selenium functional tests setup for schooltool.intervention
"""
import os
from schooltool.testing.selenium import SeleniumLayer
dir = os.path.abspath(os.path.dirname(__file__))
filename = os.path.join(dir, 'stesting.zcml')
intervention_selenium_layer = SeleniumLayer(filename,
__name__,
'intervention_selenium_layer')
schooltool.intervention-2.7.1/src/schooltool/intervention/gradebook.py 0000664 0001750 0001750 00000001717 12206421525 027577 0 ustar menesis menesis 0000000 0000000 #
# SchoolTool - common information systems platform for school administration
# Copyright (c) 2005 Shuttleworth Foundation
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
#
from schooltool.gradebook.interfaces import IActivities
# adapt section to IIndependentActivities interface, returning IActivities
def getSectionIndependentActivities(section):
return IActivities(section)
schooltool.intervention-2.7.1/src/schooltool/intervention/adapters.py 0000664 0001750 0001750 00000016504 12206421525 027445 0 ustar menesis menesis 0000000 0000000 #
# SchoolTool - common information systems platform for school administration
# Copyright (c) 2005 Shuttleworth Foundation
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
#
from zope.container.contained import NameChooser
from zope.container.interfaces import INameChooser
from zope.component import queryUtility, getMultiAdapter
from zope.component import adapter, adapts
from zope.interface import implementer, implements
from zope.lifecycleevent.interfaces import IObjectRemovedEvent
from zope.security.proxy import removeSecurityProxy
from zope.traversing.api import getParent
from schooltool.app.app import InitBase, StartUpBase
from schooltool.app.interfaces import ISchoolToolApplication
from schooltool.person.interfaces import IPerson
from schooltool.schoolyear.interfaces import ISchoolYear, ISchoolYearContainer
from schooltool.schoolyear.subscriber import ObjectEventAdapterSubscriber
from schooltool.term.interfaces import IDateManager
import interfaces, intervention
def setUpInterventions(app):
app[u'schooltool.interventions'] = intervention.InterventionRoot()
class InterventionStartup(StartUpBase):
def __call__(self):
if u'schooltool.interventions' not in self.app:
setUpInterventions(self.app)
class InterventionInit(InitBase):
"""Create the InterventionRoot object."""
def __call__(self):
setUpInterventions(self.app)
@adapter(ISchoolToolApplication)
@implementer(interfaces.IInterventionRoot)
def getInterventionRoot(app):
return app[u'schooltool.interventions']
@adapter(ISchoolYear)
@implementer(interfaces.IInterventionSchoolYear)
def getSchoolYearInterventionSchoolYear(schoolyear):
app = ISchoolToolApplication(None)
interventionRoot = interfaces.IInterventionRoot(app)
try:
interventionSchoolYear = interventionRoot[schoolyear.__name__]
except KeyError:
interventionSchoolYear = intervention.InterventionSchoolYear()
interventionRoot[schoolyear.__name__] = interventionSchoolYear
return interventionSchoolYear
@adapter(ISchoolToolApplication)
@implementer(interfaces.IInterventionSchoolYear)
def getSchoolToolApplicationInterventionSchoolYear(app):
term = queryUtility(IDateManager).current_term
schoolyear = ISchoolYear(term)
return interfaces.IInterventionSchoolYear(schoolyear)
@adapter(interfaces.IInterventionSchoolYear)
@implementer(ISchoolYear)
def getInterventionSchoolYearSchoolYear(schoolyear):
app = ISchoolToolApplication(None)
return ISchoolYearContainer(app)[schoolyear.__name__]
@adapter(interfaces.IInterventionMarker)
@implementer(interfaces.IInterventionStudent)
def getMarkerInterventionStudent(marker):
return interfaces.IInterventionStudent(marker.__parent__.__parent__)
@adapter(IPerson, ISchoolYear)
@implementer(interfaces.IInterventionStudent)
def getStudentYearInterventionStudent(student, schoolyear):
interventionSchoolYear = interfaces.IInterventionSchoolYear(schoolyear)
try:
interventionStudent = interventionSchoolYear[student.__name__]
except KeyError:
interventionStudent = intervention.InterventionStudent()
interventionSchoolYear[student.__name__] = interventionStudent
interventionStudent[u'messages'] = intervention.InterventionMessages()
interventionStudent[u'goals'] = intervention.InterventionGoals()
return interventionStudent
@adapter(IPerson)
@implementer(interfaces.IInterventionStudent)
def getStudentInterventionStudent(student):
app = ISchoolToolApplication(None)
interventionSchoolYear = interfaces.IInterventionSchoolYear(app)
schoolyear = ISchoolYear(interventionSchoolYear)
interventionStudent = getMultiAdapter((student, schoolyear),
interfaces.IInterventionStudent)
return interventionStudent
@adapter(interfaces.IStudentSchoolYearProxy)
@implementer(interfaces.IInterventionStudent)
def getSchoolYearProxyInterventionStudent(proxy):
student = proxy.__parent__.__parent__
app = ISchoolToolApplication(None)
schoolyear = ISchoolYearContainer(app)[proxy.__name__]
interventionStudent = getMultiAdapter((student, schoolyear),
interfaces.IInterventionStudent)
return interventionStudent
@adapter(interfaces.IInterventionStudent)
@implementer(IPerson)
def getInterventionStudentStudent(interventionStudent):
persons = ISchoolToolApplication(None)['persons']
return persons[interventionStudent.__name__]
@adapter(interfaces.IInterventionMessages)
@implementer(IPerson)
def getInterventionMessagesStudent(interventionMessages):
return IPerson(interventionMessages.__parent__)
@adapter(interfaces.IInterventionMessage)
@implementer(IPerson)
def getInterventionMessageStudent(interventionMessage):
return IPerson(interventionMessage.__parent__)
@adapter(interfaces.IInterventionGoals)
@implementer(IPerson)
def getInterventionGoalsStudent(interventionGoals):
return IPerson(interventionGoals.__parent__)
@adapter(interfaces.IInterventionGoal)
@implementer(IPerson)
def getInterventionGoalStudent(interventionGoal):
return IPerson(interventionGoal.__parent__)
@adapter(interfaces.ISectionMessagesProxy)
@implementer(IPerson)
def getSectionMessagesProxyStudent(proxy):
return removeSecurityProxy(proxy).student
@adapter(interfaces.IStudentMessagesGoalsProxy)
@implementer(IPerson)
def getSectionMessagesGoalsProxyStudent(proxy):
return removeSecurityProxy(proxy.__parent__.__parent__).student
def getInterventionSchoolYearFromObj(obj):
while not interfaces.IInterventionSchoolYear.providedBy(obj):
if interfaces.IStudentSchoolYearProxy.providedBy(obj):
return obj.year
obj = getParent(obj)
return obj
class SequenceNumberNameChooser(NameChooser):
"""A name chooser that returns a sequence number."""
implements(INameChooser)
def chooseName(self, name, obj):
"""See INameChooser."""
numbers = [int(v.__name__) for v in self.context.values()
if v.__name__.isdigit()]
if numbers:
n = str(max(numbers) + 1)
else:
n = '1'
self.checkName(n, obj)
return n
class PersonRemovedSubsciber(ObjectEventAdapterSubscriber):
adapts(IObjectRemovedEvent, IPerson)
def __call__(self):
app = ISchoolToolApplication(None)
interventionRoot = app[u'schooltool.interventions']
for schoolYear in interventionRoot.values():
if self.object.username in schoolYear:
del schoolYear[self.object.username]
class SchoolYearRemovedSubsciber(ObjectEventAdapterSubscriber):
adapts(IObjectRemovedEvent, ISchoolYear)
def __call__(self):
app = ISchoolToolApplication(None)
interventionRoot = app[u'schooltool.interventions']
if self.object.__name__ in interventionRoot:
del interventionRoot[self.object.__name__]
schooltool.intervention-2.7.1/src/schooltool/intervention/__init__.py 0000664 0001750 0001750 00000001114 12220032033 027354 0 ustar menesis menesis 0000000 0000000 # Make a package.
def registerTestSetup():
from schooltool.testing import registry
def addInterventionRoot(app):
from schooltool.intervention import intervention
app['schooltool.interventions'] = intervention.InterventionRoot()
registry.register('ApplicationContainers', addInterventionRoot)
registerTestSetup()
del registerTestSetup
from zope.i18nmessageid import MessageFactory
InterventionGettext = MessageFactory("schooltool.intervention")
import schooltool.common
schooltool.common.register_lauchpad_project(__package__, 'schooltool.intervention')
schooltool.intervention-2.7.1/src/schooltool/intervention/intervention.zcml 0000664 0001750 0001750 00000005434 12247405250 030705 0 ustar menesis menesis 0000000 0000000
schooltool.intervention-2.7.1/src/schooltool/intervention/plugin.zcml 0000664 0001750 0001750 00000000265 12142450750 027453 0 ustar menesis menesis 0000000 0000000
schooltool.intervention-2.7.1/src/schooltool/intervention/stesting.zcml 0000644 0001750 0001750 00000000607 12300710717 030011 0 ustar menesis menesis 0000000 0000000
schooltool.intervention-2.7.1/src/schooltool/intervention/intervention-configure.zcml 0000664 0001750 0001750 00000000056 12142450750 032656 0 ustar menesis menesis 0000000 0000000
schooltool.intervention-2.7.1/src/schooltool/intervention/security.zcml 0000664 0001750 0001750 00000005250 12273156200 030021 0 ustar menesis menesis 0000000 0000000
schooltool.intervention-2.7.1/src/schooltool/intervention/configure.zcml 0000664 0001750 0001750 00000001464 12142450750 030140 0 ustar menesis menesis 0000000 0000000
schooltool.intervention-2.7.1/src/schooltool/intervention/catalog.zcml 0000664 0001750 0001750 00000003252 12142450750 027566 0 ustar menesis menesis 0000000 0000000
schooltool.intervention-2.7.1/src/schooltool/intervention/locales/ 0000775 0001750 0001750 00000000000 12567055416 026720 5 ustar menesis menesis 0000000 0000000 schooltool.intervention-2.7.1/src/schooltool/intervention/locales/es_SV/ 0000775 0001750 0001750 00000000000 12567055416 027737 5 ustar menesis menesis 0000000 0000000 schooltool.intervention-2.7.1/src/schooltool/intervention/locales/es_SV/LC_MESSAGES/ 0000775 0001750 0001750 00000000000 12567055416 031524 5 ustar menesis menesis 0000000 0000000 ././@LongLink 0000000 0000000 0000000 00000000157 00000000000 011220 L ustar 0000000 0000000 schooltool.intervention-2.7.1/src/schooltool/intervention/locales/es_SV/LC_MESSAGES/schooltool.intervention.mo schooltool.intervention-2.7.1/src/schooltool/intervention/locales/es_SV/LC_MESSAGES/schooltool.inter0000664 0001750 0001750 00000025503 12567055415 034760 0 ustar menesis menesis 0000000 0000000 9 ( b f o { - 4 5
H
. b
?
!
# : I O b ~
! E . 8 g t % # ! > &