Fix LP if forum doesn't exist doesn't show tabs - Refs #7972

1.10.x
José Loguercio 9 years ago
parent 4e1ac21b80
commit 33638f114e
  1. 3
      main/newscorm/scorm_api.php
  2. 2
      main/template/default/learnpath/view.tpl

@ -1682,11 +1682,12 @@ var loadForumThead = function(lpId, lpItemId) {
$.when(loadForum).done(function(forumThreadData) {
var tabForumLink = $('.lp-view-tabs a[href="#lp-view-forum"]'),
tabForum = tabForumLink.parent();
$("#navTabs").show();
if (forumThreadData.error) {
tabForumLink.removeAttr('data-toggle');
tabForum.addClass('disabled');
$("#navTabs").hide();
$('#lp-view-forum').html('');
return;

@ -112,7 +112,7 @@
</div>
<div class="lp-view-tabs">
<ul class="nav nav-tabs" role="tablist">
<ul id="navTabs" class="nav nav-tabs" role="tablist">
<li role="presentation" class="active">
<a href="#lp-view-content" aria-controls="lp-view-content" role="tab" data-toggle="tab">
<span class="fa fa-book fa-2x fa-fw" aria-hidden="true"></span><span class="sr-only">{{ 'Lesson'|get_lang }}</span>

Loading…
Cancel
Save