Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ressources): add the categoryText attribute #67

Merged
merged 1 commit into from
Dec 15, 2024

Conversation

Gabriel29306
Copy link

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.

This pull request permit to obtain the text given when a ressource have ResourceContentCategory set to 0.
For example:

Data
{
    "donnees": {
        "ListeCahierDeTextes": {
            "_T": 24,
            "V": [
                {
                    "N": "18#VCRZcloK8YAdKRbCfT-5fKu6MlTytvXIR6lg1yarT3g",
                    "cours": {... },
                    "verrouille": false,
                    "listeGroupes": {...},
                    "Matiere": {...},
                    "CouleurFond": "#2338BB",
                    "listeProfesseurs": {...},
                    "Date": {...},
                    "DateFin": {...},
                    "listeContenus": {
                        "_T": 24,
                        "V": [
                            {
                                "L": "Connaître les caractéristiques génériques des différents documents étudiés",
                                "N": "29#rRGMPPdztxlL5hKRwVCyJS3JfKhRlvJ_8vTV84kBCZc",
                                "descriptif": {
                                    "_T": 21,
                                    "V": "Connaître les caractéristiques génériques des différents documents étudiés (articles de presse d'information et scientifique, essais, textes documentaires, schémas, graphiques, tableaux, images fixes et mobiles, etc.)"
                                },
                                "categorie": {
                                    "_T": 24,
                                    "V": {
                                        "L": "Travaux dirigés",
                                        "N": "19#MBuPxGNflpVrf8LCH9V3IiPstBBUN6dpm0j2G5PqyxQ",
                                        "G": 5
                                    }
                                },
                                "ListeThemes": {...},
                                "libelleCBTheme": "Uniquement les thèmes associés aux matières du contenu",
                                "parcoursEducatif": -1,
                                "ListePieceJointe": {
                                    "_T": 24,
                                    "V": [
                                        {
                                            "L": "Logigramme_old.png",
                                            "N": "39#XAt0kUdASxATqdUCjp1HwuiBufLU8C1QtKiMqKYoX60",
                                            "G": 1,
                                            "estUnLienInterne": false,
                                            "avecMiniaturePossible": true
                                        }
                                    ]
                                },
                                "training": {...}
                            },
                            {
                                "L": "Un autre contenu de cours (ça n'arrive jamais en faite)",
                                "N": "29#TX7DlDUH_yUVTXqlRQlbgwv8pG4h4T7I-5VMRLwObtU",
                                "descriptif": {
                                    "_T": 21,
                                    "V": "<div style=\"font-family: Arial; font-size: 13px;\">Flemme d'écrire trop wesh, on va chez quick wesh, j'ai envie d'un burger !</div>"
                                },
                                "categorie": {
                                    "_T": 24,
                                    "V": {
                                        "L": "Cours & correction",
                                        "N": "19#XahBdyb6QAcatpvKI4qZAqLYK11LMwgL_k_ZuxI4cuo",
                                        "G": 0
                                    }
                                },
                                "ListeThemes": {...},
                                "libelleCBTheme": "Uniquement les thèmes associés aux matières du contenu",
                                "parcoursEducatif": -1,
                                "ListePieceJointe": {...},
                                "training": {...}
                            }
                        ]
                    },
                    "listeElementsProgrammeCDT": {...}
                }
            ]
        },
        "ListeRessourcesPedagogiques": {...},
        "ListeRessourcesNumeriques": {...}
    },
    "nom": "PageCahierDeTexte"
}

The second exemple with title Un autre contenu de cours (ça n'arrive jamais en faite) have a ResourceContentCategory set to 0. But we have a name Cours & correction which is gave for describe the ressource category.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@Vexcited Vexcited merged commit 96fcaa6 into LiterateInk:js Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants