Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib.php user informed if certificate has been generated #1352

Open
wants to merge 1 commit into
base: IOMAD_38_STABLE
Choose a base branch
from

Conversation

jackawardls
Copy link

Previously, the function xmldb_local_iomad_track_record_certificates would run, and nothing else would happen. However, if it does not generate a certificate then the user is none the wiser. This fix is an addition to some code that has been modified in the declaration of the xmldb_local_iomad_track_record_certificates function whereby it will return true or false depending on the outcome of the certificate generation. For the certificate to generate, the user will need to have a timecompleted value in the local_iomad_track table. If they do not, the function will return false and the user will be informed.

*** PLEASE DO NOT OPEN PULL REQUESTS VIA GITHUB ***

The moodle.git repository at Github is just a mirror of the official repository. We do not accept pull requests at Github.

See CONTRIBUTING.txt guidelines for how to contribute patches for Moodle. Thank you.

--

Previously, the function xmldb_local_iomad_track_record_certificates would run, and nothing else would happen. However, if it does not generate a certificate then the user is none the wiser. This fix is an addition to some code that has been modified in the declaration of the xmldb_local_iomad_track_record_certificates function whereby it will return true or false depending on the outcome of the certificate generation. For the certificate to generate, the user will need to have a timecompleted value in the local_iomad_track table. If they do not, the function will return false and the user will be informed.
Copy link
Collaborator

@turf212 turf212 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could run from a CLI script or from a web-browser so needs to check for that.
If you check on if(!empty(CLI_SCRIPT)) {

then you can use mtrace() or echo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants