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.
OK after a long fight … just forked from ionis and reedited on my own to work with Tutor EDX 17
If someone needed an ENG version working with Tutor EDX 17
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!