2.6.1+ signatures on certificates

2.6.1+ signatures on certificates

by Wendi Daniels -
Number of replies: 6

I have had no luck at all in trying to upload signatures for the certificates. They are uploaded on ftp in the appropriate location (certificates>pix>signatures) and they never show up on the front end in the scroll when programming the certificates. One fellow offered this advice:

***********************************************************************************

If you uploaded them as a superuser, you can use the chown-command to give them to the moodle user or the chmod-command to expand the rights to "group" and "everyone".

******************************************************************************

I am the only one one my site, so it is all me. I looked up chown-command and chmod-command, but I don't know what they are, how to find them or what to do with them. Please help.

Average of ratings: -
In reply to Wendi Daniels

Re: 2.6.1+ signatures on certificates

by Floyd Saner -

Wendi,

I seriously doubt the issue is with file ownership - that is that last thing I would investigate in this situation.

What type of signature file did you upload?  I think Certificate will recognize only .jpg and .png image files.

Floyd

In reply to Floyd Saner

Re: 2.6.1+ signatures on certificates

by Wendi Daniels -

I uploaded a few PNGs, bitmaps, jpg...nothing shows up on the scroll. It would be GREAT if the new cert would come out soon, but I don't know how long it will take, and I cannot wait for that.  sad

In reply to Wendi Daniels

Re: 2.6.1+ signatures on certificates

by Wendi Daniels -

I FOUND THE MISSING LINK!

When you add a signature to your FTP files, the whole signature link must be in lower case, even "png". That was advice given by Mark Nelson, the Certificates guru, in an earlier discussion a few years ago.

In reply to Wendi Daniels

Re: 2.6.1+ signatures on certificates

by Jean-Michel Védrine -

Oh yes the code to find images  in the certificate_scan_image_dir function is really awfull :

if (strpos($file, '.png', 1) || strpos($file, '.jpg', 1) ) {
                    $i = strpos($file, '.');
                    if ($i > 1) {
                        // Set the name
                        $options[$file] = substr($file, 0, $i);
                    }
                }

I will create a tracker issue and suggest a more robust code.

 

In reply to Jean-Michel Védrine

Re: 2.6.1+ signatures on certificates

by Jean-Michel Védrine -

I have suggested a better code in CONTRIB-4909 that will work with uppercase extensions or names containing a dot

In reply to Jean-Michel Védrine

Re: 2.6.1+ signatures on certificates

by Jean-Michel Védrine -

Hi,

Just to report that certificate (master, MOODLE_24_STABLE and MOODLE_25_STABLE branchs) downloaded from Mark's github account now has a better certificate_scan_image_dir function and that all images having .jpg, .jpeg, .png extensions be it lower or upper case should appear in the menu.