Changeset 06fd42 in indico


Ignore:
Timestamp:
08/11/10 16:35:07 (3 years ago)
Author:
Jose Benito <jose.benito.gonzalez@…>
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, d9941f8582b36b24821a11ea5ba16fda6a457fb1
Children:
bd7556
Parents:
768aac
Message:

[IMP] Poster session: modify entries accordingly

When modifying the size of the poster session we should modify the size
of its entries as well.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • indico/MaKaC/services/implementation/schedule.py

    r0bfeae r06fd42  
    3131from MaKaC.common.Conversion import Conversion 
    3232from MaKaC.schedule import BreakTimeSchEntry 
     33from MaKaC.conference import SessionSlot 
    3334 
    3435import time, datetime, pytz, copy 
     
    566567            entriesList = self._schEntry.getSchedule().getEntries()[i:] 
    567568 
    568         self._schEntry.setStartDate(self._startDate, moveEntries=1, check=checkFlag); 
    569569        duration = self._endDate - self._startDate 
     570        owner = self._schEntry.getOwner() 
     571        if isinstance(owner, SessionSlot) and owner.getSession().getScheduleType() == "poster": 
     572            # If it is a poster session we must modify the size of all the contributions inside it. 
     573            for entry in owner.getSchedule().getEntries(): 
     574                entry.setDuration(dur=duration, check=0) 
     575        # The order to set the start date and duration is important, please keep it like this. 
     576        # Otherwise, by modifying the startDate we might find entries inside a slot that are 
     577        # temporarly outside and an exception will be raised. 
    570578        self._schEntry.setDuration(dur=duration,check=checkFlag) 
     579        self._schEntry.setStartDate(self._startDate, moveEntries=1, check=checkFlag) 
    571580 
    572581        # In case of 'reschedule', calculate the time difference 
Note: See TracChangeset for help on using the changeset viewer.