Moodle  2.2.1
http://www.collinsharper.com
qformat_missingword Class Reference
Inheritance diagram for qformat_missingword:
Collaboration diagram for qformat_missingword:

Public Member Functions

 provide_import ()
 readquestion ($lines)

Detailed Description

Missing word question importer.

This Moodle class provides all functions necessary to import and export one-correct-answer multiple choice questions in this format:

As soon as we begin to explore our body parts as infants we become students of {=anatomy and physiology ~reflexology ~science ~experiment}, and in a sense we remain students for life.

Each answer is separated with a tilde ~, and the correct answer is prefixed with an equals sign =

Percentage weights can be included by following the tilde with the desired percent. Comments can be included for each choice by following the comment with a hash mark ("#") and the comment. Example:

This is {=the best answer::comment on the best answer ~75a good answer::comment on the good answer ~a wrong one::comment on the bad answer}

Definition at line 53 of file format.php.


Member Function Documentation

Reimplemented from qformat_default.

Definition at line 55 of file format.php.

readquestion ( lines)

Given an array of lines known to define a question in this format, this function converts it into a question object suitable for processing and insertion into Moodle.

$comment added by T Robb

Find answer section

Save the new question text

Parse the answers

Reimplemented from qformat_default.

Definition at line 59 of file format.php.

Here is the call graph for this function:


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations