Skip to content

Commit

Permalink
MDL-83720 tag: correct description formatting component/filearea.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulholden committed Dec 16, 2024
1 parent aa55f38 commit d1600f7
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions tag/classes/output/tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,12 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* Contains class core_tag\output\tag
*
* @package core_tag
* @copyright 2015 Marina Glancy
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace core_tag\output;

use renderable;
use templatable;
use renderer_base;
use stdClass;
use moodle_url;
use core_tag_tag;

/**
Expand Down Expand Up @@ -79,9 +70,15 @@ public function export_for_template(renderer_base $output) {
$r->tagcollid = clean_param($this->record->tagcollid, PARAM_INT);
$r->rawname = clean_param($this->record->rawname, PARAM_TAG);
$r->name = clean_param($this->record->name, PARAM_TAG);
$format = clean_param($this->record->descriptionformat, PARAM_INT);
list($r->description, $r->descriptionformat) = \core_external\util::format_text($this->record->description,
$format, \context_system::instance(), 'core', 'tag', $r->id);
[$r->description, $r->descriptionformat] = \core_external\util::format_text(
$this->record->description,
$this->record->descriptionformat,
\context_system::instance(),
'tag',
'description',
$r->id,
);

$r->flag = clean_param($this->record->flag, PARAM_INT);
if (isset($this->record->isstandard)) {
$r->isstandard = clean_param($this->record->isstandard, PARAM_INT) ? 1 : 0;
Expand Down

0 comments on commit d1600f7

Please sign in to comment.