from eduintelligent.evaluation.utility import hideMetadataSchema
from eduintelligent.evaluation.interfaces import IQuestionFillIn, IQuestion
from eduintelligent.evaluation.config import PROJECTNAME
from eduintelligent.evaluation import evaluationMessageFactory as _
from eduintelligent.evaluation.content.schemas import questionchoice_schema, base_question_schema
from eduintelligent.evaluation.content.question import Question

QuestionFillInSchema = schemata.ATContentTypeSchema.copy() + base_question_schema.copy()

QuestionFillInSchema['title'].widget = atapi.TextAreaWidget()
QuestionFillInSchema['title'].storage = atapi.AnnotationStorage()
QuestionFillInSchema['title'].widget.label = _(u"Question")
QuestionFillInSchema['title'].widget.description = _(u"")

finalizeATCTSchema(QuestionFillInSchema, folderish=False, moveDiscussion=False)
hideMetadataSchema(QuestionFillInSchema, excludeFromNav=True)

QuestionFillInSchema['description'].widget.visible = False

class QuestionFillIn(Question):
    """Describe a film.
    """
    implements(IQuestion, IQuestionFillIn)
    
    portal_type = "QuestionFillIn"
    _at_rename_after_creation = True
    schema = QuestionFillInSchema
    
    title = atapi.ATFieldProperty('title')
    
    def getTypeQuestion(self):
from eduintelligent.evaluation.utility import hideMetadataSchema
from eduintelligent.evaluation.interfaces import IQuestion, IQuestionChoice
from eduintelligent.evaluation.config import PROJECTNAME
from eduintelligent.evaluation import evaluationMessageFactory as _
from eduintelligent.evaluation.content.schemas import questionchoice_schema, base_question_schema
from eduintelligent.evaluation.content.question import Question

QuestionChoiceSchema = schemata.ATContentTypeSchema.copy() + questionchoice_schema.copy() + base_question_schema.copy()

QuestionChoiceSchema['title'].widget = atapi.TextAreaWidget()
QuestionChoiceSchema['title'].storage = atapi.AnnotationStorage()
QuestionChoiceSchema['title'].widget.label = _(u"Question")
QuestionChoiceSchema['title'].widget.description = _(u"")

finalizeATCTSchema(QuestionChoiceSchema, folderish=False, moveDiscussion=False)
hideMetadataSchema(QuestionChoiceSchema, excludeFromNav=True)

QuestionChoiceSchema['description'].widget.visible = False

class QuestionChoice(Question):
    """Describe a film.
    """
    implements(IQuestion, IQuestionChoice)
    
    portal_type = "QuestionChoice"
    _at_rename_after_creation = False
    schema = QuestionChoiceSchema
    
    title = atapi.ATFieldProperty('title')

    def post_validate(self, REQUEST=None, errors=None):
Beispiel #3
0
from Products.ATContentTypes.content import folder
from Products.ATContentTypes.content.schemata import finalizeATCTSchema

from eduintelligent.evaluation.utility import hideMetadataSchema
from eduintelligent.evaluation.interfaces import IExam, IEvaluation
from eduintelligent.evaluation.config import PROJECTNAME
#from eduintelligent.evaluation import evaluationMessageFactory as _
from eduintelligent.evaluation.content.evaluation import Evaluation
from eduintelligent.evaluation.content.schemas import quiz_schema, exam_schema, message_schema

ExamFolderSchema = folder.ATFolderSchema.copy() + quiz_schema.copy() + exam_schema.copy() + message_schema.copy()
ExamFolderSchema['title'].storage = atapi.AnnotationStorage()
ExamFolderSchema['description'].storage = atapi.AnnotationStorage()

finalizeATCTSchema(ExamFolderSchema, folderish=True, moveDiscussion=False)
hideMetadataSchema(ExamFolderSchema, excludeFromNav=True)

class Exam(Evaluation):
    """Contains multiple questions.
    """
    implements(IExam, IEvaluation)
    
    portal_type = "Exam"
    _at_rename_after_creation = True
    schema = ExamFolderSchema
    
    title = atapi.ATFieldProperty('title')
    description = atapi.ATFieldProperty('description')
    

Beispiel #4
0
### SCORM ###
#from eduintelligent.sco.scorm.scormapi import ScormAPI
#from eduintelligent.sco.scorm.track import TrackingStorage
#from eduintelligent.sco.scorm.tracking import timeStamp2ISO


QuizFolderSchema = folder.ATFolderSchema.copy() + \
                 quiz_schema.copy() + \
                 message_schema.copy()

