Quantcast
Channel: Web services
Viewing all articles
Browse latest Browse all 2361

Pull files to repository

$
0
0
by Sebastian Hofmann.  

I search for a way to pull all files from Course, maybe also html texts. 

The first approach i tried was the Sword Plugin, but it only offers to upload files to a repository. I also need to upload existing files/courses.

The second approach was to use a self written portfolio Plugin, but i recognized it is only possible to export User Data and not whole courses.

The third aüproach is to pull the courses from the rest api. I use the API from https://github.com/bantonia/MoodleRest/

I only managed to get the Course "metadata" and i need help to also pull all related files and texts. I got the courses with the  Code:

final MoodleCourse[] courses = MoodleRestCourse.getAllCourses();

I am also aware of the the Method MoodleRestFile.getFiles() and the Class MoodleFileParent, but i do not really get how to use it. I hope i can get some Help here.

A fallback approach would  be export a course to .mbz and reupload it to the repository and parse it, but i think the file format can change and it requires additional steps for the user.


Viewing all articles
Browse latest Browse all 2361

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>