Difference between revisions of "Projects/open edx"
< Projects
Jump to navigation
Jump to search
(create page, first draft) |
m (add exemple of api usage) |
||
Line 7: | Line 7: | ||
Course instructor choose their license for content. | Course instructor choose their license for content. | ||
== Using API == | |||
You Must register with the Open edX server with Oauth 2.0 | You Must register with the Open edX server with Oauth 2.0 | ||
Documentation : https://edx.readthedocs.io/projects/edx-platform-api/en/latest/courses/index.html | Documentation : https://edx.readthedocs.io/projects/edx-platform-api/en/latest/courses/index.html | ||
it's use [https://en.wikipedia.org/wiki/XBlock Xblocks] and we can get them with the API. List of Xblocks is available here : https://openedx.atlassian.net/wiki/display/COMM/XBlocks+Directory | it's use [https://en.wikipedia.org/wiki/XBlock Xblocks] and we can get them with the API. List of Xblocks is available here : https://openedx.atlassian.net/wiki/display/COMM/XBlocks+Directory | ||
<nowiki>===Exemple using API===</nowiki><syntaxhighlight lang="python3" line="1"> | |||
#!/usr/bin/env python3 | |||
import requests | |||
import json | |||
url = "https://www.fun-mooc.fr/api/courses/v1/courses/" | |||
data={"pagination" : { "next" :url } } | |||
#data["pagination"]["next"] = url | |||
while data["pagination"]["next"] != None: | |||
r = requests.get(data["pagination"]["next"]) | |||
data=r.json() | |||
for course in data["results"]: | |||
print(course["course_id"] , " : ", course["name"]) | |||
</syntaxhighlight><syntaxhighlight lang="python3" line="1"> | |||
#!/usr/bin/env python3 | |||
import requests | |||
import json | |||
url = "https://www.fun-mooc.fr/api/courses/v1/courses/" | |||
data={"pagination" : { "next" :url } } | |||
#data["pagination"]["next"] = url | |||
while data["pagination"]["next"] != None: | |||
r = requests.get(data["pagination"]["next"]) | |||
data=r.json() | |||
for course in data["results"]: | |||
print(course["course_id"] , " : ", course["name"]) | |||
</syntaxhighlight> |
Revision as of 13:28, 25 February 2017
Open edX is the open-source (AGPL) platform software for MOOC developed by EdX.
Lots of websites are powered by Open edx, especially edx and fun (France Université Numérique).
A list is available here : https://github.com/edx/edx-platform/wiki/Sites-powered-by-Open-edX
Course instructor choose their license for content.
Using API
You Must register with the Open edX server with Oauth 2.0 Documentation : https://edx.readthedocs.io/projects/edx-platform-api/en/latest/courses/index.html
it's use Xblocks and we can get them with the API. List of Xblocks is available here : https://openedx.atlassian.net/wiki/display/COMM/XBlocks+Directory
===Exemple using API===
#!/usr/bin/env python3
import requests
import json
url = "https://www.fun-mooc.fr/api/courses/v1/courses/"
data={"pagination" : { "next" :url } }
#data["pagination"]["next"] = url
while data["pagination"]["next"] != None:
r = requests.get(data["pagination"]["next"])
data=r.json()
for course in data["results"]:
print(course["course_id"] , " : ", course["name"])
#!/usr/bin/env python3
import requests
import json
url = "https://www.fun-mooc.fr/api/courses/v1/courses/"
data={"pagination" : { "next" :url } }
#data["pagination"]["next"] = url
while data["pagination"]["next"] != None:
r = requests.get(data["pagination"]["next"])
data=r.json()
for course in data["results"]:
print(course["course_id"] , " : ", course["name"])