-
Bug
-
Resolution: Fixed
-
Major
-
1.6.2
-
None
-
ALL.
-
Any
-
MOODLE_16_STABLE
-
MOODLE_19_STABLE
The rendered match question type isn't restored. I have renderedmatch installed on moodle 1.6.2 but they wouldn't restore.
here is a fix.
open question/restorelib.php
go to function restore_questions
after this ..
//If the question exists, only record its id
if ($question_exists)
else
{ //The structure is equal to the db, so insert the question $newid = insert_record ("question",$question); $creatingnewquestion = true; }ADD THIS...
/new stuff/
if($question->qtype=='renderedmatch'||$question->qtype=="13")
{
$x=0;
$test=1;
$question_renderedmatch_sub->question=$newid;
$question_renderedmatch->question=$newid;
while($test!=2)
{
if(!empty($que_info'#'['RENDEREDS']['0']'#'['RENDERED'][$x]))
else
{ $test=2; }$x=$x+1;
}
$question_renderedmatch->subquestions=implode(",",$subquest);
insert_record("question_renderedmatch",$question_renderedmatch);
}
/new stuff ends/
not pretty but it works...
- has a non-specific relationship to
-
MDL-10380 Moodle question import doesn't properly handle BB matching type
- Closed