Permalink
Browse files

make sure imsmanifest.xml is processed first in a directory

refs #8051

Change-Id: I82c2a9827a10e352e57b3c0f7168987843786c32
Reviewed-on: https://gerrit.instructure.com/11822
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
  • Loading branch information...
bracken committed Jun 25, 2012
1 parent 5d2277e commit ca48b977b0265d2fe55140ea8521ded0d4d0de68
Showing with 7 additions and 0 deletions.
  1. +7 −0 lib/imsqtiv1.py
View
@@ -6199,6 +6199,13 @@ def ProcessFiles (self,basepath,files):
if os.path.isdir(path):
print "Processing directory: : "+path
children=os.listdir(path)
+ # see if there is an imsmanifest and process it first
+ # The order of the rest doesn't mater
+ for i, v in enumerate(children):
+ if v == "imsmanifest.xml":
+ if i:
+ children[0], children[i] = children[i], children[0]
+ break
self.ProcessFiles(path,children)
elif fileName[-4:].lower() in ['.xml', '.dat', '.qti']:
print "Processing file: "+path

0 comments on commit ca48b97

Please sign in to comment.