components.texts Module

This module contains functions for generating often needed texts.

components.texts.PHOTO_OPTIONS = ['Oben links', 'Oben rechts', 'Unten links', 'Unten rechts']

Poll options to present when the question attribute is components.Question.PHOTO.

Type

List[str]

components.texts.question_text(member, question_attribute, hint_attribute, multiple_choice=True, hint_value=None)

Gives the question text for the question specified by the parameters.

Parameters
  • member (Member) – The orchestra member with the correct answer.

  • question_attribute (str) – The attribute that is asked for. One of components.Question.SUPPORTED_ATTRIBUTES.

  • hint_attribute (str) – The attribute to give as a hint.

  • multiple_choice (Optional[bool]) – Whether this is a multiple choice question. Defaults to True.

  • hint_value (Any) – Optional. A specific value to use as hint. Useful if the hint attribute is a list.

Return type

str