$tr->_e("The value of the identifier of the shortcode is incorrect"); } else { $managerQuiz = new QuizManager(); $quiz = $managerQuiz->getById($v->sanitized['id']); if ($quiz) { $sp_btn_share = "<button class='btn-share' title='" . $tr->__("Share") . "'>" . $tr->__("Share") . "</button>"; $btn_buddypress_share = ""; $btn_social_share = ""; $v = $currentUser->isLoggedIn() ? sha1($currentUser->id()) : ""; $path_json = "Public/Quiz/" . $quiz->getId() . $v . ".json"; $json_file = __ROOT_PLUGIN__ . $path_json; $sp_user = new StudyPressUserWP($quiz->getAuthorId()); $sp_userName = $sp_user->firstName() . ' ' . $sp_user->lastName(); $sp_userLink = StudyPressUserWP::getUserPostsLink($quiz->getAuthorId()); $items = array(); $owl['items'][] = array('name' => $tr->__('Presentation'), 'content' => slide_presentation_quiz($quiz, $sp_userName)); $resultContent = ""; if ($spConfiguration['share_socialNetwork'] === 'true') { $btn_social_share = "<button class='btn-facebook' id='btn-social' title='Facebook'> <span>facebook</span ></button>"; $btn_social_share .= "<button class='btn-twitter' id='btn-social' title='Twitter'> <span>Twitter</span></button>"; $btn_social_share .= "<button class='btn-google' id='btn-social' title='Google+'> <span>Google+</span></button>"; $btn_social_share .= "<button class='btn-linkedin' id='btn-social' title='LinkedIn'> <span>LinkedIn</span></button>"; } $result = $managerQuiz->getResultOfQuizByUser($id, $currentUser->id()); if ($result && $result->isValide()) { if (function_exists('bp_is_active') && bp_is_active('groups') && $spConfiguration['bp_shareResult'] === 'true' && StudyPressUserWP::isLoggedIn()) { $btn_buddypress_share = "<button class='btn-buddypress' id='btn-social' title='BuddyPress'><span>Buddypress</span></button>"; } $class = (int) $result->getNote() >= 50 ? "green" : "red"; $resultContent = "<div class='sp-result'><div class='sp-postit'><p>" . $tr->__("You obtained") . ":</p><strong class='" . $class . "'>" . $result->getNote() . "% </strong></div></div>"; $i = 0;
</div> <div class="sp-player-right"> <div class="sp-player-header"> <span class="sp-player-nbr_questions">Question n°<span class="current-question"></span>/<span class="nbr-question"></span></span> <span class="sp-player-minuteur"><span id="hours">00</span>:<span id="minutes">00</span>:<span id="seconds">00</span></span> </div> <div class="sp-player-right-top"> <div id="carousel" class="slide"> <!-- Les Slides sont chargés depuis un fichier Json --> <div class="owl-item"> <?php echo slide_presentation_quiz($quiz, $sp_userName); ?> </div> </div> </div> <div class="sp-player-right-bottom"> <button class="btn-begin"><?php $tr->_e("Start the Quiz"); ?> </button> <div class="buttons-control hide"> <button class="btn-next">Next</button> <button class="btn-prev">Prev</button> </div>