예제 #1
0
        public NodeProgress GetNodeContent(int knowledgeNodeId, int?learnerId)
        {
            var knowledgeNode = _lectureRepository.GetKnowledgeNodeWithSummaries(knowledgeNodeId);

            if (knowledgeNode == null)
            {
                return(null);
            }

            if (learnerId == null)
            {
                return(new NodeProgress(
                           0, 0, knowledgeNode, NodeStatus.Unlocked, _instructor.GatherDefaultLearningObjects(knowledgeNode.LearningObjectSummaries)));
            }

            return(BuildNodeForLearner(knowledgeNode, (int)learnerId));
        }