~replaceafill/ubuntu/trusty/schooltool/2.8_custom-css

« back to all changes in this revision

Viewing changes to src/schooltool/schoolyear/schoolyear.py

  • Committer: Gediminas Paulauskas
  • Date: 2014-05-08 15:13:41 UTC
  • mfrom: (1.1.34)
  • Revision ID: menesis@pov.lt-20140508151341-wcsbt3m1lxbrc90x
Tags: 1:2.8.0-0ubuntu1
* New upstream release.
* debian/patches/ckeditor4.patch: remove, fixed upstream.
* debian/copyright: add a section for included d3 javascript library.
* debian/missing-sources: add sources for included javascript libraries:
  - d3 2.9.7
  - jquery 1.7.1
  - jquery-scrollto 1.4.2
  - jquery-ui 1.8.18

Show diffs side-by-side

added added

removed removed

Lines of Context:
141
141
        if self.getActiveSchoolYear() is None:
142
142
            return None
143
143
 
144
 
        this_schoolyear_index = self.sorted_schoolyears.index(self.getActiveSchoolYear())
 
144
        years = self.sorted_schoolyears
 
145
        this_schoolyear_index = years.index(self.getActiveSchoolYear())
145
146
        next_schoolyear_index = this_schoolyear_index + 1
146
 
        if next_schoolyear_index < len(self.sorted_schoolyears):
147
 
            return self.sorted_schoolyears[next_schoolyear_index]
 
147
        if next_schoolyear_index < len(years):
 
148
            return years[next_schoolyear_index]
148
149
 
149
150
        return None
150
151
 
288
289
    implements(ISubscriber)
289
290
 
290
291
    def __call__(self):
291
 
        overflowing_terms = []
292
292
        sy = self.event.schoolyear
293
293
        dr = DateRange(*self.event.new_dates)
294
294
        validateScholYearForOverflow(dr, sy)