add course info

This commit is contained in:
Chris Danford
2004-05-22 19:49:40 +00:00
parent 4f2f1b46ae
commit 88564f6b24
+19 -2
View File
@@ -16,6 +16,7 @@
#include "song.h"
#include "Steps.h"
#include "XmlFile.h"
#include "Course.h"
const CString CATALOG_XML = "Catalog.xml";
@@ -58,7 +59,23 @@ void SaveCatalogXml( CString sDir )
}
}
// bool bSaved =
vector<Course*> vpCourses;
SONGMAN->GetAllCourses( vpCourses, false );
for( unsigned i=0; i<vpCourses.size(); i++ )
{
Course* pCourse = vpCourses[i];
CourseID courseID;
courseID.FromCourse( pCourse );
XNode* pCourseNode = courseID.CreateNode();
xml.AppendChild( pCourseNode );
pCourseNode->AppendChild( "Title", pCourse->m_sName );
pCourseNode->AppendChild( "HasMods", pCourse->HasMods() );
}
xml.SaveToFile(fn);
LOG->Trace( "Done." );
}