schooltool.intervention-2.6.2/ 0000755 0001750 0001750 00000000000 12321107064 017555 5 ustar menesis menesis 0000000 0000000 schooltool.intervention-2.6.2/base.cfg 0000644 0001750 0001750 00000003205 12270520447 021157 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
redis
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
scripts = # celery:
#celerybeat
celeryd
celeryev
celeryctl
#camqadm
#celeryd-multi
[test]
recipe = zc.recipe.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.6.2/buildout.cfg 0000644 0001750 0001750 00000000331 12321107063 022061 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.6.2/develop.cfg 0000644 0001750 0001750 00000000176 12270520447 021707 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.6.2/src/ 0000755 0001750 0001750 00000000000 12321107064 020344 5 ustar menesis menesis 0000000 0000000 schooltool.intervention-2.6.2/src/schooltool/ 0000755 0001750 0001750 00000000000 12321107064 022531 5 ustar menesis menesis 0000000 0000000 schooltool.intervention-2.6.2/src/schooltool/__init__.py 0000644 0001750 0001750 00000000070 12270520447 024646 0 ustar menesis menesis 0000000 0000000 __import__('pkg_resources').declare_namespace(__name__)
schooltool.intervention-2.6.2/src/schooltool/intervention/ 0000755 0001750 0001750 00000000000 12321107064 025255 5 ustar menesis menesis 0000000 0000000 schooltool.intervention-2.6.2/src/schooltool/intervention/gradebook.py 0000644 0001750 0001750 00000001717 12270520447 027601 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.6.2/src/schooltool/intervention/adapters.py 0000644 0001750 0001750 00000016504 12270520447 027447 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.6.2/src/schooltool/intervention/__init__.py 0000644 0001750 0001750 00000001114 12270520447 027372 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.6.2/src/schooltool/intervention/intervention.zcml 0000644 0001750 0001750 00000005434 12270520447 030705 0 ustar menesis menesis 0000000 0000000
schooltool.intervention-2.6.2/src/schooltool/intervention/plugin.zcml 0000644 0001750 0001750 00000000265 12270520447 027454 0 ustar menesis menesis 0000000 0000000
schooltool.intervention-2.6.2/src/schooltool/intervention/intervention-configure.zcml 0000644 0001750 0001750 00000000056 12270520447 032657 0 ustar menesis menesis 0000000 0000000
schooltool.intervention-2.6.2/src/schooltool/intervention/security.zcml 0000644 0001750 0001750 00000005250 12270520447 030024 0 ustar menesis menesis 0000000 0000000
schooltool.intervention-2.6.2/src/schooltool/intervention/configure.zcml 0000644 0001750 0001750 00000001464 12270520447 030141 0 ustar menesis menesis 0000000 0000000
schooltool.intervention-2.6.2/src/schooltool/intervention/catalog.zcml 0000644 0001750 0001750 00000003252 12270520447 027567 0 ustar menesis menesis 0000000 0000000
schooltool.intervention-2.6.2/src/schooltool/intervention/locales/ 0000755 0001750 0001750 00000000000 12321107064 026677 5 ustar menesis menesis 0000000 0000000 schooltool.intervention-2.6.2/src/schooltool/intervention/locales/es_SV/ 0000755 0001750 0001750 00000000000 12321107064 027716 5 ustar menesis menesis 0000000 0000000 schooltool.intervention-2.6.2/src/schooltool/intervention/locales/es_SV/LC_MESSAGES/ 0000755 0001750 0001750 00000000000 12321107064 031503 5 ustar menesis menesis 0000000 0000000 ././@LongLink 0000000 0000000 0000000 00000000157 00000000000 011220 L ustar 0000000 0000000 schooltool.intervention-2.6.2/src/schooltool/intervention/locales/es_SV/LC_MESSAGES/schooltool.intervention.mo schooltool.intervention-2.6.2/src/schooltool/intervention/locales/es_SV/LC_MESSAGES/schooltool.inter0000644 0001750 0001750 00000025503 12321107063 034737 0 ustar menesis menesis 0000000 0000000 9 ( b f o { - 4 5
H
. b
?
!
# : I O b ~
! E . 8 g t % # ! > &