Exemplo n.º 1
0
        // private SequencingPattern sequencingPatternField;

        public OrganizationType()
        {
            identifier              = string.Concat("Organization", number++);
            structureField          = "hierarchical";
            this.SequencingPatterns = new SequencingPatternList(this);
            SequencingManager.CreateOrganizationDefaultSequencing(this);

            //To protect local objectives from outer intrusion.
            this.objectivesGlobalToSystem = false;
        }
Exemplo n.º 2
0
        public static ItemType CreateNewItem([NotNull] string title, [NotNull] string identifier, [NotNull] string identifierRef, [NotNull] PageType pageType)
        {
            var result = new ItemType(title, identifier, identifierRef);

            result.pageType = pageType;

            if (pageType != PageType.Chapter && pageType != PageType.ControlChapter)
            {
                result.Sequencing = SequencingManager.CreateNewSequencing(result);
            }
            else
            {
                SequencingManager.CreateNewSequencing(result);
            }

            if (pageType == PageType.Question)
            {
                Course.Answers.Organizations[Course.Organization.identifier].Items.Add(new Item(identifier));
            }

            return(result);
        }