private void UpdateControls() { taskIdMap.Clear(); if (ControlModeHidden == ControlMapper.ControlMode.SimpleTaskSpecific && Curriculum != null) { int lowestFreeTaskId = 0; foreach (ILearningTask learningTask in Curriculum) { if (!taskIdMap.ContainsKey(learningTask.GetType())) { taskIdMap[learningTask.GetType()] = lowestFreeTaskId; ControlMapper.CreateControlsFor(lowestFreeTaskId++); } } } }