-
Notifications
You must be signed in to change notification settings - Fork 29
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
Wildcard and regular expressions only work with letters, not numbers. #31
Comments
Hi! The wildcard is supposed to only mark substitutes for characters (https://github.com/otacke/h5p-essay/blob/master/scripts/essay.js#L567) as stated in the editor's input field description. Essays are made of words ;-) However, since that might be restricting for some use cases, I included the regexp option, and I cannot reproduce your issue. Have you checked your regular expression? Just for testing your example, I used
and it works as intended. |
Could you please check the development console for error messages (F12)? My assumption is that you'll see something there, because you've not updated to the latest version of the text-utilities library that's needed by Essay, thus leading to a crash. I may not yet have updated the dependencies in these development versions. |
So far, so good! Some messages might pop up in the lower right box as you browse the web, just keep it open. Does anything appear when you click the check button of your Essay content? |
Okay, no error messages. Are you using the latest development version here from github (that's what I assumed) or did you use the latest official version that's provided by the H5P hub? The latter doesn't have the regexp feature yet. |
If you're trying to upload libraries, you'll have to do that on the library page of H5P, not in the content type hub (which is for content). However, since you're using WordPress, it's a little more tedious to use development versions. The easiest and future-update-friendliest way probably is to replace the files in wp-content/uploads/h5p/libraries/h5p-essay with their counterparts in the archive that you downloaded and then delete the files in wp-content/uploads/h5p/cachedassets. You might need to do the same with h5p-text-utilities, and you might need to refresh your browser's cache (shift+F5). In any case: You should not do this on a productive system if you're not sure what you're doing. Be sure to make a backup first. Alternatively, just wait until one of my colleagues has finished the peer-review. There should be an official update shortly that you can download normally using the H5P content hub. |
Also, regex flags like /MM71.098.B[0-9]*/i for case insensitivity aren't working on my end - is there special syntax that I should use? |
Yes, in the latest version you can set the visibility to "keyword" / "alternative found" / "answer given" / "none" for each keyword group. What are you actually using Essay for? That doesn't look like an educational scenario. |
There's no support for regexp flags. |
I'm using it to check the compatibility of boot rom numbers for different years of Mac laptops with solid state drives that I engineer - it probably seems very random, but your tool was the only one that I could find that had all of the functionality that I need. Thanks again for answering my barrage of questions - I just subscribed to your Patreon! I really appreciate the help. |
Sorry to bother you again, but where is the option to change the visibility? I can't find it in 1.1.3. |
Sorry for not being clear: with latest version I meant the latest version here on github which should be out soon. I just created a special version for you that should bring an Essay version 1.1.4 to your system if you upload it via H5P's library page. Old contents will have to be updated via the library page as usual, too, if they should get the new features. Since the next official version of H5P Essay will be 1.2.0, this will not become a problem with version numbers when you want to get the official version again. Let me know if everything works. And thanks for becoming a patron!!! $5 is huge! Also, thanks a lot for sharing your use case! It's always very interesting to see what others use your programs for -- even if you designed them for something completely different :-D |
This works perfectly, thank you so much!!! |
Great! I'll close this issue then, but feel free to get in touch if you have more questions or suggestions -- the forum at h5p.org is probably a good place, because it's kind of the central hub for Q&As and others could join the conversation more easily, too. |
There is no first and second check button, just one. There's just one, and it has a checkmark in front of the label. Did you relabel the "Show solution" button to "Check"? That's the one with the eye. It should not show up however if the sample solution text is empty (that's the second box you're seeing). I am a little puzzled what went wrong here unless you have "Result" as the introduction text of the sample solution and at least a blank in the sample solution text field. |
After clearing out the show solution field and making sure there weren't any blank spaces, everything is working as intended. Thanks again! |
You're welcome! |
When attempting to use a serial number with random numbers at the end of a fixed string as a keyword, neither the wildcard * or regex / are compatible with numbers preceding or following a search term. For example, if I attempted to use MM71.098.B as a term, the value MM71.098.BCD would be valid, but MM71.098.B99 would not.
The text was updated successfully, but these errors were encountered: