Пример #1
0
 public Task <string> CreateWithHtmlAsync(ITextEntryItem item, IHtmlToQtiConverter converter)
 {
     item.Body = converter.ConvertXhtmlToQti(item.UniqueId, item.Body);
     item.Body = converter.ConvertStylesToCss(item.Body);
     item.Key  = item.Key;
     return(GetRenderedItem(item));
 }
 public Task <string> CreateWithHtmlAsync(IMultipleChoiceItem item, IHtmlToQtiConverter converter)
 {
     item.Body         = converter.ConvertXhtmlToQti(item.UniqueId, item.Body);
     item.Body         = converter.ConvertStylesToCss(item.Body);
     item.Alternatives = item.Alternatives.Select(alternative =>
     {
         var newText      = converter.ConvertXhtmlToQti(item.UniqueId, alternative.Text);
         newText          = converter.ConvertStylesToCss(newText);
         alternative.Text = newText;
         return(alternative);
     }).ToList();
     return(GetRenderedItem(item));
 }