Course component (Open edX XBlock) that provides an easy way to embed a PDF
- Download button available
- (Optional) Source document download button, for example to provide your PPT file
- Create tracking logs:
edx.pdf.loaded
when a student loads the PDFedx.pdf.downloaded
when a student downloads the PDF
By default, PDF Download Allowed is set to True
.
The default value can be changed in xblock-pdf/pdf/ pdf.py
Add it to the EDXAPP_EXTRA_REQUIREMENTS
variable.
EDXAPP_EXTRA_REQUIREMENTS:
- name: 'git+https://github.com/IONISx/xblock-pdf.git@v1.0.0#egg=xblock-pdf'
Then run your deployment playbooks.
sudo /edx/bin/supervisorctl -c /edx/etc/supervisord.conf restart edxapp:
Go to Settings -> Advanced Settings
and set advanced_modules
to ["pdf"]
.
Select Advanced -> PDF
in your unit.
For the code quality environment, you need to install both Python and JavaScript requirements.
Run the following:
npm install -g grunt-cli
npm install
Then, preferably in a virtualenv, run
pip install -r requirements.txt
Then, run grunt test
to assess code quality.
GNU Affero General Public License 3.0 (AGPL 3.0)