Some Certificates - Cannot create file

Some Certificates - Cannot create file

by Cindy Weber -
Number of replies: 5

Can anyone read these errors? Most of my certificates are issuing correctly.  Moodle 3.11.  A few won't issue - cannot create file.  This is the error. If I replace the certificate link with one from another course - one that works fine - it still won't work. Thank you. I have no clue. I may need to upgrade them all, but I would prefer to just fix the ones that are causing problems.

Average of ratings: -
In reply to Cindy Weber

Re: Some Certificates - Cannot create file

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
What do you mean replace the link with one from another course? You can't issue a certificate from a different course...how have you been setting them up?
In reply to Emma Richardson

Re: Some Certificates - Cannot create file

by Cindy Weber -
Thanks Emma. I have packages of courses set up - so 6 courses in a package. Some of the course packages use one of the same courses. If the certificate for that course is used in another course - I tried importing that file out of another package -or duplicating one that works - and editing it for the new course package. I need to edit the evaluation so that the forward goes to the new certificate. I thought that - since most are working - maybe I had a corrupt file - but when I re-do the certificate, the new one will also fail to generate.
In reply to Cindy Weber

Re: Some Certificates - Cannot create file

by Cindy Weber -
In reply to Cindy Weber

Re: Some Certificates - Cannot create file

by Cindy Weber -
I found PHP errors relating to this. It is the simple certificate. Siteground informed me that this was a primary error, but that I needed to contact a moodle developer to fix the PHP problems. It doesn't change on any of the PHP versions, according to them.

[01-Jun-2022 13:06:26 America/Los_Angeles] PHP Notice: Error processing availability data for ‘4. Click Here for Your Business Broker IV Certificate (must have had access/logged into site (first access/check by clicking on your name on top right) at least 3 hours before this certificate is available)’: Invalid ->cf for profile condition
  • line 302 of /availability/classes/info.php: call to debugging()
  • line 279 of /availability/classes/info.php: call to core_availability\info->warn_about_invalid_availability()
  • line 810 of /course/renderer.php: call to core_availability\info->get_full_information()
  • line 965 of /course/renderer.php: call to core_course_renderer->course_section_cm_availability()
  • line 836 of /course/renderer.php: call to core_course_renderer->course_section_cm()
  • line 1051 of /course/renderer.php: call to core_course_renderer->course_se in /home/customer/www/site.com/public_html/Nevadacourses/lib/weblib.php on line 3257

    PHP errors in all of these files:
    php_errorlog
    ./backup/php_errorlog
    ./login/php_errorlog
    ./admin/tool/customlang/php_errorlog
    ./admin/cli/php_errorlog
    ./admin/php_errorlog
    ./theme/php_errorlog
    ./course/php_errorlog
    ./lib/ajax/php_errorlog
    ./lib/php_errorlog
    ./mod/feedback/php_errorlog
    ./mod/certificate/php_errorlog
    ./mod/quiz/php_errorlog

    These are all of the files that are incurring PHP errors with Moodle 3.11.4+ . Does anyone else have these PHP errors?
In reply to Cindy Weber

Re: Some Certificates - Cannot create file

by Cindy Weber -
I found the cause of the PHP error. The host has it set at PHP 7.2.34, but it has been 7.3. The simple certificate will fail, produce a PHP error, won't issue, if the text in the Certificate Name in settings is too long. There may have also been characters in there that it didn't like. Example:
4. Click Here for Your Property Management III Continuing Education Certificate (must have had access/logged into site (first access/check by clicking on your name on top right) at least 9 hours before this certificate is available) -fails.
4. Click Here for Your Property Management III Continuing Education Certificate - generates