Changeset 366d22 in indico


Ignore:
Timestamp:
06/10/10 18:11:33 (3 years ago)
Author:
Jeremy Herr <jeremy.herr@…>
Branches:
master, burotel, hello-world-walkthrough, ipv6, new-webex, v0.97-series, v0.98-series, v0.98.2, v0.98.3, v0.98b1, v0.98b2, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, 0da0c1403bae8e51d8229f460181c71b9e6dda72
Children:
b3195a
Parents:
b31f6a
git-author:
Jeremy Herr <jeremy.herr@…> (03/25/10 15:48:07)
git-committer:
Jeremy Herr <jeremy.herr@…> (06/10/10 18:11:33)
Message:

[IMP] Added method generateVideoXML() and related

Generate XML tags for use by XSL files to show standard or wide format video, and made various other changes to make this work.

Location:
indico/MaKaC
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • indico/MaKaC/common/output.py

    r79c280 r366d22  
    201201        return roomName 
    202202 
    203  
    204     def _confToXML(self, conf, vars, includeSession=1, includeContribution=1, includeMaterial=1, showSession="all", showDate="all",showContribution="all", showWithdrawed=True, useSchedule=True, out=None, source=None): 
     203    def _confToXML(self, conf, vars, includeSession=1, includeContribution=1, includeMaterial=1, showSession="all", showDate="all",showContribution="all", showWithdrawed=True, useSchedule=True, out=None, source=None, videoFormat=None): 
    205204        if not out: 
    206205            out = self._XMLGen 
     
    236235                from MaKaC.plugins.Collaboration.RecordingManager.output import MarcAccessListGenerator 
    237236                MarcAccessListGenerator().generateAccessListXML(out, conf) 
     237                MarcAccessListGenerator().generateVideoXML(out, conf, videoFormat) 
    238238 
    239239        if conf.canModify( self.__aw ) and vars and modificons: 
     
    865865 
    866866 
    867     def confToXML(self,conf,includeSession,includeContribution,includeMaterial,showSession="all", showContribution="all", out=None, forceCache=False, source=None): 
     867    def confToXML(self,conf,includeSession,includeContribution,includeMaterial,showSession="all", showContribution="all", out=None, forceCache=False, source=None, videoFormat=None): 
    868868        if not out: 
    869869            out = self._XMLGen 
     
    877877        else: 
    878878            temp = XMLGen(init=False) 
    879             self._confToXML(conf,None,includeSession,includeContribution,includeMaterial,showSession=showSession, showDate="all", showContribution=showContribution, showWithdrawed=False, useSchedule=False, out=temp, source=source) 
     879            self._confToXML(conf,None,includeSession,includeContribution,includeMaterial,showSession=showSession, showDate="all", showContribution=showContribution, showWithdrawed=False, useSchedule=False, out=temp, source=source, videoFormat=videoFormat) 
    880880            xml = temp.getXml() 
    881881            self.cache.cacheObject(version, xml, conf) 
  • indico/MaKaC/plugins/Collaboration/RecordingManager/common.py

    r79c280 r366d22  
    374374    connection.close() 
    375375 
    376 def createCDSRecord(IndicoID, aw): 
     376def createCDSRecord(IndicoID, aw, videoFormat): 
    377377    '''Retrieve a MARC XML string for the given conference, then package it up and send it to CDS.''' 
    378378 
     
    397397        Logger.get('RecMan').info("generating MARC XML for a conference") 
    398398#        og.confToXMLMarc21(conf, 1, 1, 1, forceCache=True, out=xmlGen, source='RecordingManager') 
    399         og.confToXML(conf, 0, 0, 1, source='RecordingManager') 
     399        og.confToXML(conf, 0, 0, 1, source='RecordingManager', videoFormat=videoFormat) 
    400400#        conf,includeSession,includeContribution,includeMaterial,showSession="all", showContribution="all", out=None, forceCache=False 
    401401    elif parsed["type"] == 'session': 
     
    407407        Logger.get('RecMan').info("generating MARC XML for a contribution") 
    408408        cont = conf.getContributionById(parsed["contribution"]) 
    409         og.contribToXMLMarc21(cont, includeMaterial=1, forceCache=True, out=xmlGen, source='RecordingManager') 
     409        og.contribToXMLMarc21(cont, includeMaterial=1, forceCache=True, out=xmlGen, source='RecordingManager', videoFormat=videoFormat) 
    410410#                              cont,includeMaterial=1, out=None, forceCache=False, source=None 
    411411    elif parsed["type"] == 'subcontribution': 
  • indico/MaKaC/plugins/Collaboration/RecordingManager/options.py

    r66fbc0 r366d22  
    9595               "visible": True} ), 
    9696 
     97    ("videoFormatStandard", {"description" : _("Standard video format"), 
     98               "type": str, 
     99               "defaultValue": "720x576 4/3, 25", 
     100               "editable": True, 
     101               "visible": True} ), 
     102 
     103    ("videoFormatWide", {"description" : _("Wide-screen video format"), 
     104               "type": str, 
     105               "defaultValue": "720x576 16/9, 25", 
     106               "editable": True, 
     107               "visible": True} ), 
     108 
    97109    ("MarcField506Subfield2", {"description" : _("MARC datafield 506 subfield 2"), 
    98110               "type": str, 
  • indico/MaKaC/plugins/Collaboration/RecordingManager/output.py

    r79c280 r366d22  
    7878                    out.writeTag("email", email_id) 
    7979                out.closeTag("allowedAccessEmails") 
     80 
     81    def generateVideoXML(self, out, obj, videoFormat): 
     82        """Generate XML variables needed for video records.""" 
     83 
     84        videoTagStandard = CollaborationTools.getOptionValue("RecordingManager", "videoFormatStandard") 
     85        videoTagWide     = CollaborationTools.getOptionValue("RecordingManager", "videoFormatWide") 
     86 
     87        if videoFormat == 'standard': 
     88            out.writeTag("videoFormat", videoTagStandard) 
     89        elif videoFormat == 'wide': 
     90            out.writeTag("videoFormat", videoTagWide) 
  • indico/MaKaC/plugins/Collaboration/RecordingManager/services.py

    r2ae83d r366d22  
    4747    def _checkParams(self): 
    4848        CollaborationPluginServiceBase._checkParams(self) #puts the Conference in self._conf 
    49         self._IndicoID = self._params.get('IndicoID', None) 
    50         self._LOID     = self._params.get('LOID', None) 
    51         self._confId   = self._params.get('conference', None) 
     49        self._IndicoID    = self._params.get('IndicoID', None) 
     50        self._LOID        = self._params.get('LOID', None) 
     51        self._confId      = self._params.get('conference', None) 
     52        self._videoFormat = self._params.get('videoFormat', None) 
    5253 
    5354        if not self._IndicoID: 
     
    5758        if not self._confId: 
    5859            raise RecordingManagerException("No conference ID supplied") 
     60        if not self._videoFormat: 
     61            raise RecordingManagerException("No video format supplied") 
    5962 
    6063    def _getAnswer(self): 
     
    6366 
    6467        # Get the MARC XML and submit it to CDS 
    65         resultCreateCDSRecord = createCDSRecord(self._IndicoID, self._aw) 
     68        resultCreateCDSRecord = createCDSRecord(self._IndicoID, self._aw, self._videoFormat) 
    6669 
    6770#        raise RecordingManagerException("got this far") 
  • indico/MaKaC/plugins/Collaboration/RecordingManager/tpls/Extra.js

    r209930 r366d22  
    241241var RMselectedLOName   = ''; 
    242242var RMviewMode         = ''; 
     243var RMvideoFormat      = 'standard'; 
    243244 
    244245function RMbuttonModeSelect(mode) { 
     
    356357 
    357358function RMchooseVideoFormat(format_string) { 
    358     if (format_string == '4/3') { 
    359  
    360     } 
    361     else if (format_string == '16/9') { 
    362  
    363     } 
    364  
     359    RMvideoFormat = format_string; 
    365360} 
    366361 
     
    401396                conference: '<%= ConferenceId %>', 
    402397                IndicoID: RMselectedTalkId, 
    403                 LOID: RMselectedLOID 
     398                LOID: RMselectedLOID, 
     399                videoFormat: RMvideoFormat 
    404400            }, 
    405401        function(result, error){ 
  • indico/MaKaC/webinterface/stylesheets/cds_marcxml_video_contribution.xsl

    rb31f6a r366d22  
    5656<datafield tag="300" ind1=" " ind2=" "> 
    5757  <subfield code="a">Streaming video</subfield> 
    58   <subfield code="b">720x576 4/3, 25</subfield> 
     58  <subfield code="b"><xsl:value-of select="./contribution/videoFormat" /></subfield> 
    5959</datafield> 
    6060<datafield tag="340" ind1=" " ind2=" "> 
     
    146146  </xsl:if> 
    147147  <xsl:value-of select="./@first" disable-output-escaping="yes"/> 
    148 </xsl:template>  
     148</xsl:template> 
    149149 
    150150</xsl:stylesheet> 
  • indico/MaKaC/webinterface/stylesheets/cds_marcxml_video_presentation.xsl

    rb31f6a r366d22  
    5656<datafield tag="300" ind1=" " ind2=" "> 
    5757  <subfield code="a">Streaming video</subfield> 
    58   <subfield code="b">720x576 4/3, 25</subfield> 
     58  <subfield code="b"><xsl:value-of select="./videoFormat" /></subfield> 
    5959</datafield> 
    6060<datafield tag="340" ind1=" " ind2=" "> 
Note: See TracChangeset for help on using the changeset viewer.