Beispiel #1
0
        private static void StoreTest(WebControlBase c, XmlNode answerNode, int pageRef)
        {
            XmlNode questionAnswerNode = GetTestAnswerNode(answerNode, ((WebTestControlBase) c).AnswerIndex);

            if(c is WebCompiledTest)
            {
                StoreCompiledTestControl(c, pageRef, questionAnswerNode);
            }
            else
            {
                StoreControl(c, pageRef, questionAnswerNode);
            }
        }
Beispiel #2
0
        private void Parse(XmlNode node)
        {
            WebControlBase c = GetControlForParse(node);

            if (c != null)
            {
                c.Parse(node);
                if (c is WebTestControlBase)
                {
                    (c as WebTestControlBase).AnswerIndex = _answersIndexes[c.Name];
                }

                Controls.Add(c);
            }
            else if (node.HasChildNodes)
            {
                foreach (XmlNode childNode in node.ChildNodes)
                {
                    Parse(childNode);
                }
            }
        }
Beispiel #3
0
 private static void StoreCompiledTestControl(WebControlBase c, int pageRef, XmlNode questionAnswerNode)
 {
     StoreCompiledQuestion(((WebTestControlBase) c).Id, pageRef, c.Name,
                           CompiledQuestionManager.Import(questionAnswerNode), GetRank(questionAnswerNode));
 }
Beispiel #4
0
 private static void StoreControl(WebControlBase c, int pageRef, XmlNode questionAnswerNode)
 {
     StoreQuestion(((WebTestControlBase) c).Id, pageRef, c.Name,
                   GetAnswer(questionAnswerNode), GetRank(questionAnswerNode));
 }