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]; } } }
public CourseSettings() { Scoring = new ScoringSettings(); }
public UnitSettings() { Scoring = new ScoringSettings(); }