def _get_active_surveys(event): if not event.has_feature('surveys'): return [] from indico.modules.events.surveys.models.surveys import Survey return (query_active_surveys(event) .order_by(db.func.lower(Survey.title)) .all())
def _process(self): surveys = (query_active_surveys(self.event) .options(joinedload('questions'), joinedload('submissions')) .all()) if _can_redirect_to_single_survey(surveys): return redirect(url_for('.display_survey_form', surveys[0])) return self.view_class.render_template('display/survey_list.html', self.event, surveys=surveys, states=SurveyState, is_submission_in_progress=is_submission_in_progress, was_survey_submitted=was_survey_submitted)
def _process(self): surveys = (query_active_surveys(self.event_new) .options(joinedload('questions'), joinedload('submissions')) .all()) if _can_redirect_to_single_survey(surveys): return redirect(url_for('.display_survey_form', surveys[0])) return self.view_class.render_template('display/survey_list.html', self._conf, surveys=surveys, event=self.event_new, states=SurveyState, is_submission_in_progress=is_submission_in_progress, was_survey_submitted=was_survey_submitted)
def _get_active_surveys(event): if not event.has_feature('surveys'): return [] return query_active_surveys(event).all()
def _visible(event): return event.has_feature('surveys') and query_active_surveys( event).has_rows()
def _visible(event): return event.has_feature('surveys') and query_active_surveys(event).has_rows()
def _get_active_surveys(event): if not event.has_feature('surveys'): return [] from indico.modules.events.surveys.models.surveys import Survey return (query_active_surveys(event).order_by(db.func.lower( Survey.title)).all())
def _get_active_surveys(event): if not event.has_feature('surveys'): return [] from indico.modules.events.surveys.models.surveys import Survey return query_active_surveys(event).all()