Hi Gordon,
I'm using WebRhubarb with modified source code so that students are not penalised for typing punctuation marks. All works fine and the code validates but some hyphenated words are accepted and others not.
For example, when you type "square-bottomed", you see "square - bottomed" appear in the text, but when you type "brown-paper", you see only "brown - " You can then type "paper" and everything is OK. It doesn't affect the scoring.
I've uploaded an exmple to your site:
- Unit 5 - Exercise 12: Text Reconstruction - Vowels Hot Potatoes
This works fine except for the problem mentioned above. - Unit 5 - Exercise 12: Text Reconstruction - Vowels QuizPort
This version hangs at "Preparing the quiz..." It works fine locally where I'm running QuizPort v 2008033195 and on my online site on an even older version.
I've uploaded the modified source code to your site too with a Word file which details all the code changes, but this is the relevant bit :
function CheckGuess(){
var Input = TrimString(document.getElementById('Guess').value);
var seps=new RegExp("[ ,;:.?!-]+", "g");
if (Input.length < 1){return;};
if ((Input.indexOf(' ')<0)&&(Input.indexOf(',')<0)&&(Input.indexOf(';')<0)&&(Input.indexOf(':')<0)&&(Input.indexOf('.')<0)&&(Input.indexOf('?')<0)&&(Input.indexOf('!')<0)&&(Input.indexOf('-')<0)){
CheckWord(Input);
}
else{
var InputWords = Input.split(seps);
for (var i=0; i<InputWords.length; i++){
CheckWord(InputWords[i]);
}
}
}
The basic code was written by my ex-colleague Patrick Verguet, but I added the hyphen bit. Maybe I didn't do it exactly right?
There is absolutely nothing urgent about this as it doesn't affect scoring.