Esempio n. 1
0
    def contains_programme(self, programme):
        programmes = self.get_programmes() or rca_utils.get_programmes(year=self.year)

        if not programme in programmes:
            return False

        return self.check_programme_has_students(programme)
Esempio n. 2
0
 def get_school_programmes(self, school):
     programmes = [
         programme for programme in rca_utils.get_programmes(school, year=self.year)
         if self.check_programme_has_students(programme)
     ]
     programmes.sort()
     return programmes
Esempio n. 3
0
    def contains_school(self, school):
        if self.is_programme_page:
            return False

        if len(rca_utils.get_programmes(school, year=self.year)) == 0:
            return False

        return self.check_school_has_students(school)