예제 #1
0
        public void CopySettingsFrom(ScoringSettings otherScoringSettings)
        {
            _defaultScoringGroupForQuiz = string.IsNullOrEmpty(_defaultScoringGroupForQuiz) && string.IsNullOrEmpty(DefaultScoringGroup)
                                ? otherScoringSettings.DefaultScoringGroupForQuiz
                                : _defaultScoringGroupForQuiz;
            _defaultScoringGroupForExercise = string.IsNullOrEmpty(_defaultScoringGroupForExercise) && string.IsNullOrEmpty(DefaultScoringGroup)
                                ? otherScoringSettings.DefaultScoringGroupForExercise
                                : _defaultScoringGroupForExercise;
            DefaultScoringGroup = string.IsNullOrEmpty(DefaultScoringGroup) ? otherScoringSettings.DefaultScoringGroup : DefaultScoringGroup;

            /* Copy missing scoring groups */
            foreach (var scoringGroupId in otherScoringSettings.Groups.Keys)
            {
                if (!Groups.ContainsKey(scoringGroupId))
                {
                    Groups[scoringGroupId] = otherScoringSettings.Groups[scoringGroupId];
                }
            }
        }
예제 #2
0
 public CourseSettings()
 {
     Scoring = new ScoringSettings();
 }
예제 #3
0
 public UnitSettings()
 {
     Scoring = new ScoringSettings();
 }