city, date

city, date

by Ricardo Groiso -
Number of replies: 3

Hi,

I would put
before date, the name of the city.
ex.
Florida, September 25, 2015

Where can I change? Certificate.php looked on line 96, but could not make the change. Some help?

Thanks

Ricardo

Average of ratings: -
In reply to Ricardo Groiso

Re: city, date

by Ricardo Groiso -

I could put the city in front of the date. The doc Certificate customizing, is not updated to version 2.9.

The other problem is the date.

The certificate appears

9 September 2015

and
would like to put in order for Brazil which is:

9 de September de 2015

How can I change
.

In the previous version I did so:

$certificatedate = str_replace(' 0', '', strftime('City, %d de %B de %Y', $certdate));

and it worked fine, but now I do not know where to change.

Some help?

In reply to Ricardo Groiso

Re: city, date

by Chris Collman -
Picture of Documentation writers

Hi Ricardo,

Take a look at the /mod/certificate/locallib.php file.  My guess is that the code your want is around lines 873-910.   Looks like you can select one of five different date formats.  #5 will show the strings userdateformat & certificate. 

datefmt=3 says

 $certificatedate = userdate($date, '%d %B %Y');

datefmt=5

$certificatedate = userdate($date, get_string('strftimedate', 'langconfig'));

I also found some related code in the mod_form.php file.

I was looking for something else and remembered your post.  Hope this gives you a clue, I am not good with code. 

Chris