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