Moodle Choice Auto-filler (MCHAF) is a tool for automatic Moodle single-choice survey filling. It can be used to automatically fill/notify you about newly created course forms, such as test signups.
Go to the MCHAF release page and download the latest executable for Unix.
Visit the MCHAF release page and download the latest executable for Windows.
Before running the code directly from source, please ensure that you have Python 3
, pipenv
and git
installed. Afterwards, run the following commands:
git clone https://github.com/angel-penchev/mchaf
cd mchaf
pipenv install
python.py main.py
Argument | Meaning |
---|---|
-u , --username |
moodle authentication username |
-p , --password |
moodle authentication password |
-d , --domain |
moodle server domain |
-c , --course |
moodle course id |
-r , --regex |
choice form title regex filter |
-n , --notification-level |
notification level. 0 = no notifications, 1 = unfilled multiple choice forms notification, 2 = successfully filled and unfilled forms notifications, 3 = closed, filled and unfilled forms notifications |
-o , --run-once |
whether to check only once and exit |
-h , --help |
show this help message and exit |
On Unix based systems, the variable can be exported in .bashrc
, .zshrc
, etc. usually located in the home directory.
... other shell configuration ...
export MCHAF_USERNAME=*username*
export MCHAF_PASSWORD=*password*
export MCHAF_MOODLE_DOMAIN=https://learn.fmi.uni-sofia.bg/
export MCHAF_COURSE_ID=7473
export MCHAF_CHOICE_TITLE_REGEX=(З|з)аписване за*
On Windows this can be done by selecting Settings > System > Advanced > Environment Variables... > New
.
MCHAF can be also configured using a .env file. Such file can contain the same values as the ones exported in shell.
export MCHAF_USERNAME=*username*
export MCHAF_PASSWORD=*password*
MCHAF_MOODLE_DOMAIN=https://learn.fmi.uni-sofia.bg/
MCHAF_COURSE_ID=7473
MCHAF_CHOICE_TITLE_REGEX=(З|з)аписване за*
- Fork it (https://github.com/angel-penchev/mchaf/fork)
- Create your feature branch (
git checkout -b feature/fooBar
) - Commit your changes (
git commit -a
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request
- Upon review, it will be merged.
Distributed under the BSD-3 Cause license. See LICENSE for more information.