Note: You are currently viewing documentation for Moodle 2.4. Up-to-date documentation for the latest stable version of Moodle may be available here: Preg question type.

Preg question type

From MoodleDocs
Revision as of 19:04, 15 September 2010 by Oleg Sychev (talk | contribs) (New page: Preg question type is a question type using regular expression pattern matching to find if studen response is correct. It is use Perl-compatible regular expressions dialect. For detailed d...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Preg question type is a question type using regular expression pattern matching to find if studen response is correct. It is use Perl-compatible regular expressions dialect. For detailed description of regular expression syntax see http://www.nusphere.com/kb/phpmanual/reference.pcre.pattern.syntax.htm

Authors:

  1. idea, design, question type code - Oleg Sychev;
  2. parsing regular expression, DFA regular expression matching engine - Dmitriy Kolesov.

We would gladly accept testers and contributors (see Development plans section) - there is still more to be done than we have time.

Matching

Hinting

Matching engines

PHP preg extension

Deterministic finite state automata

Development plans

There is no definite shedule or order of development for those features - it depends on the available time and developers. Many features require complex code to achieve results. If you want to help us with specific feature, please contact question type maintainer (Oleg Sychev) using http://moodle.org messaging.

  • Update DFA matching engine to support all operations DFA algorithm could
  • Develop NFA and backtracking matching engines
  • Add possibility to insert match from response (or subpattern match) in the feedback
  • Add automatic generation of shortest possible correct answer in user-readable form
  • Add negative matching answers (AKA "missing words" from Joseph Rezeau question) - depends on developing and checking in extra_answer_fields() code
  • Add generation of 'description' for regular expression to facilitate it's editing
  • Develop more help and examples for the people that don't know much about regular expressions.