Permalink
Browse files

MDL-39164 GIFT, Blackboard and Examview import of essay questions broken

  • Loading branch information...
Jean-Michel Vedrine
Jean-Michel Vedrine committed Apr 18, 2013
1 parent 3a8c438 commit cdcda6a0b43c6f22fd0d2f8b9026c320a18f8d86
@@ -150,6 +150,7 @@ public function process_essay($xml, &$questions) {
$answer = $this->getpath($thisquestion,
array('#', 'ANSWER', 0, '#', 'TEXT', 0, '#'), '', true);
$question->graderinfo = $this->cleaned_text_field($answer);
+ $question->responsetemplate = $this->text_field('');
$question->feedback = '';
$question->responseformat = 'editor';
$question->responsefieldlines = 15;
@@ -781,6 +781,7 @@ public function process_essay($quest, &$questions) {
$question->responseformat = 'editor';
$question->responsefieldlines = 15;
$question->attachments = 0;
+ $question->responsetemplate = $this->text_field('');
$questions[]=$question;
}
@@ -292,6 +292,7 @@ protected function parse_co($qrec, $question) {
protected function parse_es($qrec, $question) {
$feedback = trim($this->unxmlise($qrec['answer'][0]['#']));
$question->graderinfo = $this->text_field($feedback);
+ $question->responsetemplate = $this->text_field('');
$question->feedback = $feedback;
$question->responseformat = 'editor';
$question->responsefieldlines = 15;
@@ -332,6 +332,8 @@ public function readquestion($lines) {
$question->attachments = 0;
$question->graderinfo = array(
'text' => '', 'format' => FORMAT_HTML, 'files' => array());
+ $question->responsetemplate = array(
+ 'text' => '', 'format' => FORMAT_HTML);
return $question;
case 'multichoice':

0 comments on commit cdcda6a

Please sign in to comment.