本文整理汇总了C#中Course.FindInstructorNote方法的典型用法代码示例。如果您正苦于以下问题:C# Course.FindInstructorNote方法的具体用法?C# Course.FindInstructorNote怎么用?C# Course.FindInstructorNote使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Course
的用法示例。
在下文中一共展示了Course.FindInstructorNote方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UnitToSequentials
private static Sequential[] UnitToSequentials(Course course, Config config, List<string> units, int unitIndex, string exerciseUrl, string solutionsUrl, Dictionary<string, string> videoGuids)
{
var result = new List<Sequential>
{
new Sequential(string.Format("{0}-{1}-{2}", course.Id, unitIndex, 0), units[unitIndex],
course.Slides
.Where(s => !config.IgnoredUlearnSlides.Contains(s.Id))
.Where(y => y.Info.UnitName == units[unitIndex])
.SelectMany(y => y.ToVerticals(course.Id, exerciseUrl, solutionsUrl, videoGuids, config.LtiId))
.ToArray())
};
var note = course.FindInstructorNote(units[unitIndex]);
var displayName = "Заметки преподавателю";
var sequentialId = string.Format("{0}-{1}-{2}", course.Id, unitIndex, "note-seq");
var verticalId = string.Format("{0}-{1}-{2}", course.Id, unitIndex, "note-vert");
var mdBlockId = string.Format("{0}-{1}-{2}", course.Id, unitIndex, "note-md");
if (note != null)
result.Add(new Sequential(sequentialId, displayName,
new[]
{
new Vertical(verticalId, displayName, new[] { new MdBlock(course.FindInstructorNote(units[unitIndex]).Markdown).ToEdxComponent(mdBlockId, displayName, course.GetDirectoryByUnitName(units[unitIndex])) })
}) { VisibleToStaffOnly = "true" }
);
return result.ToArray();
}
示例2: RenderInstructorsNote
public string RenderInstructorsNote(Course course, string unitName)
{
var note = course.FindInstructorNote(unitName);
if (note == null)
return null;
var similarSlide = course.Slides.First(x => x.Info.UnitName == unitName);
var slide = new Slide(new[] { new MdBlock(note.Markdown) }, new SlideInfo(unitName, similarSlide.Info.SlideFile, -1), "Заметки преподавателю", "1");
var page = StandaloneLayout.Page(course, slide, CreateToc(course, slide), GetCssFiles(), GetJsFiles());
CopyLocalFiles(note.Markdown, similarSlide.Info.SlideFile.Directory.FullName);
return "<!DOCTYPE html>\n" + page.ToHtmlString();
}