moodle-mod_customcert icon indicating copy to clipboard operation
moodle-mod_customcert copied to clipboard

🚀 Feature request: API for certificate verification

Open xartuu opened this issue 1 year ago • 1 comments

Hello 👋,

we use the Moodle tool in the organization to conduct training. In each unit we are required to verify that a particular employee has completed a particular course. We would like to create automation for this, but the plugin in the current version prevents us from doing so.

Could you please create an simple API similar to the /mod/customcert/verify_certificate.php page?

After querying this page with the POST method with the content code: xyz and with the header Content-Type: application/json it could return the following data:

{
    "verification": "success/failed",
    "error (in case failed)": "Message...",
    "user": {
        "name": "",
        "email": "",
        "id": "",
        "url": ""
    },
    "course": {
        "name": "",
        "id": "",
        "url": ""
    },
    "certificate": {
        "name": "",
        "code": "",
        "id": ""
    }
}

xartuu avatar Oct 02 '24 00:10 xartuu

The API endpoint would have to be done similar to the ones in https://github.com/mdjnelson/moodle-mod_customcert/blob/MOODLE_404_STABLE/classes/external.php. See https://moodledev.io/docs/4.5/apis/subsystems/external/writing-a-service. I work full-time and this is a hobby project so I dont know when I will have time to work on your request. Perhaps you can reach out to a Moodle partner. :)

mdjnelson avatar Oct 02 '24 12:10 mdjnelson