================================================================================
Webservice functions to Moodle
Installation
--------------------------------------------------------------------------------
Installing Moodle Webservice is fairly easy. You can...
sudo python setup.py install
Setting up Moodle 2.2.x web services
--------------------------------------------------------------------------------
Follow the steps in /admin/settings.php?section=webservicesoverview of your moodle.
Example Use
--------------------------------------------------------------------------------
Create a new course:
from moodle_ws_client import moodle
mdl = moodle.MDL()
# Connect to moodle data
server = {
'protocol': 'xmlrpc', # xmlrpc, rest
'uri': 'http://www.mymoodle.org',
'token': 'yourtokenkeymoodle',
}
# Create new courses
courses = [{
'shortname': 'New Course', # shortname must be unique
'fullname': 'New Course Zikzakmedia',
'categoryid': 1,
#'visible': 1,
'id': 2,
#'maxbytes': 2097152,
#'showreports': 0,
#'startdate': 1314396000,
#'defaultgroupingid': 0,
#'summaryformat': 1,
#'completionstartonenrol': 0,
#'groupmode': 0,
#'numsections': 10,
#'showgrades': 1,
#'enablecompletion': 0,
#'hiddensections': 0,
#'format': 'topics',
#'completionnotify': 0,
#'lang': '',
#'categorysortorder': 10001,
#'timecreated': 1314367091,
#'groupmodeforce': 0,
#'forcetheme': '',
#'summary': u'<p>\ufeff</p>',
#'idnumber': '',
#'newsitems': 5,
#'timemodified': 1314367091
}]
mdl.create_courses(server, courses)
The implemented methods and APIs are:
* create_courses(server, courses)
* get_courses(server)
* create_users(server, users)
* update_users(server, users)
* delete_users(server, users)
* get_users(server, user_ids)
* enrol_users(server, enrols) (include unrol users)
* duplicate_course(server,course)
* get_course_users(server,course)
* update_course(server,course)
For more examples, see examples dir
Metadata
Release files for moodle-ws-client 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| moodle-ws-client-0.0.4.tar.gz | 4.9 kB | Without provenance | Details for moodle-ws-client-0.0.4.tar.gz |
Release files / moodle-ws-client-0.0.4.tar.gz
| Download URL | moodle-ws-client-0.0.4.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ad025362659753a58c31703a2d5fd8a0d607a40da18539f69cde17021a4a63d5
|
|
BLAKE2b-256 checksum How to use checksums |
1fb79521fcb83d7747ce3a8e10f5d4759f170fb82c5ce88ec63df6c5c7c69c4e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for moodle-ws-client 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.