def afterFirstSurveyStart(self, surveys): """Returns True if we are past at least one survey has start date. Args: surveys: List of survey entities for which we need to determine if at least one of them have started """ first_survey_start = min([s.survey_start for s in surveys]) return request_data.isAfter(first_survey_start)
def adder(content_response, entity, *args): # get the last failed evaluation for the project so that an # entry for survey record need not be calculated after this # evaluation failed_eval = None if entity.failed_evaluations: failed_grading_record = entity.failed_evaluations[-1] fgr_ent = args[0].get(failed_grading_record) failed_eval = fgr_ent.grading_survey_group.grading_survey # since evals is an object of type Django's SortedDict # we can be sure that the evaluations are iterated in the order for eval_link_id, eval in evals.items(): if isAfter(eval.survey_start): content_response.addRow(entity, eval_link_id, *args) if failed_eval and \ failed_eval.key().id_or_name() == eval.key().id_or_name(): break
def tasksPubliclyVisible(self): return request_data.isAfter(self.tasksPubliclyVisibleOn())
def allReviewsStopped(self): return request_data.isAfter(self.stopAllReviewsOn())
def allWorkStopped(self): return request_data.isAfter(self.stopAllWorkOn())
def tasksClaimEnded(self): return request_data.isAfter(self.tasksClaimEndOn())
def studentsAnnounced(self): return request_data.isAfter(self.studentsAnnouncedOn())