Supporting each other

Community forums

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC:

ignore punctuation and case 2 years 3 months ago #7826

  • teacherjonny
  • teacherjonny's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 39
  • Thank you received: 0
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!

Please Log in or Create an account to join the conversation.

ignore punctuation and case 2 years 3 months ago #7830

  • Fay
  • Fay's Avatar
  • Offline
  • Elite Member
  • Elite Member
  • Posts: 235
  • Thank you received: 87
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
The following user(s) said Thank You: teacherjonny

Please Log in or Create an account to join the conversation.

ignore punctuation and case 2 years 3 months ago #7838

  • teacherjonny
  • teacherjonny's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 39
  • Thank you received: 0
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.

Please Log in or Create an account to join the conversation.

ignore punctuation and case 2 years 3 months ago #7839

  • tom
  • tom's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 1290
  • Thank you received: 308
If with "item" you mean page, yes you can. Just press the Shift key when pushing the preview/play button.
The following user(s) said Thank You: teacherjonny

Please Log in or Create an account to join the conversation.

ignore punctuation and case 2 years 3 months ago #7859

  • teacherjonny
  • teacherjonny's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 39
  • Thank you received: 0
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.

Please Log in or Create an account to join the conversation.

ignore punctuation and case 2 years 3 months ago #7861

  • Fay
  • Fay's Avatar
  • Offline
  • Elite Member
  • Elite Member
  • Posts: 235
  • Thank you received: 87
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
The following user(s) said Thank You: teacherjonny

Please Log in or Create an account to join the conversation.

Last edit: by Fay.
  • Page:
  • 1
  • 2
Moderators: alimcnronm
Time to create page: 0.055 seconds
Copyright © 2024 The Xerte Project.
Xerte logo Apereo logo OSI Logo

Search