Joseph Rézeau tarafından yapılan gönderiler

Core developers 'ın resmi Plugin developers 'ın resmi Testers 'ın resmi Translators 'ın resmi

Yes, you can install both my REGEXP and Oleg Sychev's Perl-compatible regular expression question side by side (on a Moodle 1.9 site).

If you want to follow Oleg's developement or ask him questions, please go to this tracker discussion: CONTRIB-2234

or this documentation pages discussion:

http://docs.moodle.org/en/Development:Shortanswer_question_development

Joseph

Core developers 'ın resmi Plugin developers 'ın resmi Testers 'ın resmi Translators 'ın resmi

the reason for the 4 incorrect alternative answers below:

a the quiet revolution.
a the quiet revolution
a the quiet revolution.
a the quiet revolution

it that your expression: (|a )(|the ) ?quiet revolution\.?/i

accepts the words "a" and "the" as being either both absent, or one present and the other absent or both present!

My suggested expression (a |the )? accepts those words as being either both absent, or one present, which is the desired result.

I would remove the optional full stop, since it does not make sense to have a full stop at the end of a "sentence" which does not begin with a capital letter.

Core developers 'ın resmi Plugin developers 'ın resmi Testers 'ın resmi Translators 'ın resmi

"Is there a chance of a variation sometime that simple scans a string and if it finds the desired items, it accepts it no matter what else is there?"

No. This goes against the principles I have set in my REGEXP question type. Such a feature might allow for totally unwanted words to be present in a student's answer.

Maybe what you want could be achieved using the other question type also based on regular expressions: Perl-compatible regular expression question by Oleg Sychev.

Joseph

PS.- No, your regular expression is not correct : ([a|A])?([Tt]he)? ?[Qq]uiet [Rr]evolution\.? Have you actually tried it in the Preview question mode, and clicked the Show Alternatives button? Here is a correct one:

(a |the )?quiet revolution/i

would accept:

a quiet revolution
the quiet revolution
quiet revolution

and any case (capitals) variation (A Quiet Revolution, A quite revolution etc)

the /i parameter at the end means "ignore case"

Please note that there have been a number of changes in REGEXP for Moodle 2.0. See the documentation and look for the "Moodle 2.0" labels in the right margin!

Core developers 'ın resmi Plugin developers 'ın resmi Testers 'ın resmi Translators 'ın resmi

@Jeff If you had clearly said so in your original post it would have saved us time.gözkırpıyor

@ Tim this is not a theme issue, that table is left-aligned in all themes in Moodle 2.0.

I am personally very much against centered elements, of which there are too many to my taste in Moodle. It lends certain pages a jagged "Christmas tree" appearance. Apart from what are obviously "title" elements, everything should be left-aligned (or right-aligned for RTL languages, of course).

However, for the sake of those "center-aligned elements" fans, including the OP, here is a CSS rule to add to your current theme which will do the trick. Please carefully copy, minding the exact blanks.

#page-mod-quiz-view .generaltable.quizattemptsummary {margin-left:auto;margin-right:auto;}

attached screenshots (using the Fusion theme) (1) before applying CSS rule (2) after applying it (table is centered)

Joseph

Ek 17-03-2011 09-56-30.jpg