Cristopher Ewing
2010-04-15 00:12:57 UTC
[reposting after fixing my subscription email address, apologies]
Greetings,
Apologies for coming late to this discussion, but I've just gotten a customer who wants to migrate quizzes from their current site into a new site we're building for them in Plone. ECQuiz appears to be the only product out there with the ability to do this easily.
Unfortunately, it appears that the qti import functionality is not working as one might expect. I can upload a zip file as exported from the other system, but the upload does nothing.
I'm currently playing with plone 3.3.5 and ECQuiz 1.2.1b1dev-r158 as found at pypi (installed via buildout as an egg).
Here's what I'm finding:
in Products.ECQuiz.qti.importPackage the list of files in the ZipFile from the form upload is derived like so:
fileNameList = [context.unicodeDecode(f.filename) for f in zipFileObject.filelist]
In my case here, that returns a list of unicode strings something like this:
[u'quiz-arthritis-arthritis_arthritis_-20100414-1221/',
u'quiz-arthritis-arthritis_arthritis_-20100414-1221/imsmanifest.xml',
u'quiz-arthritis-arthritis_arthritis_-20100414-1221/question1.xml',
u'quiz-arthritis-arthritis_arthritis_-20100414-1221/question10.xml',
...]
as you can see, the filenames seen here all include the name of the folder that was first turned into the zipfile archive by the qti exporter in the other system (which I have no control over). When ECQuiz tries to find a manifest for this package, the following code is used:
manifestFnList = [fn for fn in fileNameList if fn.lower() == MANIFEST_FILE_NAME]
where MANIFEST_FILE_NAME is u'imsmanifext.xml'. I'm sure you can see that this is going to fail, since although I do have a manifest in my zipfile archive, its name includes the name of the containing folder. If I change the above to this:
manifestFnList = [fn for fn in fileNameList if MANIFEST_FILE_NAME in fn.lower()]
then I get a manifest and the processing fails a bit further on. The problem at that point is also that the names of the xml files for each resource in my quiz as indexed by the zipfile include the name of the containing folder, whereas the names of the resources as listed in the manifest xml code look like this:
u'./question1.xml'
so when we reach the point where the resources are read from the zip file here in qti.py:
def readFromZip(context, zipFileObject, fileName, errors):
...
contents = None
firstException = None
try:
# Read the resource from the zip file
contents = zipFileObject.read(fileName)
except Exception, e:
firstException = e
I end up with nothing, because the filename passed in is u'./question1.xml', but the file is indexed by the zipfile as uploaded with u'quiz-arthritis-arthritis_arthritis_-20100414-1221/question1.xml'.
I could probably figure out a work-around for this one, too, at which point I suspect the import would work fine, but I'd really like to contribute this fix to the product. Here's where the second part of my subject comes into play.
Back in January of 2009 a plea was made to move the repository for the eduComponents code to the plone collective (http://listserv.uni-magdeburg.de/pipermail/educomponents/2009-January/000265.html). After a bit of hopeful-looking thread, it came back that that would not happen, and instead a read-only repository was set up (http://listserv.uni-magdeburg.de/pipermail/educomponents/2009-February/000276.html, http://listserv.uni-magdeburg.de/pipermail/educomponents/2009-February/000277.html).
At this point, the package has been turned into an egg, but in addition to the problem above, there are any number of plone2 code ghosts left over that still need to be excised in order for ECQuiz to be truly plone3 compatible (instead of simply plone3 installable as is currently the case). By running a full diff between the current trunk and the released egg in pypi, I can see that someone has changed a few of these, but there are a lot more to go.
Because the code is in a closed repository, there is currently no way for me to directly contribute the fixes I'd like to make. Furthermore, because the closed repository has no browsing capability (at least none that I can find, and no announcement appears to have been made to this list regarding any), I have no way other than laborious manual file diffs to figure out if the problems I'm seeing have been fixed by anyone else and simply have yet to be released or if I really need to spend my time fixing them.
It's fine and good to ask folks to submit patches, but for any sort of reasonable forward motion to occur, this project is going to need to move out in the open. I'd strongly agree with the opinion expressed in this post:
http://listserv.uni-magdeburg.de/pipermail/educomponents/2009-January/000271.html
Limited development resources are certainly best concentrated on a single project rather than spread across forked versions. May I respectfully renew the call for the code for ECQuiz to be released to the collective so that those of us out here in the education community who need a tool like this can push it forward with a sane development workflow model? Submitting patches for problems that may or may not yet have been fixed and hoping they'll eventually make it into a release when the last release was more than a year ago is not healthy to one's sense of enthusiasm.
Thanks for listening this far,
With respect for the work done on this valuable tool
Cris
********************************
Cris Ewing
Webmaster, Lead Developer
Department of Radiology Web Services
University of Washington
School of Medicine
Work Phone: (206) 616-1288
Cell Phone: (206) 708-9083
E-mail: ***@u.washington.edu
Web: http://www.rad.washington.edu
*******************************
Greetings,
Apologies for coming late to this discussion, but I've just gotten a customer who wants to migrate quizzes from their current site into a new site we're building for them in Plone. ECQuiz appears to be the only product out there with the ability to do this easily.
Unfortunately, it appears that the qti import functionality is not working as one might expect. I can upload a zip file as exported from the other system, but the upload does nothing.
I'm currently playing with plone 3.3.5 and ECQuiz 1.2.1b1dev-r158 as found at pypi (installed via buildout as an egg).
Here's what I'm finding:
in Products.ECQuiz.qti.importPackage the list of files in the ZipFile from the form upload is derived like so:
fileNameList = [context.unicodeDecode(f.filename) for f in zipFileObject.filelist]
In my case here, that returns a list of unicode strings something like this:
[u'quiz-arthritis-arthritis_arthritis_-20100414-1221/',
u'quiz-arthritis-arthritis_arthritis_-20100414-1221/imsmanifest.xml',
u'quiz-arthritis-arthritis_arthritis_-20100414-1221/question1.xml',
u'quiz-arthritis-arthritis_arthritis_-20100414-1221/question10.xml',
...]
as you can see, the filenames seen here all include the name of the folder that was first turned into the zipfile archive by the qti exporter in the other system (which I have no control over). When ECQuiz tries to find a manifest for this package, the following code is used:
manifestFnList = [fn for fn in fileNameList if fn.lower() == MANIFEST_FILE_NAME]
where MANIFEST_FILE_NAME is u'imsmanifext.xml'. I'm sure you can see that this is going to fail, since although I do have a manifest in my zipfile archive, its name includes the name of the containing folder. If I change the above to this:
manifestFnList = [fn for fn in fileNameList if MANIFEST_FILE_NAME in fn.lower()]
then I get a manifest and the processing fails a bit further on. The problem at that point is also that the names of the xml files for each resource in my quiz as indexed by the zipfile include the name of the containing folder, whereas the names of the resources as listed in the manifest xml code look like this:
u'./question1.xml'
so when we reach the point where the resources are read from the zip file here in qti.py:
def readFromZip(context, zipFileObject, fileName, errors):
...
contents = None
firstException = None
try:
# Read the resource from the zip file
contents = zipFileObject.read(fileName)
except Exception, e:
firstException = e
I end up with nothing, because the filename passed in is u'./question1.xml', but the file is indexed by the zipfile as uploaded with u'quiz-arthritis-arthritis_arthritis_-20100414-1221/question1.xml'.
I could probably figure out a work-around for this one, too, at which point I suspect the import would work fine, but I'd really like to contribute this fix to the product. Here's where the second part of my subject comes into play.
Back in January of 2009 a plea was made to move the repository for the eduComponents code to the plone collective (http://listserv.uni-magdeburg.de/pipermail/educomponents/2009-January/000265.html). After a bit of hopeful-looking thread, it came back that that would not happen, and instead a read-only repository was set up (http://listserv.uni-magdeburg.de/pipermail/educomponents/2009-February/000276.html, http://listserv.uni-magdeburg.de/pipermail/educomponents/2009-February/000277.html).
At this point, the package has been turned into an egg, but in addition to the problem above, there are any number of plone2 code ghosts left over that still need to be excised in order for ECQuiz to be truly plone3 compatible (instead of simply plone3 installable as is currently the case). By running a full diff between the current trunk and the released egg in pypi, I can see that someone has changed a few of these, but there are a lot more to go.
Because the code is in a closed repository, there is currently no way for me to directly contribute the fixes I'd like to make. Furthermore, because the closed repository has no browsing capability (at least none that I can find, and no announcement appears to have been made to this list regarding any), I have no way other than laborious manual file diffs to figure out if the problems I'm seeing have been fixed by anyone else and simply have yet to be released or if I really need to spend my time fixing them.
It's fine and good to ask folks to submit patches, but for any sort of reasonable forward motion to occur, this project is going to need to move out in the open. I'd strongly agree with the opinion expressed in this post:
http://listserv.uni-magdeburg.de/pipermail/educomponents/2009-January/000271.html
Limited development resources are certainly best concentrated on a single project rather than spread across forked versions. May I respectfully renew the call for the code for ECQuiz to be released to the collective so that those of us out here in the education community who need a tool like this can push it forward with a sane development workflow model? Submitting patches for problems that may or may not yet have been fixed and hoping they'll eventually make it into a release when the last release was more than a year ago is not healthy to one's sense of enthusiasm.
Thanks for listening this far,
With respect for the work done on this valuable tool
Cris
********************************
Cris Ewing
Webmaster, Lead Developer
Department of Radiology Web Services
University of Washington
School of Medicine
Work Phone: (206) 616-1288
Cell Phone: (206) 708-9083
E-mail: ***@u.washington.edu
Web: http://www.rad.washington.edu
*******************************