diff --git a/classes/class.ilObjInteractiveVideoGUI.php b/classes/class.ilObjInteractiveVideoGUI.php index d957a6ed..2fb7e8fe 100755 --- a/classes/class.ilObjInteractiveVideoGUI.php +++ b/classes/class.ilObjInteractiveVideoGUI.php @@ -203,6 +203,8 @@ public function showContent() $ilTabs->activateTab('content'); $tpl->addCss($this->plugin->getDirectory() . '/templates/default/xvid.css'); + $tpl->addCss($this->plugin->getDirectory() . '/libs/Bootstraptoggle/bootstrap2-toggle.min.css'); + $tpl->addJavaScript($this->plugin->getDirectory() . '/libs/Bootstraptoggle/bootstrap2-toggle.min.js'); ilObjMediaObjectGUI::includePresentationJS($tpl); $video_tpl = new ilTemplate("tpl.video_tpl.html", true, true, $this->plugin->getDirectory()); @@ -264,6 +266,7 @@ public function showContent() $video_tpl->setVariable('ALREADY_ANSWERED_TEXT', $this->plugin->txt('already_answered')); $video_tpl->setVariable('QUESTION_TEXT', $this->plugin->txt('question')); $video_tpl->setVariable('PRIVATE_TEXT', $this->plugin->txt('is_private_comment')); + $video_tpl->setVariable('RESET_TEXT', $this->plugin->txt('reset')); $tpl->addJavaScript($this->plugin->getDirectory() . '/js/jquery.InteractiveVideoQuestionViewer.js'); $tpl->addJavaScript($this->plugin->getDirectory() . '/js/jquery.InteractiveVideoPlayer.js'); $tpl->addJavaScript($this->plugin->getDirectory() . '/js/InteractiveVideoPlayerUtils.js'); diff --git a/js/InteractiveVideoPlayerUtils.js b/js/InteractiveVideoPlayerUtils.js index 53df1510..858a6f72 100644 --- a/js/InteractiveVideoPlayerUtils.js +++ b/js/InteractiveVideoPlayerUtils.js @@ -24,7 +24,7 @@ il.InteractiveVideoPlayerUtils = (function () { var i; for (i = 0; i < Object.keys(comments).length; i++) { - if (comments[i].comment_time <= time && comments[i].comment_text !== null && parseInt(comments[i].is_interactive, 10) === 0) + if (comments[i].comment_time <= time && comments[i].comment_text !== null) { html = pub.buildListElement(comments[i], comments[i].comment_time, comments[i].user_name) + html; } @@ -53,16 +53,36 @@ il.InteractiveVideoPlayerUtils = (function () { } }; + pro.isBuildListElementAllowed = function(username) + { + if(InteractiveVideo.is_show_all_active === false) + { + if(InteractiveVideo.filter_by_user === false || + (InteractiveVideo.filter_by_user !== false && InteractiveVideo.filter_by_user === username)) + { + return true; + } + } + return false; + }; + pub.buildListElement = function (comment, time, username, counter) { - return '