Skip to content

Commit 6362445

Browse files
committed
MDL-83720 tag: correct description formatting component/filearea.
1 parent 77692ee commit 6362445

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

tag/classes/output/tag.php

+9-12
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,12 @@
1414
// You should have received a copy of the GNU General Public License
1515
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
1616

17-
/**
18-
* Contains class core_tag\output\tag
19-
*
20-
* @package core_tag
21-
* @copyright 2015 Marina Glancy
22-
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
23-
*/
24-
2517
namespace core_tag\output;
2618

2719
use renderable;
2820
use templatable;
2921
use renderer_base;
3022
use stdClass;
31-
use moodle_url;
3223
use core_tag_tag;
3324

3425
/**
@@ -79,9 +70,15 @@ public function export_for_template(renderer_base $output) {
7970
$r->tagcollid = clean_param($this->record->tagcollid, PARAM_INT);
8071
$r->rawname = clean_param($this->record->rawname, PARAM_TAG);
8172
$r->name = clean_param($this->record->name, PARAM_TAG);
82-
$format = clean_param($this->record->descriptionformat, PARAM_INT);
83-
list($r->description, $r->descriptionformat) = \core_external\util::format_text($this->record->description,
84-
$format, \context_system::instance(), 'core', 'tag', $r->id);
73+
[$r->description, $r->descriptionformat] = \core_external\util::format_text(
74+
$this->record->description,
75+
$this->record->descriptionformat,
76+
\context_system::instance(),
77+
'tag',
78+
'description',
79+
$r->id,
80+
);
81+
8582
$r->flag = clean_param($this->record->flag, PARAM_INT);
8683
if (isset($this->record->isstandard)) {
8784
$r->isstandard = clean_param($this->record->isstandard, PARAM_INT) ? 1 : 0;

0 commit comments

Comments
 (0)