Moodle 1.5 Blackboard import

Moodle 1.5 Blackboard import

by Michael Penney -
Number of replies: 33
We can't seem to get this to work in the latest builds, using BB 6.1 files. Is there someone working on this or should we try to get it fixed ourselves?
Average of ratings: -
In reply to Michael Penney

Re: Moodle 1.5 Blackboard import

by Ziba Scott -
Hi,
I imported both Bb5 and Bb6 files using the latest CVS and the only problem I ran into was a general mod/resource/restorelib.php bug.  (There's a missing left paren on line 85 in cvs.)

Both courses imported fine for me, though Bb6 still only imports basic text items.

What happens when you try to import a Bb 6.1 file?
In reply to Ziba Scott

Re: Moodle 1.5 Blackboard import

by Michael Penney -
Both courses imported fine for me, though Bb6 still only imports basic text items.

So no quiz items supported? The BB import in quiz is also not working for us, I guess that would be the best place to focus.

What happens when you try to import a Bb 6.1 file?

Different errors. Right now I'm getting :

You need the XSLT library installed in PHP to open this Blackboard file

Using php 5.0.2 with:

xml

XML Support active
XML Namespace Support active
libxml2 Version 2.6.11

xsl

XSL enabled
libxslt Version 1.1.7
libxslt compiled against libxml Version 2.6.11
EXSLT enabled
libexslt Version

In reply to Ziba Scott

Re: Moodle 1.5 Blackboard import

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Ziba,

such missing parenthesis was my fault, sorry. sad Now it's solved (thanks, Martin!) and it will be available in the next daily build.

Ciao smile
In reply to Michael Penney

Re: Moodle 1.5 Blackboard import

by Michael Skwara -

I have been working on testing the importation of Blackboard courses and tests on Moodle 1.5.  I have been able to import BB5.5 question pools through the import oprion in the quiz module, but have had no luck with BB6.

  I believe this is because between version 5 and 6, Blackboard has changed the format in which it exports quizzes/tests.  While both 5.5 and 6 exported question pools take the form of XML files, they do not have much in common.  For example, the first tag in a 5.5 question pool file is <POOL>, while the first tag in a version 6 exported question pool is <questestinterop>, and it doesn't get much more similar from there.  This leads me to believe that Blackboard is now using the IMS QTI format for question pools.  At this time, the IMS QTI import option in Moodle is placeholder for a feature hopefully added in the future.

  So, unless I am mistaken, the "Blackboard" test import option in the quiz module is more accurately a "Blackboard 5" function.

-Michael   

In reply to Michael Skwara

Re: Moodle 1.5 Blackboard import

by Michael Penney -
Hi Michael, one of our programmers, Jeff Graham, is fixing the import for Blackboard 6.1 as we speak.

We should have something ready for testing next week or so.


In reply to Michael Penney

Re: Moodle 1.5 Blackboard import

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Cool!  Courses or quizzes?
In reply to Martin Dougiamas

Re: Moodle 1.5 Blackboard import

by Michael Penney -
Just question pools for now (that seems like the hardest part?).

Man that is some ugly XML, but generally it looks like it's going to work ok, Jeff is trying to get the MathML to come over now (using the filter in contrib), and then images. We're coding this against 1.4.4, so hopefully there will be backwards compatability in the import structure in 1.5?

Yesterday it was mostly working, 2 problems at this point:
  • BB Essay questions: we plan to map them to the essay question type Mark Nielson coded up, or is there going to be a new one in 1.5 (haven't seen it in dev)?.
  • BB matching which allows 2 choices, while Moodle needs 3--we'll have to throw an error for these unless someone can code up a "Blackboard matching question"?
The BB XML contains some info. that doesn't make any sense to us at all, so there will have to be testing to make sure it's working 100%.
In reply to Michael Penney

Re: Moodle 1.5 Blackboard import

by Zbigniew Fiedorowicz -
Jeff is trying to get the MathML to come over now (using the filter in contrib), and then images.

That filter depends on the Xalan XSLT processor, which is Linux only, and even there a challenge to install, as it has many nonstandard dependencies. Unless you've found a simpler alternative to Xalan?

You might want to get in touch with Davide Cervone of Union College. He coded a Javascript filter for rendering Latex in Javascript, which is also in contrib.  While that script won't work with MathML, he has variants that do work.
In reply to Michael Penney

Re: Moodle 1.5 Blackboard import

by Michael Skwara -

That's great!  I have been trying to get question pools across by re-formating them in Respondus, but haven't had much success.  The ability to import 6.1 question pools would be a great thing to take to faculty who are concerned about having to recreate all or large parts of their courses for a potential LMS migration.

Thanks for the good news, Michael!

In reply to Michael Skwara

Re: Moodle 1.5 Blackboard import

by Bob Puffer -
Just a note that may not apply to your case -- exporting BB quizzes and importing to Moodle was a big issue with us until I wrote a script that scraped statistics and found out we had only twelve courses out of approximately 600 that used Blackboard's quiz functionality.  At that point, it ceased being an issue with the faculty.
In reply to Bob Puffer

Re: Moodle 1.5 Blackboard import

by Mark Stevens -
Bob,

Very interesting post.  Would you be able to share the script that you wrote to find out how many courses used Bb's quizzes?  I think many people would be curious about the data that it produces.
In reply to Michael Penney

Re: Moodle 1.5 Blackboard import

by Walter Literowich -

I am Trying Jeff's BB-6 import  and am getting :

Fatal error: Cannot instantiate non-existent class: quiz_format_blackboard_6_pool_import in c:\program files\nusphere\techplat\apache\htdocs\moodle\mod\quiz\locallib.php on line 2030

any Ideas ?

In reply to Walter Literowich

Re: Moodle 1.5 Blackboard import

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Are you using 1.5dev? The naming convention for the import/export class was changed in order to make the list of available formats correct. Where are getting Jeff's code from? Is this different from the blackboard import that is in Moodle at the moment? I haven't been following this one - sorry!

Basically, you will need to change the class definition in blackboard_6_pool_import/format.php to what it says in the error - quiz_format_blackboard_6_pool_import (the last bit has to match the directory name).

You will also need to add a new method to the class...

function provide_import() {
return true;
}



BUT... there have been other changes in quizzes that break old import/export routines in more subtle ways. If someone gives me the code (quickly - on holiday next week), and some comprehensive sample data I will have a look.
In reply to Howard Miller

Re: Moodle 1.5 Blackboard import

by Walter Literowich -
yes  1.5 dev  the code came from  moodle/contrib
In reply to Walter Literowich

Re: Moodle 1.5 Blackboard import

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Ok - I'll look later on. Quiz code was changed about a week ago. If your dev version is newer than that and the Blackboard import has not been updated to suit then it won't work. It sounds like it was developed early in the 1.5dev cycle - there have been lots of changes since.
In reply to Walter Literowich

Re: Moodle 1.5 Blackboard import

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Ahh... I think I have got it... the code *is* correct, but it is vital that you put the code in mod/quiz/format/blackboard_6/format.php

That last directory name (format_6) really matters!
In reply to Howard Miller

Re: Moodle 1.5 Blackboard import

by Walter Literowich -

Seems to work  in BB 6.0 

in a Spanish Quiz  there are problems in the character  ie  países ,opinión ,pública

19 ( 39)
Marks:
--/1

El terrorismo y las prácticas terroristas tienen el objetivo de:

Answer:  
Mantener los países enemigo bajo control" name="resp39_" />a.

Mantener los países enemigo bajo control

Manipular la opinión pública" name="resp39_" />b.

Manipular la opinión pública

Lograr el poder que de otra manera no se lograría." name="resp39_" />c.

Lograr el poder que de otra manera no se lograría.

In reply to Walter Literowich

Re: Moodle 1.5 Blackboard import

by Walter Literowich -

That last posting did  not work very well

What I wanted to say is the BB6.0  worked well ,However the Spanish quiz had  problems with the  words  as an example 

Question

b. Manipular la opinión pública , c. Lograr el poder que de otra manera no se lograría
In reply to Walter Literowich

Re: Moodle 1.5 Blackboard import

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Errr.... ??????

I'm English remember, we are lucky we speak our own language, never mind anybody elses smile

In reply to Howard Miller

Re: Moodle 1.5 Blackboard import

by Walter Literowich -

Having problems entering the messages in this forum - hence my cryptic  message

What I wanted to say and point out is that BB60 import works fine for me but, that certain characters in Spanish  and perhaps other language sets are not being translated properly -example:

El terrorismo y las prácticas terroristas tienen el objetivo de:

Answer:   
a. Mantener los países enemigo bajo control 
b. Manipular la opinión pública 
c. Lograr el poder que de otra manera no se lograría.
 

In reply to Walter Literowich

Re: Moodle 1.5 Blackboard import

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
PHP isn't very good with 'foreign' character sets (ie, non ASCII). You basically have to make sure that the editor that created the file is using 'exactly' the same character encoding as *your* moodle installation. Moodle uses iso-8859-1 for Spanish, which is normally the default. My guess is that your editor is set to Unicode (UTF-8 probably).
In reply to Howard Miller

Re: Moodle 1.5 Blackboard import

by Walter Literowich -

"the editor that created the file"     what editor are you referring to?

 The quiz was imported from blackboard where it mapped the characters properly. 

I would have expected that the import program would have mapped the characters properly from BB.

They did not map properly and thus the problem of  character errors in the Moodle quiz.

Or am I making an assumption  that does not make sense?

In reply to Walter Literowich

Re: Moodle 1.5 Blackboard import

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I actually haven't seen one of these blackboard files, so I am guessing a bit. IIRC they are XML files, yes? If you open the file in an editor and look at the top you may see something like 'encoding=utf8'. I understand blackboard is some crazy mix of Java, .Net and Perl so this would make sense. PHP, on the other hand, doesn't 'get' utf-8 (natively) and expects the file to be in 'encoding=iso-8859-1' which would explain the mismatch and the screwed up characters. I haven't seen the code, but if it was written by someone in an English speaking country then they may well not have catered for this (it's quite hard to do too). You can't just change the encoding string in the file either, you actually need to run the whole file through some sort of converter. If you have a Linux box at your disposal, the command line 'iconv' works well. .

I stress that I am guessing what has happened here, having seen neither the exported file or the code, but if I was a betting man.....

In reply to Howard Miller

Re: Moodle 1.5 Blackboard import

by Michael Penney -
Hi Howard, BB exports to a zip file with images and XML, which Jeff's importer opens. The ?s are stored in a (horribly constructed) XML file.

It might work to open the BB zip, extract the XML file, convert the characters, then re-insert the XML file into the zip before importing.


In reply to Howard Miller

Re: Moodle 1.5 Blackboard import

by Walter Literowich -

Tried your suggestion ...now nothings works 

i.e. no reponce from the import  -- blank screen

In reply to Howard Miller

Re: Moodle 1.5 Blackboard import

by Michael Penney -
Hi Howard, the code is in CVS/contrib, it's for 1.5, and it imports BB 6.1 quiz pools. Note we also had to do a new question type, a modification of matching, since BB 6 matching is much different from Moodle matching.

The importer will also check for the essay question type, but if you don't have either it should throw a (non-fatal) error letting you know those types can't be imported.

PS it's enourmously different from BB 5.5 (I believe that is what the code in Moodle standard imports?), the exported 6.1 XML has some nested ifs that approach the limits of comprehension.surprise


In reply to Michael Penney

Re: Moodle 1.5 Blackboard import

by Michael Penney -
PS just isntalling it on last night's Moodle dev & importing a BB 6.1 pool, and it works IF you change the name of the directory to blackboard_6. Must be some problem with the multiple _'s in the original name?
In reply to Walter Literowich

Re: Moodle 1.5 Blackboard import

by Jeff Graham -
Sorry for the confusion.

There is a folder inside "blackboard_6_pool_import" called "blackboard_6" that is what should be dropped in mod/quiz/format




In reply to Jeff Graham

Re: Moodle 1.5 Blackboard import

by Fawaz Shareef -

I tried to import a quiz from Blackboard 6 file and here is the error I got.

Notice: Undefined index: filename_len in C:\websites\moodle\lib\pclzip\pclzip.lib.php on line 3953

Notice: Undefined index: filename_len in C:\websites\moodle\lib\pclzip\pclzip.lib.php on line 3953

Notice: Undefined index: filename_len in C:\websites\moodle\lib\pclzip\pclzip.lib.php on line 3953

Notice: Undefined index: filename_len in C:\websites\moodle\lib\pclzip\pclzip.lib.php on line 3953

Notice: Use of undefined constant item - assumed 'item' in C:\websites\moodle\mod\quiz\format\blackboard_6\format.php on line 212

Fatal error: Cannot use string offset as an array in C:\websites\moodle\mod\quiz\format\blackboard_6\format.php on line 352

I am using Moodle 1.6 which I got from the CVS and I have added the blackboard_6 import directory and RENDEREDMATCH patches to my version of Moodle.

Any clues why this is happening?

In reply to Fawaz Shareef

Re: Moodle 1.5 Blackboard import

by Trung Vo -

I think you ran into version mismatch problem. I guess blackboard_6 import doesn't work w/ 1.6. I'm using 1.5.2 w/ blackboard_6 import and it works fine.