Beispiel #1
0
        private void LoadGlobalData()
        {
            GlobalList.Topics            = topicService.GetAll();
            GlobalList.Questions         = quesListService.GetAll();
            GlobalList.MultipleChoice    = multipleChoiceService.GetAll();
            GlobalList.ExternalResources = externalResourceService.GetAll();
            GlobalList.TutorialTitle     = tutorialTitleService.GetAll();
            GlobalList.TutorialSubtitle  = tutorialsubtitleService.GetAll();
            GlobalList.TutorialContent   = tutorialContentService.GetAll();

            GlobalList.TutorialContent.ToList().ForEach(c => c.DescriptionString = Cmn.GetUnCompressed(c.Description, c.DescriptionLength));
            GlobalList.Questions.ToList().ForEach(c => c.AnswerString            = Cmn.GetUnCompressed(c.Answer, c.AnswerLength));
        }
Beispiel #2
0
        public QuesListController(
            IQuesListService quesListService,
            ITopicService topicService,
            IUnitOfWork unitOfWork) : base(unitOfWork)
        {
            this.quesListService = quesListService;
            this.topicService    = topicService;

            if (GlobalList.Questions.Count() == 0)
            {
                GlobalList.Questions = quesListService.GetAll();
            }
        }