Adding PDF functionality to courses

Hey , I am trying to add and activate PDF in my tutor local
using

IONISx/xblock-pdf: Course component (Open edX XBlock) that provides an easy way to embed a PDF (github.com)

Already added to config.yml

  • name: ‘git+https://github.com/IONISx/xblock-pdf.git@v1.0.0#egg=xblock-pdf’
    In Settings > Advanced Settings > advanced module is added “pdf”

What next because on my studio still is no PDF/Advanced button .
Any clues ?

Which version of tutor are you using? The xblock seems to be quite old and also there is some change in the way of adding additional pip requirements in the config.yml file.

OPENEDX_EXTRA_PIP_REQUIREMENTS:
- git+https://github.com/IONISx/xblock-pdf.git@v1.0.0#egg=xblock-pdf

This is how we add it now in recent versions of tutor (we use tutor version Palm).

I am using latest version 17.0.1
Also trying with same method
OPENEDX_EXTRA_PIP_REQUIREMENTS:

  • git+https://github.com/IONISx/xblock-pdf.git@v1.0.0#egg=xblock-pdf

maybe some newer plugin for newest tutor edx You know it will work ?

Yes, I am using newer xblocks with this method and is working fine. For example, you can try the h5pxblock.

This one works …positive shocked . Now I need a working PDF method.

OK after a long fight … just forked from ionis and reedited on my own to work with Tutor EDX 17 :smiley:
If someone needed an ENG version working with Tutor EDX 17

1 Like

Integrating Blockcerts with your Open edX deployment using Tutor to embed blockchain-verified hashes into course completion certificates is a commendable initiative. Here’s how you can approach this:​


1. Modifying Certificate Generation in Open edX

Open edX’s certificate generation is primarily handled on the backend. To customize the PDF certificates:​

  • Backend Customization: You’ll need to modify the certificate generation logic to embed the Blockcert hash. This involves altering the code that generates the PDF to include the hash in the desired location.​
  • Relevant Repositories: The certificate generation logic is part of the Open edX platform. Specifically, you might need to look into the edx-platform repository, focusing on the certificates module.​

2. Integrating Blockcerts

To integrate Blockcerts:​

  • Middleware Approach: You can create a middleware service that interacts with the Blockcerts API. This service would:​
    • Receive certificate data upon course completion.​
    • Generate a Blockcert-compliant JSON.​
    • Store this JSON on the Ethereum blockchain.​
    • Return the resulting hash.​
  • Embedding the Hash: Once you have the hash, modify the certificate generation process to include this hash in the PDF.​

3. Frontend Considerations

If your goal is solely to modify the certificate content (i.e., embed the hash), you might not need to fork the frontend. However, if you wish to provide users with additional functionalities, such as verifying their certificates via the blockchain directly from the LMS interface, frontend modifications would be necessary.​


4. Forking the Appropriate Repository

For backend modifications related to certificate generation, you should fork and modify the edx-platform repository. Focus on the certificates module, where the PDF generation logic resides.​


5. Deployment with Tutor

Since you’re using Tutor:​

  • Custom Plugins: Tutor allows the creation of custom plugins to override or extend functionalities. You can develop a plugin that overrides the certificate generation logic to include your customizations.​
  • Mounting Custom Code: Alternatively, you can mount your modified code into the Tutor environment, ensuring it replaces or extends the default behavior.​

Summary

  • Backend: Modify the edx-platform repository, focusing on the certificates module, to embed the Blockcert hash into the PDF.​
  • Middleware: Develop a service that handles the interaction with Blockcerts and returns the necessary hash.​
  • Frontend: Only modify if additional user-facing features are desired.​
  • Tutor Deployment: Utilize Tutor’s plugin system or mount custom code to integrate your changes.​

If you need assistance with specific code modifications or setting up the middleware service, feel free to ask!