Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

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

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: 203 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