Exemple #1
0
 private static void StoreTestControl(WebControl.WebControlBase c, int pageRef, XmlNode questionAnswerNode, string pathToTempCourseFolder)
 {
     StoreQuestion(((WebTestControlBase)c).Id, pageRef, c.Name,
                   GetAnswer(questionAnswerNode), GetRank(questionAnswerNode));
     if (c is WebCodeSnippet)
     {
         FilesManager.StoreAllPageFiles(pageRef, Path.Combine(pathToTempCourseFolder, c.Name) + FileExtentions.WordHtmlFolder);
     }
 }
Exemple #2
0
        public static void Import(XmlNode node, int themeId, ProjectPaths projectPaths)
        {
            string fileName = Path.Combine(projectPaths.PathToTempCourseFolder, XmlUtility.GetIdentifierRef(node) + FileExtentions.Html);

            byte[] file = File.ReadAllBytes(fileName);
            int    id   = Store(themeId, XmlUtility.GetIdentifier(node), file);

            FilesManager.StoreAllPageFiles(id, fileName);
        }
Exemple #3
0
        public static void Import(int pageRef, XmlNode answerNode, List <WebControlBase> tests, string pathToTempCourseFolder)
        {
            foreach (WebControlBase c in tests)
            {
                if (c is WebTestControlBase)
                {
                    StoreTest(c, answerNode, pageRef);
                }

                if (c is WebCodeSnippet)
                {
                    FilesManager.StoreAllPageFiles(pageRef,
                                                   Path.Combine(pathToTempCourseFolder, c.Name) +
                                                   FileExtentions.WordHtmlFolder);
                }
            }
        }