Example #1
0
        /// <summary>
        /// Main entry point for creating Sequencing object.
        /// </summary>
        /// <param name="item"><see cref="ItemType"/> value to customize default sequencing srategy for.</param>
        /// <returns>SequencingType value with default sequencing strategy elements for current item.</returns>
        public static SequencingType CreateNewSequencing([NotNull]ItemType item)
        {
            PageType pageType = item.PageType;
            SequencingType result = new SequencingType();

            switch (pageType)
            { 
                case PageType.Chapter:
                    item.SequencingPatterns.Add(new ChapterDefaultSequencingPattern());
                    //CustomizeChapter(ref result);
                    break;
                case PageType.ControlChapter:
                    item.SequencingPatterns.Add(new ControlChapterDefaultSequencingPattern());  
                    // CustomizeControlChapter(ref result);
                    break;
                case PageType.Question:
                    CustomizeQuestionPage(ref result);
                    break;
                case PageType.Theory:
                    CustomizeTheoryPage(ref result);
                    break;
                default:
                    
                    break;
            }

            CustomizePrimaryObjectives(ref result, item.Identifier);

            return result;
        }
Example #2
0
        public void SettingUp()
        {             
                      
            this.chapterItem = ItemType.CreateNewItem("chapter item", "ci", null, PageType.Chapter);
            this.controlChapterItem = ItemType.CreateNewItem("controlChapter item", "cci", "ewrt", PageType.ControlChapter);
            this.theoryItem = ItemType.CreateNewItem("theory item", "ti", "dsfg", PageType.Theory);
           // this.questionItem = ItemType.CreateNewItem("question item", "qi", "rtwret", PageType.Question);
            this.summaryItem = ItemType.CreateNewItem("summary item", "si", "ywwdfg", PageType.Summary);
            this.unknownItem = ItemType.CreateNewItem("unknown item", "ui", "wettw", PageType.Unknown);

            this.items = new List<ItemType>();
            this.items.Add(chapterItem);
            this.items.Add(controlChapterItem);
            this.items.Add(theoryItem);
           // this.items.Add(questionItem);
            this.items.Add(summaryItem);
            this.items.Add(unknownItem);

            this.sequencing = new SequencingType();

            this.organization = new OrganizationType();
        }
Example #3
0
 /// <summary>
 /// Customizes sequencing for theory page.
 /// </summary>
 /// <param name="sequencing">SequencingType value represents object to customize.</param>
 public static void CustomizeTheoryPage(ref SequencingType sequencing)
 {
     if (sequencing.deliveryControls == null)
     {
         sequencing.deliveryControls = new DeliveryControlsType();
     }
     sequencing.deliveryControls.completionSetByContent = false;
     sequencing.deliveryControls.objectiveSetByContent = false;
 }
Example #4
0
       /* /// <summary>
        /// Customizes sequencing for simple chapter.
        /// </summary>
        /// <param name="sequencing">SequencingType value represents object to customize.</param>
        public static void CustomizeChapter(ref SequencingType sequencing)
        {
            if (sequencing.controlMode == null)
            {
                sequencing.controlMode = new ControlModeType();
            }
            sequencing.controlMode.flow = true;
            sequencing.controlMode.choice = true;
        }

        /// <summary>
        /// Customizes sequencing for control chapter.
        /// </summary>
        /// <param name="sequencing">SequencingType value represents object to customize.</param>
        public static void CustomizeControlChapter(ref SequencingType sequencing)
        {
            if (sequencing.controlMode == null)
            { 
                sequencing.controlMode = new ControlModeType();
            }            
            sequencing.controlMode.flow = true;
            sequencing.controlMode.forwardOnly = true;
            sequencing.controlMode.choice = false;
            sequencing.controlMode.choiceExit = false;

            if (sequencing.limitConditions == null)
            {
                sequencing.limitConditions = new LimitConditionsType();
            }
            sequencing.limitConditions.attemptLimit = "1";
        }
        */
        /// <summary>
        /// Customizes sequencing for question page.
        /// </summary>
        /// <param name="sequencing">SequencingType value represents object to customize.</param>
        public static void CustomizeQuestionPage(ref SequencingType sequencing)
        {
            if (sequencing.deliveryControls == null)
            { 
                sequencing.deliveryControls = new DeliveryControlsType();
            }            
            sequencing.deliveryControls.completionSetByContent = true;
            sequencing.deliveryControls.objectiveSetByContent = true;
            sequencing.deliveryControls.tracked = true;
            
            if (sequencing.limitConditions == null)
            {
                sequencing.limitConditions = new LimitConditionsType();
                sequencing.limitConditions.attemptLimit = "1";
            }

            if (sequencing.rollupRules == null)
            {
                sequencing.rollupRules = new RollupRulesType();
            }
            sequencing.rollupRules.objectiveMeasureWeight = 1;
        }