Permalink
Browse files

Made the output go into subfolders

  • Loading branch information...
1 parent dba81fa commit 22ee5195bc22e86beb831e1139aeef8794b9f295 @bracken bracken committed Jan 29, 2010
Showing with 6 additions and 4 deletions.
  1. +1 −1 example_run.sh
  2. +2 −0 lib/imscp.py
  3. +3 −3 lib/imsqtiv1.py
View
@@ -1,2 +1,2 @@
#!/bin/bash
-./migrate.py --ucvars --nogui --overwrite --cpout=assessments/ assessments/orig/
+./migrate.py --ucvars --nogui --overwrite --cpout=assessments/out/ assessments/orig/
View
@@ -98,6 +98,8 @@ def GetLOM (self):
def DumpToDirectory (self,path):
if not os.path.exists(path):
os.mkdir(path)
+ os.mkdir(os.path.join(path,"assessmentTests"))
+ os.mkdir(os.path.join(path,"assessmentItems"))
assert os.path.isdir(path)
manifestPath=os.path.join(path,'imsmanifest.xml')
f=open(manifestPath,'w')
View
@@ -498,7 +498,7 @@ def __init__(self,name,attrs,parent):
# Set the name of the file
cp=self.GetRoot().cp
# Reserve space for our preferred file name
- self.fName=cp.GetUniqueFileName("assmnt_"+self.resource.id+".xml")
+ self.fName=cp.GetUniqueFileName(os.path.join("assessmentTests","assmnt_"+self.resource.id+".xml"))
self.files={}
def SetAttribute_ident (self,value):
@@ -852,7 +852,7 @@ def __init__(self,name,attrs,parent):
# Set the name of the file
cp=self.GetRoot().cp
# Reserve space for our preferred file name
- self.fName=cp.GetUniqueFileName(self.clean_linkrefid+".xml", dont_save=True)
+ self.fName=cp.GetUniqueFileName(os.path.join("assessmentItems", self.clean_linkrefid+".xml"), dont_save=True)
def AddData (self,data):
self.data=self.data+data
@@ -907,7 +907,7 @@ def __init__(self,name,attrs,parent):
# Set the name of the file
cp=self.GetRoot().cp
# Reserve space for our preferred file name
- self.fName=cp.GetUniqueFileName(self.resource.id+".xml")
+ self.fName=cp.GetUniqueFileName(os.path.join("assessmentItems", self.resource.id+".xml"))
self.files={}
def SetAttribute_maxattempts (self,value):

0 comments on commit 22ee519

Please sign in to comment.