Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 310 and 311] [Versions 311 and 401] [Versions 311 and 402] [Versions 311 and 403] [Versions 39 and 311]

Aiken format question importer.

Copyright: 2003 Tom Robb <tom@robb.net>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 202 lines (8 kb)
Included or required:0 times
Referenced: 2 times
Includes or requires: 0 files

Defines 1 class

qformat_aiken:: (7 methods):
  provide_import()
  provide_export()
  readquestions()
  text_field()
  readquestion()
  exportpreprocess()
  writequestion()


Class: qformat_aiken  - X-Ref

Aiken format - a simple format for creating multiple choice questions (with
only one correct choice, and no feedback).

The format looks like this:

Question text
A) Choice #1
B) Choice #2
C) Choice #3
D) Choice #4
ANSWER: B

That is,
+ question text all one one line.
+ then a number of choices, one to a line. Each line must comprise a letter,
then ')' or '.', then a space, then the choice text.
+ Then a line of the form 'ANSWER: X' to indicate the correct answer.

Be sure to word "All of the above" type choices like "All of these" in
case choices are being shuffled.

provide_import()   X-Ref
No description

provide_export()   X-Ref
No description

readquestions($lines)   X-Ref
No description

text_field($text)   X-Ref
No description

readquestion($lines)   X-Ref
No description

exportpreprocess()   X-Ref
No description

writequestion($question)   X-Ref
No description