Class StudentNewsItemQuestion

Constructors

  • Parameters

    • client: Pronote
    • data: {
          L: string;
          N: string;
          P: number;
          avecMaximum: boolean;
          genreReponse: PronoteApiNewsQuestionType;
          listeChoix: PronoteValue<24, {
              L: string;
              N: string;
              estReponseLibre?: boolean;
              rang: number;
          }[]>;
          listePiecesJointes: PronoteValue<24, PronoteApiAttachment[]>;
          nombreReponsesMax: number;
          rang: number;
          reponse: PronoteValue<24, {
              N: string;
              avecReponse: boolean;
              estRepondant: boolean;
              estReponseAttendue: boolean;
              reponduLe?: PronoteValue<7, string>;
              strRepondant?: string;
              valeurReponse?: string | {
                  V: string;
                  _T: number;
              };
              valeurReponseLibre?: string;
          }>;
          tailleReponse: number;
          texte: PronoteValue<21, string>;
          titre: string;
      }
      • L: string

        Full title with index in front.

        Example

        "Q 1 : Multiples"
        
      • N: string
      • P: number
      • avecMaximum: boolean
      • genreReponse: PronoteApiNewsQuestionType
      • listeChoix: PronoteValue<24, {
            L: string;
            N: string;
            estReponseLibre?: boolean;
            rang: number;
        }[]>
      • listePiecesJointes: PronoteValue<24, PronoteApiAttachment[]>
      • nombreReponsesMax: number
      • rang: number

        Position of the question in the list. Should be displayed in this order.

      • reponse: PronoteValue<24, {
            N: string;
            avecReponse: boolean;
            estRepondant: boolean;
            estReponseAttendue: boolean;
            reponduLe?: PronoteValue<7, string>;
            strRepondant?: string;
            valeurReponse?: string | {
                V: string;
                _T: number;
            };
            valeurReponseLibre?: string;
        }>
      • tailleReponse: number
      • texte: PronoteValue<21, string>

        Raw HTML containing the question's content. This is not sanitized.

      • titre: string

        Question's title.

        Example

        "Multiples"
        

    Returns StudentNewsItemQuestion

Properties

#answerDate?: Date
#answerID: string
#answered: boolean
#attachments: StudentAttachment[]
#choices: {
    isTextInput: boolean;
    position: number;
    value: string;
}[]

Type declaration

  • isTextInput: boolean
  • position: number
  • value: string
#content: string
#fullTitle: string
#genre: number
#id: string
#maximumChoices: number
#maximumLength: number
#position: number
#selectedAnswers?: number[]
#shouldAnswer: boolean
#shouldRespectMaximumChoices: boolean
#textInputAnswer?: string
#title: string

Accessors

  • get choices(): {
        isTextInput: boolean;
        position: number;
        value: string;
    }[]
  • Returns {
        isTextInput: boolean;
        position: number;
        value: string;
    }[]

  • get selectedAnswers(): undefined | number[]
  • Returns undefined | number[]

  • get textInputAnswer(): undefined | string
  • Returns undefined | string

Methods

  • Parameters

    • Optional textInputAnswer: string

    Returns void

  • Parameters

    • Optional selectedAnswers: number[]
    • Optional otherFieldTextValue: string

    Returns void