public override void DoExecute() { var loadOptions = new EdxLoadOptions(); loadOptions.FailOnNonExistingItem = false; loadOptions.HandleNonExistentItemTypeName = (type, url) => Console.WriteLine($"Skipped non existent item type:{type} urlName:{url}"); var folderName = Path.Combine(Dir, "olx"); Console.WriteLine("Loading"); var course = EdxCourse.Load(folderName, loadOptions); Console.WriteLine("Saving"); course.Save(folderName); }
public static SlideProblemComponent Load(string folderName, string urlName, EdxLoadOptions options) => Load <SlideProblemComponent>(folderName, "problem", urlName, options);
public static VideoComponent Load(string folderName, string urlName, EdxLoadOptions options) { return(Load <VideoComponent>(folderName, "video", urlName, options)); }
public static HtmlComponent Load(string folderName, string urlName, EdxLoadOptions options) { return(Load <HtmlComponent>(folderName, "html", urlName, options, c => { c.Source = File.ReadAllText(string.Format("{0}/html/{1}.html", folderName, c.Filename)); })); }
public static LtiComponent Load(string folderName, string urlName, EdxLoadOptions options) { return(Load <LtiComponent>(folderName, "lti", urlName, options)); }