Пример #1
0
  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)
Пример #2
0
  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
Пример #3
0
 def tasksPubliclyVisible(self):
   return request_data.isAfter(self.tasksPubliclyVisibleOn())
Пример #4
0
 def allReviewsStopped(self):
   return request_data.isAfter(self.stopAllReviewsOn())
Пример #5
0
 def allWorkStopped(self):
   return request_data.isAfter(self.stopAllWorkOn())
Пример #6
0
 def tasksClaimEnded(self):
   return request_data.isAfter(self.tasksClaimEndOn())
Пример #7
0
 def studentsAnnounced(self):
   return request_data.isAfter(self.studentsAnnouncedOn())