Moodle

Moodle question import doesn't properly handle BB matching type

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.8.1
  • Fix Version/s: 1.8.3, 1.9
  • Component/s: Questions
  • Labels:
    None
  • Environment:
    Experienced on WAMP (localhost) but expect it's across the board.
  • Affected Branches:
    MOODLE_18_STABLE
  • Fixed Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE

Description

When importing a BB 6 pool export, moodle gave the following error page:

Matching question types are not handled because the quiz question type 'Rendered Matching' does not exist in this installation of Moodle
Omitted Question: Match the Latin numbers with the English symbols

Issue Links

Activity

Hide
D.I. von Briesen added a comment -

I forgot to add- i see the code has been written for the matching question type in format.php within the BB6 folder- but suspect this may be a simple matter of adding the additional text of "Rendered Matching" to go in parallel with "Matching" - though i'm not sure. If so, that would be a great quick fix, and help us out a lot!
d.i.

Show
D.I. von Briesen added a comment - I forgot to add- i see the code has been written for the matching question type in format.php within the BB6 folder- but suspect this may be a simple matter of adding the additional text of "Rendered Matching" to go in parallel with "Matching" - though i'm not sure. If so, that would be a great quick fix, and help us out a lot! d.i.
Hide
D.I. von Briesen added a comment -

Found this bug in a belated search. http://tracker.moodle.org/browse/MDL-6752
It SEEMS to be that folks put together the code to address this - but the fact that it's still open makes me wonder if it was ever incorporated into the code base. If so, must be a new bug. If not, is it as easy as pasting it in, or are there other big changes between that version and 1.8.
Please help...

d.i.

Show
D.I. von Briesen added a comment - Found this bug in a belated search. http://tracker.moodle.org/browse/MDL-6752 It SEEMS to be that folks put together the code to address this - but the fact that it's still open makes me wonder if it was ever incorporated into the code base. If so, must be a new bug. If not, is it as easy as pasting it in, or are there other big changes between that version and 1.8. Please help... d.i.
Hide
D.I. von Briesen added a comment -

don't know if this was incorporated into the 1.8 codebase or not...if not, perhaps it's an easy fix?

Show
D.I. von Briesen added a comment - don't know if this was incorporated into the 1.8 codebase or not...if not, perhaps it's an easy fix?
Hide
D.I. von Briesen added a comment -

Ran on another system with debugging turned on - got this:

Parsing questions from import file.

Matching question types are not handled because the quiz question type 'Rendered Matching' does not exist in this installation of Moodle
Omitted Question: Match the Latin numbers with the English symbols

There are no questions in the import file

An error occurred during import processing
Stack trace:

  • line 4788 of lib\weblib.php: call to debugging()
  • line 177 of question\import.php: call to error()
Show
D.I. von Briesen added a comment - Ran on another system with debugging turned on - got this: Parsing questions from import file. Matching question types are not handled because the quiz question type 'Rendered Matching' does not exist in this installation of Moodle Omitted Question: Match the Latin numbers with the English symbols There are no questions in the import file An error occurred during import processing Stack trace:
  • line 4788 of lib\weblib.php: call to debugging()
  • line 177 of question\import.php: call to error()
Hide
Jean-Michel Vedrine added a comment -

I think this issue is not related to MDL-6752 at all.
MDL-6752 is about the lack of valids restore &backup functions in the renderedmatch questiontype.
I have now added such functions in the contrib/plugins/question/type/renderedmatch/questiontype.php file. So this should close MDL-6752.

The present bug is related to the fact that questiontypes are now plugins and no standard way has really been set for an import/export format plugin XXX to know if a questiontype YYY is installed or not.
For "core" questiontypes it is OK to do something like if (defined("QUESTIONTYPE")) but this is not a good practice for 3rd party questiontypes.
Tim, Howard can we agree on a "right" way to code this that will work in the future for all 3rd party questiontypes and import/export formats ?

