# -*- coding: utf-8 # Copyright 2005 by Meelis Mets from Products.Archetypes.public import BaseSchema, Schema from Products.Archetypes.public import StringField, LinesField from Products.Archetypes.public import LinesWidget, TextAreaWidget, StringWidget, SelectionWidget, RichWidget from AccessControl import ClassSecurityInfo from Products.Archetypes.public import registerType from Products.Krihvel.BaseTask import BaseTask, BaseAnswer from Products.Krihvel.config import PROJECT_NAME schema = BaseSchema + BaseTask.schema + Schema(( )) class Math(BaseTask): """ Math module. """ meta_type = "Math" archetype_name = "Math" allowed_content_types = () global_allow = 0 security = ClassSecurityInfo() schema = schema actions = ( { 'id':'view', 'name':'View', 'action':'string:${object_url}/math_view', 'permissions': ('View',), }, ) def __init__(self, id): self.id = id self.exercises = [] def addExercise(self,REQUEST): """ add exercise """ pass def getExercises(self): """ gets and prints exercise array """ pass registerType(Math, PROJECT_NAME) class MathAnswer(BaseTask): """ MathAnswer module. """ meta_type = "MathAnswer" archetype_name = "MathAnswer" allowed_content_types = () global_allow = 0 security = ClassSecurityInfo() schema = schema actions = ( { 'id':'view', 'name':'View', 'action':'string:${object_url}/math_view', 'permissions': ('View',), }, ) def __init__(self, id): self.id = id self.answers = [] registerType(MathAnswer, PROJECT_NAME)