public override Component ToEdxComponent(string displayName, Slide slide, int componentIndex) { var items = Items.Select(x => new Choice { Correct = x.IsCorrect, Text = EdxTexReplacer.ReplaceTex(x.Description) }).ToArray(); ChoiceResponse cr; if (Multiple) { var cg = new CheckboxGroup { Label = Text, Direction = "vertical", Choices = items }; cr = new ChoiceResponse { ChoiceGroup = cg }; } else { var cg = new MultipleChoiceGroup { Label = Text, Type = "MultipleChoice", Choices = items }; cr = new MultipleChoiceResponse { ChoiceGroup = cg }; } return(new MultipleChoiceComponent { UrlName = slide.NormalizedGuid + componentIndex, ChoiceResponse = cr, Title = EdxTexReplacer.ReplaceTex(Text) }); }
public override Component ToEdxComponent(string displayName, Slide slide, int componentIndex) { var items = Items.Select(x => new Choice { Correct = x.IsCorrect, Text = EdxTexReplacer.ReplaceTex(x.Description) }).ToArray(); ChoiceResponse cr; if (Multiple) { var cg = new CheckboxGroup { Label = Text, Direction = "vertical", Choices = items }; cr = new ChoiceResponse { ChoiceGroup = cg }; } else { var cg = new MultipleChoiceGroup { Label = Text, Type = "MultipleChoice", Choices = items }; cr = new MultipleChoiceResponse { ChoiceGroup = cg }; } return new MultipleChoiceComponent { UrlName = slide.NormalizedGuid + componentIndex, ChoiceResponse = cr, Title = EdxTexReplacer.ReplaceTex(Text) }; }