ignore punctuation and case

  • teacherjonny
  • Auteur du sujet
  • Hors Ligne
  • Membre senior
  • Membre senior
Plus d'informations
il y a 4 ans 7 mois #7826 par teacherjonny
ignore punctuation and case a été créé par teacherjonny
Hello All,
I am using interaction >dialog where I have a prompt and the student is asked to type in a response. Is there a way to ask xerte to ignore any punctuation in the student's response and to change any upper case letters to lower case? Is there a way to learn the name of the variable that contains the student response and then use java script to do the above?
Thanks!

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 4 ans 7 mois #7830 par Fay
Réponse de Fay sur le sujet ignore punctuation and case
The dialogue page is not case sensitive by default so when it checks the student answer against the correct answer it will change both to lowercase (you can add the case sensitive optional property to force the case to be checked too). There's no built in easy way to remove punctuation from the student's answer though. If you want to add custom code to the page to deal with this then it's likely to be a bit fiddly - start by looking at the model for the page so you can see what's currently happening. The submit button code that checks correct answers is around line 143 in this file: Dialogue model file
Les utilisateur(s) suivant ont remercié: teacherjonny

Connexion ou Créer un compte pour participer à la conversation.

  • teacherjonny
  • Auteur du sujet
  • Hors Ligne
  • Membre senior
  • Membre senior
Plus d'informations
il y a 4 ans 6 mois #7838 par teacherjonny
Réponse de teacherjonny sur le sujet ignore punctuation and case
Thank you very much. I appreciate the response and I'll try to write something. I didn't realize that I had access to the model files. How can I learn the location of other files? I would like to learn if it's possible to test one of my corrections in an exercise, for example in item 8 without having to go through all of the items until I reach 8. Can't I "run from 8" for example.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 4 ans 6 mois #7839 par tom
Réponse de tom sur le sujet ignore punctuation and case
If with "item" you mean page, yes you can. Just press the Shift key when pushing the preview/play button.
Les utilisateur(s) suivant ont remercié: teacherjonny

Connexion ou Créer un compte pour participer à la conversation.

  • teacherjonny
  • Auteur du sujet
  • Hors Ligne
  • Membre senior
  • Membre senior
Plus d'informations
il y a 4 ans 6 mois #7859 par teacherjonny
Réponse de teacherjonny sur le sujet ignore punctuation and case
OK I can write code in Javascript to remove punctuation and space between words. But how do I find the code for the "interactivity, dialog" to modify it on my server? What is the name of that 'module" In other words, where is the code on my server that you directed me to on github? While the present xerte code that converts both the correct answer and the student input to lower case is welcome, the students are upset when they have their answers declared wrong because of a discrepancy involving a comma, or another punctuation mark, or an inadvertent extra space. I'd like to fix this.
Thanks.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 4 ans 6 mois - il y a 4 ans 6 mois #7861 par Fay
Réponse de Fay sur le sujet ignore punctuation and case
The files for all the page types are in this folder: modules/xerte/parent_templates/Nottingham/models_html5
If you edit any of the core Xerte files you need to remember that your changes will be lost if you later upgrade. We generally don't recommend editing them for this reason
Dernière édition: il y a 4 ans 6 mois par Fay.
Les utilisateur(s) suivant ont remercié: teacherjonny

Connexion ou Créer un compte pour participer à la conversation.

Modérateurs: ronmalimcn
Temps de génération de la page : 0.154 secondes
Copyright © 2026 The Xerte Project.
Xerte logo Apereo logo OSI Logo