From 5cfa863adcb33b9fd88ebf6a294eb52c58a004b9 Mon Sep 17 00:00:00 2001 From: David Castro Date: Thu, 25 Jul 2019 14:49:04 -0500 Subject: [PATCH] MDL-66248 mod_forum: Fixes on portofolio command url styling. --- mod/forum/lib.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/mod/forum/lib.php b/mod/forum/lib.php index 95d53dd196b..13cfad65b5c 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -3509,9 +3509,13 @@ function forum_print_post($post, $discussion, $forum, &$cm, $course, $ownpost=fa $button->set_formats(PORTFOLIO_FORMAT_RICHHTML); } - $porfoliohtml = $button->to_html(PORTFOLIO_ADD_TEXT_LINK); - if (!empty($porfoliohtml)) { - $commands[] = $porfoliohtml; + $exporturl = $button->to_html(PORTFOLIO_ADD_FAKE_URL); + if (!empty($exporturl)) { + $exportcommand = [ + 'url' => $exporturl, + 'text' => get_string('addtoportfolio', 'portfolio') + ]; + $commands[] = $exportcommand; } } // Finished building commands