Exemple #1
0
    def inner_dispatch_subsession(self):

        if CompletedSubsessionWaitPage.objects_exists(
            page_index=self._index_in_pages, session=self.session
        ):
            return self._response_when_ready()

        is_displayed = self._is_displayed()
        is_last, someone_waiting = self._tally_unvisited()
        if is_displayed and not is_last:
            return self._get_wait_page()
        elif is_last and (someone_waiting or is_displayed):
            self._run_aapa_and_notify(self.subsession)
        return self._response_when_ready()
Exemple #2
0
 def completion_exists(self, **kwargs):
     return CompletedSubsessionWaitPage.objects_exists(**kwargs)