""" Container for Videos """ __version__ = "$Revision$"[11:-2] import Globals from Globals import Acquisition, Persistent from Acquisition import aq_base, aq_inner, aq_parent, Explicit from AccessControl import ClassSecurityInfo from Products.BTreeFolder2.BTreeFolder2 import BTreeFolder2 from zope.interface import implements from common import commons from Permissions import * from interfaces import IVideos class Videos(BTreeFolder2, Persistent, Explicit, commons): """ videos """ meta_type = 'Videos' security = ClassSecurityInfo() security.declareObjectPublic() implements(IVideos) manage_options = BTreeFolder2.manage_options id = 'videos' def __init__(self): BTreeFolder2.__init__(self, self.id) security.declareProtected(perm_create_question, 'add_new_video') def add_new_video(self, title, video, REQUEST): """ """ id = self.random_generator('video_') self.manage_addFile(id=id, file=video, title=title, content_type='video/quicktime') return REQUEST.RESPONSE.redirect(self.get_root().absolute_url()+'/questions/edit?type=Choice_multiple&video='+str(id)) Globals.InitializeClass(Videos) #EOF