Show
Jean-Michel Vedrine added a comment - I think this issue is not related to MDL-6752 at all. MDL-6752 is about the lack of valids restore &backup functions in the renderedmatch questiontype. I have now added such functions in the contrib/plugins/question/type/renderedmatch/questiontype.php file. So this should close MDL-6752. The present bug is related to the fact that questiontypes are now plugins and no standard way has really been set for an import/export format plugin XXX to know if a questiontype YYY is installed or not. For "core" questiontypes it is OK to do something like if (defined("QUESTIONTYPE")) but this is not a good practice for 3rd party questiontypes. Tim, Howard can we agree on a "right" way to code this that will work in the future for all 3rd party questiontypes and import/export formats ?
Hide
Howard Miller added a comment -

superficially the import code is simply checking if the constant 'RENDEREDMATCH' has been defined. I'm assuming that this is a question type constant. If it is not, you get that message.

My knowledge of questiontype plugins is limited. I'm not sure how that gets defined when the plugin is installed. I'll go and find that question type and see!

Show
Howard Miller added a comment - superficially the import code is simply checking if the constant 'RENDEREDMATCH' has been defined. I'm assuming that this is a question type constant. If it is not, you get that message. My knowledge of questiontype plugins is limited. I'm not sure how that gets defined when the plugin is installed. I'll go and find that question type and see!
Hide
Howard Miller added a comment -

Ok - I fixed the import code so that it now imports the matching question (providing the renderedmatch plugin is present). However, it doesn't actually work. The code is failing to find the possible answers in the XML file. This looks like a bit of a hassle to sort as the XML file layout is a total nightmare. I'm doing my best though

Show
Howard Miller added a comment - Ok - I fixed the import code so that it now imports the matching question (providing the renderedmatch plugin is present). However, it doesn't actually work. The code is failing to find the possible answers in the XML file. This looks like a bit of a hassle to sort as the XML file layout is a total nightmare. I'm doing my best though
Hide
Howard Miller added a comment -

Ok, I think I've probably sorted it.

Firstly you will need to install the rendermatch question type from contrib - make sure you get the latest version. A visit to the admin notifcation page will enable it.

If it helps, the cvs info is here:

http://moodle.cvs.sourceforge.net/moodle/contrib/plugins/question/type/renderedmatch/

The latest version of the bb6 format.php can be had here:

http://moodle.cvs.sourceforge.net/moodle/moodle/question/format/blackboard_6/format.php?view=log

Could you give it a try and see how you get on please!!

Show
Howard Miller added a comment - Ok, I think I've probably sorted it. Firstly you will need to install the rendermatch question type from contrib - make sure you get the latest version. A visit to the admin notifcation page will enable it. If it helps, the cvs info is here: http://moodle.cvs.sourceforge.net/moodle/contrib/plugins/question/type/renderedmatch/ The latest version of the bb6 format.php can be had here: http://moodle.cvs.sourceforge.net/moodle/moodle/question/format/blackboard_6/format.php?view=log Could you give it a try and see how you get on please!!
Hide
Jean-Michel Vedrine added a comment -

