예제 #1
0
        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);
        }
예제 #2
0
 public static SlideProblemComponent Load(string folderName, string urlName, EdxLoadOptions options)
 => Load <SlideProblemComponent>(folderName, "problem", urlName, options);
예제 #3
0
 public static VideoComponent Load(string folderName, string urlName, EdxLoadOptions options)
 {
     return(Load <VideoComponent>(folderName, "video", urlName, options));
 }
예제 #4
0
 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)); }));
 }
예제 #5
0
 public static LtiComponent Load(string folderName, string urlName, EdxLoadOptions options)
 {
     return(Load <LtiComponent>(folderName, "lti", urlName, options));
 }