Class StudentHomework

Constructors

  • Parameters

    • client: Pronote
    • homework: {
          CouleurFond: string;
          DonneLe: PronoteValue<7, string>;
          ListePieceJointe: PronoteValue<24, PronoteApiAttachment[]>;
          ListeThemes: PronoteApiThemesList;
          Matiere: PronoteValue<24, {
              L: string;
              N: string;
          }>;
          N: string;
          PourLe: PronoteValue<7, string>;
          TAFFait: boolean;
          avecMiseEnForme: boolean;
          avecRendu?: boolean;
          cahierDeTextes?: PronoteValue<24, {
              N: string;
          }>;
          cours: PronoteValue<24, {
              N: string;
          }>;
          descriptif: PronoteValue<21, string>;
          documentRendu?: PronoteValue<24, {
              G: number;
              L: string;
              N: string;
          }>;
          duree: number;
          genreRendu?: PronoteApiHomeworkReturnType;
          libelleCBTheme: string;
          niveauDifficulte: PronoteApiHomeworkDifficulty;
          nomPublic: string;
          peuRendre?: boolean;
      }
      • CouleurFond: string

        Subject color given by Pronote.

      • DonneLe: PronoteValue<7, string>

        When the homework has been given.

        Example

        "22/01/2024"
        
      • ListePieceJointe: PronoteValue<24, PronoteApiAttachment[]>

        Attachments.

      • ListeThemes: PronoteApiThemesList

        Themes associated with the homework.

      • Matiere: PronoteValue<24, {
            L: string;
            N: string;
        }>

        Subject from where this homework is from.

      • N: string

        ID of the homework.

      • PourLe: PronoteValue<7, string>

        Due date for the homework.

        Example

        "24/01/2024"
        
      • TAFFait: boolean

        true when the homework has been done.

      • avecMiseEnForme: boolean
      • Optional avecRendu?: boolean

        Whether the homework should be returned or not.

      • Optional cahierDeTextes?: PronoteValue<24, {
            N: string;
        }>
      • cours: PronoteValue<24, {
            N: string;
        }>
      • descriptif: PronoteValue<21, string>

        Content of the homework. This is an HTML string, you can use whatever you want to parse/display it.

      • Optional documentRendu?: PronoteValue<24, {
            G: number;
            L: string;
            N: string;
        }>
      • duree: number

        Time in minutes to do the exercice.

        Example

        30 // For 30 minutes.
        
      • Optional genreRendu?: PronoteApiHomeworkReturnType

        Type of return the teacher asks.

      • libelleCBTheme: string

        Example

        "Uniquement les thèmes associés aux matières du travail à faire"
        
      • niveauDifficulte: PronoteApiHomeworkDifficulty

        Difficulty of the given work.

      • nomPublic: string
      • Optional peuRendre?: boolean

        Whether you can upload or reupload a file.

    Returns StudentHomework

Properties

attachments: StudentAttachment[]
backgroundColor: string
client: Pronote
deadline: Date
description: string
done: boolean
id: string
lengthInMinutes?: number

Time that should take, in minutes, to do the homework.

lessonResourceID?: string

If defined, can be used to retrieve the lesson contents from the resources tab.

You can directly fetch the contents using getContent().

return?: {
    type: PAPER;
} | {
    canUpload: boolean;
    type: FILE_UPLOAD;
    uploaded: null | StudentAttachment;
}

Available only if the homework should be returned.

Type declaration

Type declaration

themes: StudentTheme[]

Themes associated with this homework.

Methods

  • Returns Promise<undefined | StudentLessonResource>

  • Parameters

    • file: PawnoteSupportedFormDataFile
    • fileName: string

    Returns Promise<void>