I may be wrong but I think if (!empty($QTYPES['renderedmatch'])) { will work in PHP5 and not in PHP4 (object considered as empty by this damned PHP4 !!)
I think either
if (isset($QTYPES['renderedmatch'])) {
or
if (array_key_exists ( 'renderedmatch' , $QTYPES )) {
will work both in PHP4 and PHP5.
But ithis is just a guess. I will test the file given by the bug reporter (I don't use Blackboard) and report.

Show
Jean-Michel Vedrine added a comment - I may be wrong but I think if (!empty($QTYPES['renderedmatch'])) { will work in PHP5 and not in PHP4 (object considered as empty by this damned PHP4 !!) I think either if (isset($QTYPES['renderedmatch'])) { or if (array_key_exists ( 'renderedmatch' , $QTYPES )) { will work both in PHP4 and PHP5. But ithis is just a guess. I will test the file given by the bug reporter (I don't use Blackboard) and report.
Hide
Jean-Michel Vedrine added a comment -

I tried the file given in the bug report with a Moodle 1.7+ install on a server with PHP4

with f (!empty($QTYPES['renderedmatch'])) same error massage complaining that renderedmatch qtype is not installed
with both f (isset($QTYPES['renderedmatch'])) {
or
if (array_key_exists ( 'renderedmatch' , $QTYPES )) {
a renderedmatch question is correctly created.

Show
Jean-Michel Vedrine added a comment - I tried the file given in the bug report with a Moodle 1.7+ install on a server with PHP4 with f (!empty($QTYPES['renderedmatch'])) same error massage complaining that renderedmatch qtype is not installed with both f (isset($QTYPES['renderedmatch'])) { or if (array_key_exists ( 'renderedmatch' , $QTYPES )) { a renderedmatch question is correctly created.
Hide
Howard Miller added a comment -

Mmm.. I should just change that to array_key_exists(), as it probably reads better anyway.

Plus, I haven't tried this at all with 1.7. I don't see why it shouldn't work, but.....

You definitely do have the renderedmatch plugin installed and working?

Show
Howard Miller added a comment - Mmm.. I should just change that to array_key_exists(), as it probably reads better anyway. Plus, I haven't tried this at all with 1.7. I don't see why it shouldn't work, but..... You definitely do have the renderedmatch plugin installed and working?
Hide
D.I. von Briesen added a comment -

Man,

i don't...

I realized that it was an add-on, and spent many hours trying to get it installed (and chasing rabbits because all the various links and such for that add-in are broken on the forums) and cannot get it to work. Somewhere in there i realized i needed to update the bug report as the message was spot on, not installed - but i completely forgot while debugging. So I still can't get it to install and work, but that's a different bug, which should probably put this one on hold.

So my sincere apologies on that, and i'll post this to the bug report -

Is there any way you can test on your end with the add-on installed? My wife says the matching and the rendered matching appear the same (i'm not clear on the difference myself) and i'm wondering if the standard match filter wouldn't work just as well anyway.

There is a related bug listed in which the fellow commenting points out that there's an inconsistency with the way add-ons are handled anyway, but I think that's another can of worms...

d.i.

ps- have just seen your other comment above- i'm going to try a fresh install of the add-on. If that fails i'll try it on another machine, and try and get back here with results in a couple hours.

Show
D.I. von Briesen added a comment - Man, i don't... I realized that it was an add-on, and spent many hours trying to get it installed (and chasing rabbits because all the various links and such for that add-in are broken on the forums) and cannot get it to work. Somewhere in there i realized i needed to update the bug report as the message was spot on, not installed - but i completely forgot while debugging. So I still can't get it to install and work, but that's a different bug, which should probably put this one on hold. So my sincere apologies on that, and i'll post this to the bug report - Is there any way you can test on your end with the add-on installed? My wife says the matching and the rendered matching appear the same (i'm not clear on the difference myself) and i'm wondering if the standard match filter wouldn't work just as well anyway. There is a related bug listed in which the fellow commenting points out that there's an inconsistency with the way add-ons are handled anyway, but I think that's another can of worms... d.i. ps- have just seen your other comment above- i'm going to try a fresh install of the add-on. If that fails i'll try it on another machine, and try and get back here with results in a couple hours.
Hide
Jean-Michel Vedrine added a comment -

Hello,
To Howard
I do have the renderedmatch qtype installed and working. As I am the one who commited all fixes to this plugin in CVS for the latest year, you can guess I am quite sure my installation is up to date
Maybe I was unclear in my latest message
1) your fix is working ...
2) but there is a problem if you use the test :
if (!empty($QTYPES['renderedmatch']))
3) this problem is not related to the Moodle version but to the PHP version because in PHP4 the test will fail because the $QTYPES['renderedmatch']) object will be considered as empty
4) if you use the test :
if (array_key_exists ( 'renderedmatch' , $QTYPES ))
this will work with any PHP version

To D.I.
What Moodle version are you using ? if you tell me wich one I can send you the right version of the renderedmatch questiontype to install.

Show
Jean-Michel Vedrine added a comment - Hello, To Howard I do have the renderedmatch qtype installed and working. As I am the one who commited all fixes to this plugin in CVS for the latest year, you can guess I am quite sure my installation is up to date Maybe I was unclear in my latest message 1) your fix is working ... 2) but there is a problem if you use the test : if (!empty($QTYPES['renderedmatch'])) 3) this problem is not related to the Moodle version but to the PHP version because in PHP4 the test will fail because the $QTYPES['renderedmatch']) object will be considered as empty 4) if you use the test : if (array_key_exists ( 'renderedmatch' , $QTYPES )) this will work with any PHP version To D.I. What Moodle version are you using ? if you tell me wich one I can send you the right version of the renderedmatch questiontype to install.
Hide
D.I. von Briesen added a comment -

Jean-Michel:

I'm using 1.8.1 at the moment - trying to actually get the add-in to work before retrying. I think that this version requires php 5 anyway, right?

OK, php info show 5.2.0

After some trials and tribulation, got the zip file from http://download.moodle.org/plugins/question/type/ and got the rendered match questions to finally show up.

But now, of course, i'm right back where I started:
-----------------------------------------------------------------------------------------------------------------------------------
Parsing questions from import file.

Matching question types are not handled because the quiz question type 'Rendered Matching' does not exist in this installation of Moodle
Omitted Question: Match the Latin numbers with the English symbols

There are no questions in the import file

An error occurred during import processing
-------------------------------------------------------------------------------

So i'm thinking, in the process of trying to install this the database script ran, but then I updated the files, and it didn't run- so how can i force it to run again with the new files? So i started clicking links under admin, which gives me :

Setting up plugin tables

You are here

  • LMD
  • / ? Setting up plugin tables

This script generated 3 warnings - Scroll to the first warning
renderedmatch plugin needs upgrading
(mysql): CREATE TABLE mdl_question_renderedmatch ( id BIGINT(10) unsigned NOT NULL auto_increment, question BIGINT(10) unsigned NOT NULL DEFAULT 0, subquestions VARCHAR(255) NOT NULL DEFAULT '', shuffleanswers SMALLINT(4) NOT NULL DEFAULT 1, CONSTRAINT PRIMARY KEY (id) ) 1050: Table 'mdl_question_renderedmatch' already exists

ADOConnection._Execute(CREATE TABLE mdl_question_renderedmatch (
id BIGINT(10) unsigned NOT NULL auto_increment,
question BIGINT(10) unsigned N..., false) % line 889, file: adodb.inc.php
ADOConnection.Execute(CREATE TABLE mdl_question_renderedmatch (
id BIGINT(10) unsigned NOT NULL auto_increment,
question BIGINT(10) unsigned N...) % line 89, file: dmllib.php
execute_sql(CREATE TABLE mdl_question_renderedmatch (
id BIGINT(10) unsigned NOT NULL auto_increment,
question BIGINT(10) unsigned N..., true) % line 1899, file: dmllib.php
execute_sql_arr(Array[4]) % line 548, file: ddllib.php
install_from_xmldb_file(C:\xampplite\moodle/question/type/renderedmatch/db/install.xml) % line 102, file: adminlib.php

ErrorScroll to next warning

(mysql): ALTER TABLE mdl_question_renderedmatch COMMENT='Defines fixed renderedmatching questions'
Success

(mysql): CREATE TABLE mdl_question_renderedmatch_sub ( id BIGINT(10) unsigned NOT NULL auto_increment, question BIGINT(10) unsigned NOT NULL DEFAULT 0, questiontext TEXT NOT NULL, answertext VARCHAR(255) NOT NULL DEFAULT '', CONSTRAINT PRIMARY KEY (id) ) 1050: Table 'mdl_question_renderedmatch_sub' already exists

ADOConnection._Execute(CREATE TABLE mdl_question_renderedmatch_sub (
id BIGINT(10) unsigned NOT NULL auto_increment,
question BIGINT(10) unsign..., false) % line 889, file: adodb.inc.php
ADOConnection.Execute(CREATE TABLE mdl_question_renderedmatch_sub (
id BIGINT(10) unsigned NOT NULL auto_increment,
question BIGINT(10) unsign...) % line 89, file: dmllib.php
execute_sql(CREATE TABLE mdl_question_renderedmatch_sub (
id BIGINT(10) unsigned NOT NULL auto_increment,
question BIGINT(10) unsign..., true) % line 1899, file: dmllib.php
execute_sql_arr(Array[4]) % line 548, file: ddllib.php
install_from_xmldb_file(C:\xampplite\moodle/question/type/renderedmatch/db/install.xml) % line 102, file: adminlib.php

Scroll to previous warningErrorScroll to next warning

(mysql): ALTER TABLE mdl_question_renderedmatch_sub COMMENT='Defines the subquestions that make up a renderedmatching que'
Success

Scroll to previous warningInstalling renderedmatch FAILED!Scroll to continue button

====================================================================

So it says on the last line that it failed, but it looks like maybe it didn't... Now I'm really confused, but going to give it a try.

Show
D.I. von Briesen added a comment - Jean-Michel: I'm using 1.8.1 at the moment - trying to actually get the add-in to work before retrying. I think that this version requires php 5 anyway, right? OK, php info show 5.2.0 After some trials and tribulation, got the zip file from http://download.moodle.org/plugins/question/type/ and got the rendered match questions to finally show up. But now, of course, i'm right back where I started: ----------------------------------------------------------------------------------------------------------------------------------- Parsing questions from import file. Matching question types are not handled because the quiz question type 'Rendered Matching' does not exist in this installation of Moodle Omitted Question: Match the Latin numbers with the English symbols There are no questions in the import file An error occurred during import processing ------------------------------------------------------------------------------- So i'm thinking, in the process of trying to install this the database script ran, but then I updated the files, and it didn't run- so how can i force it to run again with the new files? So i started clicking links under admin, which gives me : Setting up plugin tables You are here
  • LMD
  • / ? Setting up plugin tables
This script generated 3 warnings - Scroll to the first warning renderedmatch plugin needs upgrading (mysql): CREATE TABLE mdl_question_renderedmatch ( id BIGINT(10) unsigned NOT NULL auto_increment, question BIGINT(10) unsigned NOT NULL DEFAULT 0, subquestions VARCHAR(255) NOT NULL DEFAULT '', shuffleanswers SMALLINT(4) NOT NULL DEFAULT 1, CONSTRAINT PRIMARY KEY (id) ) 1050: Table 'mdl_question_renderedmatch' already exists ADOConnection._Execute(CREATE TABLE mdl_question_renderedmatch ( id BIGINT(10) unsigned NOT NULL auto_increment, question BIGINT(10) unsigned N..., false) % line 889, file: adodb.inc.php ADOConnection.Execute(CREATE TABLE mdl_question_renderedmatch ( id BIGINT(10) unsigned NOT NULL auto_increment, question BIGINT(10) unsigned N...) % line 89, file: dmllib.php execute_sql(CREATE TABLE mdl_question_renderedmatch ( id BIGINT(10) unsigned NOT NULL auto_increment, question BIGINT(10) unsigned N..., true) % line 1899, file: dmllib.php execute_sql_arr(Array[4]) % line 548, file: ddllib.php install_from_xmldb_file(C:\xampplite\moodle/question/type/renderedmatch/db/install.xml) % line 102, file: adminlib.php ErrorScroll to next warning (mysql): ALTER TABLE mdl_question_renderedmatch COMMENT='Defines fixed renderedmatching questions' Success (mysql): CREATE TABLE mdl_question_renderedmatch_sub ( id BIGINT(10) unsigned NOT NULL auto_increment, question BIGINT(10) unsigned NOT NULL DEFAULT 0, questiontext TEXT NOT NULL, answertext VARCHAR(255) NOT NULL DEFAULT '', CONSTRAINT PRIMARY KEY (id) ) 1050: Table 'mdl_question_renderedmatch_sub' already exists ADOConnection._Execute(CREATE TABLE mdl_question_renderedmatch_sub ( id BIGINT(10) unsigned NOT NULL auto_increment, question BIGINT(10) unsign..., false) % line 889, file: adodb.inc.php ADOConnection.Execute(CREATE TABLE mdl_question_renderedmatch_sub ( id BIGINT(10) unsigned NOT NULL auto_increment, question BIGINT(10) unsign...) % line 89, file: dmllib.php execute_sql(CREATE TABLE mdl_question_renderedmatch_sub ( id BIGINT(10) unsigned NOT NULL auto_increment, question BIGINT(10) unsign..., true) % line 1899, file: dmllib.php execute_sql_arr(Array[4]) % line 548, file: ddllib.php install_from_xmldb_file(C:\xampplite\moodle/question/type/renderedmatch/db/install.xml) % line 102, file: adminlib.php Scroll to previous warningErrorScroll to next warning (mysql): ALTER TABLE mdl_question_renderedmatch_sub COMMENT='Defines the subquestions that make up a renderedmatching que' Success Scroll to previous warningInstalling renderedmatch FAILED!Scroll to continue button ==================================================================== So it says on the last line that it failed, but it looks like maybe it didn't... Now I'm really confused, but going to give it a try.
Hide
D.I. von Briesen added a comment -

Still no dice. Just to be safe i'm going to shut down xampp (running on localhost). Would a virgin install be of any help you think? Or is there a way to restart the DB updates from scratch?

Rebooted, and even went and created a rendered match question to be sure- was able to create it, but when i tried the import again, got the same error as before. I'm going to try another machine- these are all XP laptops running the xampp install.

In fact, i think i'm gonna do a clean install from scratch on this machine and see what happens first. Though open to ideas.

d.i.

Show
D.I. von Briesen added a comment - Still no dice. Just to be safe i'm going to shut down xampp (running on localhost). Would a virgin install be of any help you think? Or is there a way to restart the DB updates from scratch? Rebooted, and even went and created a rendered match question to be sure- was able to create it, but when i tried the import again, got the same error as before. I'm going to try another machine- these are all XP laptops running the xampp install. In fact, i think i'm gonna do a clean install from scratch on this machine and see what happens first. Though open to ideas. d.i.
Hide
D.I. von Briesen added a comment -

I was unable to create a question backup of this question type. I tried to export it as moodle xml, and as GIFT, but both failed. This got me concerned that all of this was for nought - converting wont do any good if we can't backup and restore the work we've done. So i tried a course backup and restore, and that worked.

But in talking to my wife, she says these are just plain 'ol matching questions - and the rendering part is irrelevant.

So the question is, is it possible that BB questions that say rendered matching are really just matching, and we could somehow get it to just accept them as such? I'd just as soon stay away from all this add-in module nonsense if i can, but we're kinda desperate to automate this - between having courses with over 80 quizzes, having true-falses all coming in true, having no point values converting, having to do files one at a time, and now this- it's enough to make you wanna go back to paper!

Open to ideas and suggestions!
d.i.

Show
D.I. von Briesen added a comment - I was unable to create a question backup of this question type. I tried to export it as moodle xml, and as GIFT, but both failed. This got me concerned that all of this was for nought - converting wont do any good if we can't backup and restore the work we've done. So i tried a course backup and restore, and that worked. But in talking to my wife, she says these are just plain 'ol matching questions - and the rendering part is irrelevant. So the question is, is it possible that BB questions that say rendered matching are really just matching, and we could somehow get it to just accept them as such? I'd just as soon stay away from all this add-in module nonsense if i can, but we're kinda desperate to automate this - between having courses with over 80 quizzes, having true-falses all coming in true, having no point values converting, having to do files one at a time, and now this- it's enough to make you wanna go back to paper! Open to ideas and suggestions! d.i.
Hide
D.I. von Briesen added a comment -

I did a fresh install of the add-in (to a machine where i'd not yet mucked with those files) and it did the SQL with no errors, but gave the same error when i tried to import the BB file.

Do you think it would be any help to instead try to do this with 1.6? I could install that...

Also, probably best to change the title of this bug to include words rendered matching, since it seems geared towards that specifically, not just matching.

Show
D.I. von Briesen added a comment - I did a fresh install of the add-in (to a machine where i'd not yet mucked with those files) and it did the SQL with no errors, but gave the same error when i tried to import the BB file. Do you think it would be any help to instead try to do this with 1.6? I could install that... Also, probably best to change the title of this bug to include words rendered matching, since it seems geared towards that specifically, not just matching.
Hide
Jean-Michel Vedrine added a comment -

When I said that I have added backup/restore to renderedmatch questiontype I was speaking of course backup/restore, at present it is not possible for a non core questiontype to be included in import/export (either moodle XML, gift, ...) this is bug MDL-6367 and it is not fixed so it is quite "normal" you didn't succeed in exporting you renderedmatch questions.
But if your question/type/renderedmatch/questiontype.php is version 1.3 and course backup/restore aren't working, please tell it to me because it should work.
My suggestions

  • Moodle 1.8+ is fine, don't downgrade !!
  • install renderedmatch (as you are running Moodle 1.8+ the files you get from http://download.moodle.org/plugins/question/type/renderedmatch.zip are fine) and go to admin to create the tables
  • verify everything is working by creating, editing, including in some tests, ... some renderedmatch questions
  • when you are sure everything is working with renderedmatch questions, try to import some BB files
  • if you still have the same error, try to change the line
    if (!empty($QTYPES['renderedmatch'])) {
    to
    if (array_key_exists ( 'renderedmatch' , $QTYPES )) {
    in the question/format/blackboard_6/format.php file version 1.12 that you can download on this page http://moodle.cvs.sourceforge.net/moodle/moodle/question/format/blackboard_6/format.php?view=log
    and test if it make a difference.
    with this change your "Match the Latin numbers with the English symbols " question is perfectly imported (and working, it seems, I don't speak latin language at all ) on my machine.
    The differences between match and renderedmatch questions are :
  • the answers aren't in a dropdown menu, there are in a table with just A, B, C, D in the menu. This is quite interesting for instance if the answers are rather long of use images (as a math teacher this permit me to include formulas in the answers)
  • it is possible to have distractors (more answers than necessary)
Show
Jean-Michel Vedrine added a comment - When I said that I have added backup/restore to renderedmatch questiontype I was speaking of course backup/restore, at present it is not possible for a non core questiontype to be included in import/export (either moodle XML, gift, ...) this is bug MDL-6367 and it is not fixed so it is quite "normal" you didn't succeed in exporting you renderedmatch questions. But if your question/type/renderedmatch/questiontype.php is version 1.3 and course backup/restore aren't working, please tell it to me because it should work. My suggestions
  • Moodle 1.8+ is fine, don't downgrade !!
  • install renderedmatch (as you are running Moodle 1.8+ the files you get from http://download.moodle.org/plugins/question/type/renderedmatch.zip are fine) and go to admin to create the tables
  • verify everything is working by creating, editing, including in some tests, ... some renderedmatch questions
  • when you are sure everything is working with renderedmatch questions, try to import some BB files
  • if you still have the same error, try to change the line if (!empty($QTYPES['renderedmatch'])) { to if (array_key_exists ( 'renderedmatch' , $QTYPES )) { in the question/format/blackboard_6/format.php file version 1.12 that you can download on this page http://moodle.cvs.sourceforge.net/moodle/moodle/question/format/blackboard_6/format.php?view=log and test if it make a difference. with this change your "Match the Latin numbers with the English symbols " question is perfectly imported (and working, it seems, I don't speak latin language at all ) on my machine. The differences between match and renderedmatch questions are :
  • the answers aren't in a dropdown menu, there are in a table with just A, B, C, D in the menu. This is quite interesting for instance if the answers are rather long of use images (as a math teacher this permit me to include formulas in the answers)
  • it is possible to have distractors (more answers than necessary)
Hide
Howard Miller added a comment -

I'm not sure we are all on the same page here

A couple of observations:

  • This bug was reported against version 1.8.1 which is what I tested it against and (granted using PHP5) for which the solution works for me (and Jean-Michel too it seems)
  • This is nothing whatsoever to do with backup and restore
  • Although there is no "automatic" mechanism for including plugins in import and export, in this case the BB6 importer has been written with the expectation of the renderedmatch plugin being present, so clearly it needs to be there and been tested to be working properly as Jean-Michele describes.
  • I forgot to change that test, I'll do it now.
Show
Howard Miller added a comment - I'm not sure we are all on the same page here A couple of observations:
  • This bug was reported against version 1.8.1 which is what I tested it against and (granted using PHP5) for which the solution works for me (and Jean-Michel too it seems)
  • This is nothing whatsoever to do with backup and restore
  • Although there is no "automatic" mechanism for including plugins in import and export, in this case the BB6 importer has been written with the expectation of the renderedmatch plugin being present, so clearly it needs to be there and been tested to be working properly as Jean-Michele describes.
  • I forgot to change that test, I'll do it now.
Hide
Howard Miller added a comment -

I'm going to mark this as resolved as I'm reasonably sure that it's ok. If there are still problems please reopen with suitable information to reproduce the issue.

Thanks!

Show
Howard Miller added a comment - I'm going to mark this as resolved as I'm reasonably sure that it's ok. If there are still problems please reopen with suitable information to reproduce the issue. Thanks!

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: