https://github.com/malb/moodle-cli
Basic command line interface for Moodle using Selenium (!) because we can't have nice things
https://github.com/malb/moodle-cli
Last synced: about 1 year ago
JSON representation
Basic command line interface for Moodle using Selenium (!) because we can't have nice things
- Host: GitHub
- URL: https://github.com/malb/moodle-cli
- Owner: malb
- Created: 2018-08-07T17:52:28.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-03-29T12:53:05.000Z (about 7 years ago)
- Last Synced: 2025-06-09T03:04:40.206Z (about 1 year ago)
- Language: Python
- Size: 10.7 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
Awesome Lists containing this project
README
#+TITLE: Basic Selenium-based Moodle CLI
* Why?
My university doesn’t enable the Moodle API but Moodle’s web interface is horrible and clunky.
* What can it do?
Not much!
#+BEGIN_SRC sh :results verbatim :exports results
./cli.py
#+END_SRC
#+RESULTS:
: Usage: cli.py [OPTIONS] COMMAND [ARGS]...
:
: Options:
: --help Show this message and exit.
:
: Commands:
: list-files List files of a course.
: set-text Set the summary text of a section from a...
: upload-file Upload a file.
* It doesn’t work!
The whole thing is rather fragile as it depends on Moodle’s internal HTML representation which changes from version to version. I’m testing/using it on the Moodle install of my university. I’m happy to use as generic XPATH as possible to support more Moodle versions, but I have no intention of promising any support for anything other than whatever my university is running at the moment.