QuizFolderSchema['title'].storage = atapi.AnnotationStorage()
QuizFolderSchema['description'].storage = atapi.AnnotationStorage()

finalizeATCTSchema(QuizFolderSchema, folderish=True, moveDiscussion=False)
hideMetadataSchema(QuizFolderSchema, excludeFromNav=True)


class Quiz(Evaluation):
    """Contains multiple questions.
    """
    implements(IQuiz, IEvaluation)
    
    portal_type = "Quiz"
    _at_rename_after_creation = True
    schema = QuizFolderSchema
    
    title = atapi.ATFieldProperty('title')
    description = atapi.ATFieldProperty('description')
    
    def getMaxOpportunityTest(self):
Beispiel #5
0
from Products.ATContentTypes.content.schemata import finalizeATCTSchema

from eduintelligent.evaluation.utility import hideMetadataSchema
from eduintelligent.evaluation.interfaces import IExam, IEvaluation
from eduintelligent.evaluation.config import PROJECTNAME
#from eduintelligent.evaluation import evaluationMessageFactory as _
from eduintelligent.evaluation.content.evaluation import Evaluation
from eduintelligent.evaluation.content.schemas import quiz_schema, exam_schema, message_schema

ExamFolderSchema = folder.ATFolderSchema.copy() + quiz_schema.copy(
) + exam_schema.copy() + message_schema.copy()
ExamFolderSchema['title'].storage = atapi.AnnotationStorage()
ExamFolderSchema['description'].storage = atapi.AnnotationStorage()

finalizeATCTSchema(ExamFolderSchema, folderish=True, moveDiscussion=False)
hideMetadataSchema(ExamFolderSchema, excludeFromNav=True)


class Exam(Evaluation):
    """Contains multiple questions.
    """
    implements(IExam, IEvaluation)

    portal_type = "Exam"
    _at_rename_after_creation = True
    schema = ExamFolderSchema

    title = atapi.ATFieldProperty('title')
    description = atapi.ATFieldProperty('description')

Beispiel #6
0
from eduintelligent.evaluation import evaluationMessageFactory as _
from eduintelligent.evaluation.content.schemas import questionchoice_schema
from eduintelligent.evaluation.content.schemas import base_question_schema
from eduintelligent.evaluation.content.question import Question

QuestionChoiceSchema = schemata.ATContentTypeSchema.copy() + \
                       questionchoice_schema.copy() + \
                       base_question_schema.copy()

QuestionChoiceSchema['title'].widget = atapi.TextAreaWidget()
QuestionChoiceSchema['title'].storage = atapi.AnnotationStorage()
QuestionChoiceSchema['title'].widget.label = _(u"Question")
QuestionChoiceSchema['title'].widget.description = _(u"")

finalizeATCTSchema(QuestionChoiceSchema, folderish=False, moveDiscussion=False)
hideMetadataSchema(QuestionChoiceSchema, excludeFromNav=True)

QuestionChoiceSchema['description'].widget.visible = False


class QuestionChoice(Question):
    """Describe a film.
    """
    implements(IQuestion, IQuestionChoice)

    portal_type = "QuestionChoice"
    _at_rename_after_creation = False
    schema = QuestionChoiceSchema

    title = atapi.ATFieldProperty('title')
from eduintelligent.evaluation.interfaces import IQuestionFillIn, IQuestion
from eduintelligent.evaluation.config import PROJECTNAME
from eduintelligent.evaluation import evaluationMessageFactory as _
from eduintelligent.evaluation.content.schemas import base_question_schema
from eduintelligent.evaluation.content.question import Question

QuestionFillInSchema = schemata.ATContentTypeSchema.copy() + \
                       base_question_schema.copy()

QuestionFillInSchema['title'].widget = atapi.TextAreaWidget()
QuestionFillInSchema['title'].storage = atapi.AnnotationStorage()
QuestionFillInSchema['title'].widget.label = _(u"Question")
QuestionFillInSchema['title'].widget.description = _(u"")

finalizeATCTSchema(QuestionFillInSchema, folderish=False, moveDiscussion=False)
hideMetadataSchema(QuestionFillInSchema, excludeFromNav=True)

QuestionFillInSchema['description'].widget.visible = False


class QuestionFillIn(Question):
    """Describe a film.
    """
    implements(IQuestion, IQuestionFillIn)

    portal_type = "QuestionFillIn"
    _at_rename_after_creation = True
    schema = QuestionFillInSchema

    title = atapi.ATFieldProperty('title')