MDL-66911 files: Format full name of custom licenses
authorJun Pataleta <jun@moodle.com>
Thu, 28 May 2020 06:53:14 +0000 (14:53 +0800)
committerJun Pataleta <jun@moodle.com>
Thu, 28 May 2020 07:20:14 +0000 (15:20 +0800)
lib/licenselib.php

index d1038b8..abf4cb6 100644 (file)
@@ -229,6 +229,8 @@ class license_manager {
                 // Interpret core license strings for internationalisation.
                 if ($license->custom == self::CORE_LICENSE) {
                     $license->fullname = get_string($license->shortname, 'license');
+                } else {
+                    $license->fullname = format_string($license->fullname);
                 }
                 $licenses[$license->shortname] = $license;
             }
@@ -352,10 +354,6 @@ class license_manager {
             $licenses = self::get_licenses();
             foreach ($licenses as $license) {
                 if (in_array($license->shortname, $activelicenses)) {
-                    // Interpret core license strings for internationalisation.
-                    if (isset($license->custom) && $license->custom == self::CORE_LICENSE) {
-                        $license->fullname = get_string($license->shortname, 'license');
-                    }
                     $result[$license->shortname] = $license;
                 }
             }