|
Well, help files is accessible on my sites. I don't know, what's wrong with them, you can copy qtype_preg catalog to the en_uf8/help thought. I'm not native English, so I don't dare to write a complex help in English without someone to edit it. There are many well known sites about regex thought.
1 - You way with using first subanswer was somewhat confusing for our teachers, so I try to find better solution. You may implement it too. Do you notice regex validation using this correct answer? Just try to save question without 100% grade regex matcing it. 2 - Let's consider you example with animals. The regex for correct answer would be something like (the|a)\s+[cbr]at . If you set Exact Matching to Yes, the answer must be strictly as you describe it, for example 'a rat' with nothing else in it (the way the ordinary teacher would expect it to work). If you set it to No, the regex will match any string which contains correct answer, for example 'this is a rat maybe'. In No mode you still can specify exact matching for some options using regexp syntax, that is enclosing it in ^$ i.e. ^(the|a)\s+[cbr]at$ (Exact Match Yes just do it to every regex). You may want to catch correct answers with exact matches and parts of incorrect as partial, for example ^an\s+ would catch wrong article at the start of the string, and you can tell the student whats wrong. In that case it is easy to use an\s+[cbr]at with Exact Matching, but in more complicated cases this isn't so easy. 3 - A dog maybe Also, you (as, I think, many contributors there) may like to vote for MDLSITE-551. Please see MDL-14899 too, you may like the block. Oleg,
1- I said I agreed that yours was a good idea. Yes, I noticed how regex validation used that correct answer. And I will see if I can incorporate this idea into my REGEXP question type. Thanks. 2- OK, now I understand better what you want to achieve with the "Exact Matching Yes/No" setting. Thanks for the examples. 3- "I can't properly understand you needs. Do you want to catch partially wrong answer such as 'bat' without either 'a' or 'the'?" Joseph Joseph
3 Well, you can catch abscence of something using the way regexes are compared in Moodle in two steps: for the articles if you don't interested in anything except the article: Actually, you'll need more options that Tim mentioned in his last comment to MDL-16344 (go see this Bugzilla page) than regexes. Can we work on implementing it together? You'll get quite pains trying to catch with regexes blue, red and yellow in any possible order. Anthony, it would be great to get this into contrib when you have a moment, but I know you are busy.
Oleg, I recently realised that you can do blue, red and yellow in any possible order using regexes, and without listing all six possible orders, but you have to use assertions Something like ^(?=.\bblue\b)(?=.\bred\b).\byellow\b.$ but that is hardly intuitive! (And I don't know what sort of performance you get out of the preg engine with expressions like that.) moving to newly created QuestionType: Preg component
Oleg - Thanks for your work on this code and for sharing it with the community. I am marking this as resolved as I have added the code to contrib/plugins/question/type/preg. If you could please apply for CVS write access at http://moodle.org/cvs
Tim > I recently realised that you can do blue, red and yellow in any possible order using regexes, and without listing all six possible orders, but you have to use assertions Something like
^(?=.\bblue\b)(?=.\bred\b).\byellow\b.$ Tim, this is excellent! Just what I needed. I will test it when I get the time and energy to give my REGEXP plugin a much-needed overhaul. Joseph Further to my recent comment, I am now realizing that I can do a lot of conditions such as:
if student's answer matches ^(?=[A-Z]).*[^.]$ then I can send feedback message "You began with a capital letter, you must end with a full stop" with this expression: or, on the contrary: if student's answer matches ^(?=[a-z]).*\.$ feedback message: "You began your answer with a lowercase letter, you must NOT end with a full stop Really, these assertions open up a whole set of possibilities, but however they'll have to be tested for performance, as Tim warns out. Joseph Joseph, would you like to join discussion on http://docs.moodle.org/en/Development:Shortanswer_question_development
Please, add description of features you need in ' initial types of the rules' list. Keep in mind that you can place negation before any rule, so you "absence some words" is already there. Anthony - I'd applied for cvs write access. Will I recieve any notification about it getting approved? Also, could you please link me to some description how I can maintain archive in Modules and Plugins database automatically from cvs if this possible?
"Please do not hesitate to let me know if there is anything I can do to be of assistance or if you have any questions. " - actually I would like you assistance (if you can) in another contrib matter. Some time later I write for our university block that just display a link for MyMoodle page. Our students found it very useful (forcing everyony to MyMoodle on login irritates experienced users, especially staff), so I release it there. The block is so simple and generally useful, that it probably would be better in the core, than there. I created MDL-14899 for this (we even get some votes). Eloy add +1 and reassigned to Martin for final consideration, but Martin appears to be quite busy. Could you please ensure that this matter wouldn't be forgetted and would be resolved somehow: either inclusion in the core or, failing that, move it there? Best regards, - Oleg. Oleg - I've approved your CVS request. I think you do get a message indicating that it has been approved. You may want to check out http://docs.moodle.org/en/CVS_(developer
I'll add myself as a watcher to MDL-14899. If you feel that the issue has stalled, just add a comment. My experience is that we do pretty well at keeping things moving along and resolving issues. From what you say, it sounds like a good idea that there is a way to access their My Moodle page. I'll review the issue and comment there. Peace - Anthony |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
Thank your for making your new "preg" question type available to the Moodle community. I hope you get a CONTRIB access soon so that it will be easier to upgrade to your updated versions of this plugin.
I have installed it on my moodle 1.9 development site. No install problems at all.
The Help files are minimal, but this does not matter for the moment. Unfortunately the Help files are not accessible from the question editing interface (there must be a path problem).
1- I like the way you put the (best) "Correct answer" in a field of its own, just before the list of options.
2- I do not understand the "exact matching parameter". Could you provide some examples (in "normal everyday language" please)?
3- One didactically important feature of my own regexp plugin is that it can catch "missing" words from the student's response. Example question: Name an animal's name in 3 letters. Expected answers: the cat / the bat / the rat OR a cat / a bat / a rat. How does your preg question detect the absence of either "the" or "a" ?
I tried this: ([^a]|[^t][^h][^e]).* which does not work. Any idea?
All the best,
Joseph