-
Sub-task
-
Resolution: Fixed
-
Minor
-
2.1, 2.2
-
MOODLE_21_STABLE, MOODLE_22_STABLE
The webct question importer does not currently support essay questions
To support importing of this question type: we need to change the preg match on line 447 from:
|
if (preg_match("~^:TYPE:P~i",$line)) {
|
// Paragraph Question
|
$warnings[] = get_string("paragraphquestion", "qformat_webct", $nLineCounter);
|
unset($question);
|
$ignore_rest_of_question = TRUE; // Question Type not handled by Moodle
|
continue;
|
}
|
to:
if (preg_match("~^:TYPE:P~i",$line)) {
|
// Paragraph Question
|
// $warnings[] = get_string("paragraphquestion", "qformat_webct", $nLineCounter);
|
$question = $this->defaultquestion();
|
$question->qtype = ESSAY;
|
$question->responseformat = 'editor';
|
$question->responsefieldlines = 15;
|
$question->attachments = 0;
|
$question->graderinfo = array(
|
'text' => '', 'format' => FORMAT_HTML, 'files' => array());
|
|
$question->feedback = array();
|
$question->generalfeedback = array();
|
$question->questiontextformat = FORMAT_PLAIN;
|
$ignore_rest_of_question = FALSE;
|
|
// To make us pass the end-of-question sanity checks
|
$question->answer = array('dummy');
|
$question->fraction = array('1.0');
|
continue;
|
}
|
- will be (partly) resolved by
-
MDL-30001 WEBCT Import does not work for 2,0
-
- Closed
-