예제 #1
0
"""

from zope.interface import implements
from Products.Archetypes import atapi

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
    
예제 #2
0
"""

from zope.interface import implements
from Products.Archetypes import atapi

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
예제 #3
0
from eduintelligent.evaluation.utility import hideMetadataSchema
from eduintelligent.evaluation.interfaces import IQuiz, 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
from eduintelligent.evaluation.content.schemas import message_schema

### 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"
예제 #4
0
from Products.CMFCore.utils import getToolByName

from eduintelligent.evaluation.utility import hideMetadataSchema
from eduintelligent.evaluation.interfaces import IQuiz, 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, message_schema

### 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