Browse Source

Fix URL for create forum in lp

Angel Fernando Quiroz Campos 9 years ago
parent
commit
28d5dad30b
1 changed files with 9 additions and 1 deletions
  1. 9 1
      main/newscorm/learnpath.class.php

+ 9 - 1
main/newscorm/learnpath.class.php

@@ -8996,7 +8996,15 @@ class learnpath
         //First add link
         $return .= '<li class="lp_resource_element">';
         $return .= Display::return_icon('forum_new_small.gif');
-        $return .= ' <a href="' . api_get_path(WEB_CODE_PATH) . 'forum/index.php?' . api_get_cidreq() . '&action=add&content=forum&origin=learnpath&lp_id=' . $this->lp_id . '" title="' . get_lang('CreateANewForum') . '">' . get_lang('CreateANewForum') . '</a>';
+        $return .= Display::url(
+            get_lang('CreateANewForum'),
+            api_get_path(WEB_CODE_PATH) . 'forum/index.php?' . api_get_cidreq() . '&' . http_build_query([
+                'action' => 'add',
+                'content' => 'forum',
+                'lp_id' => $this->lp_id
+            ]),
+            ['title' => get_lang('CreateANewForum')]
+        );
         $return .= '</li>';
 
         $return .= '<script>