Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 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 39 and 311] [Versions 39 and 400] [Versions 39 and 401] [Versions 39 and 402] [Versions 39 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: 0 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