Skip to content

Course component (Open edX XBlock) that provides an easy way to embed a PDF

License

Notifications You must be signed in to change notification settings

Dicey-Tech/xblock-pdf

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xblock-pdf

Build Status

Course component (Open edX XBlock) that provides an easy way to embed a PDF

Features

  • 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 PDF
    • edx.pdf.downloaded when a student downloads the PDF

Customize the XBlock

By default, PDF Download Allowed is set to True. The default value can be changed in xblock-pdf/pdf/ pdf.py

Install / Update the XBlock

Add it to the EDXAPP_EXTRA_REQUIREMENTS variable.

EDXAPP_EXTRA_REQUIREMENTS:
  - name: 'git+https://github.com/IONISx/[email protected]#egg=xblock-pdf'

Then run your deployment playbooks.

Restart your Open edX processes

sudo /edx/bin/supervisorctl -c /edx/etc/supervisord.conf restart edxapp:

Use the XBlock

Activate the XBlock in your course

Go to Settings -> Advanced Settings and set advanced_modules to ["pdf"].

Use the XBlock in a unit

Select Advanced -> PDF in your unit.

Development environment

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.

License

GNU Affero General Public License 3.0 (AGPL 3.0)

About

Course component (Open edX XBlock) that provides an easy way to embed a PDF

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 52.7%
  • HTML 26.4%
  • JavaScript 20.9%