Skip to content

Commit

Permalink
MDL-65518 badges: Default Issuer name
Browse files Browse the repository at this point in the history
If the issuer name is not set, use the site name.
  • Loading branch information
Damyon Wiese committed May 9, 2019
1 parent d48a52d commit c659b1c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/badgeslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -901,11 +901,14 @@ function badges_install_default_backpacks() {
* @return array
*/
function badges_get_default_issuer() {
global $CFG;
global $CFG, $SITE;

$issuer = array();
$issuerurl = new moodle_url('/badges/issuer.php');
$issuer['name'] = $CFG->badges_defaultissuername;
if (empty($issuer['name'])) {
$issuer['name'] = $SITE->fullname ? $SITE->fullname : $SITE->shortname;
}
$issuer['url'] = $issuerurl->out(false);
$issuer['email'] = $CFG->badges_defaultissuercontact;
$issuer['@context'] = OPEN_BADGES_V2_CONTEXT;
Expand Down

0 comments on commit c659b1c

Please sign in to comment.