This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function showQuizBox($questionCount) | |
{ | |
$globalPoints = 0; | |
$json = array(); | |
$catPoints = array(); | |
?> | |
<div style="display: none;" class="quizMaster_quiz"> | |
<ol class="quizMaster_list"> | |
<?php | |
$index = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function save($quiz = null) { | |
$quizId = $this->_post['quizId']; | |
$array = $this->_post['results']; | |
$lockIp = $this->getIp(); | |
$userId = get_current_user_id(); | |
if ($lockIp === false) { | |
return false; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<wpProQuiz><header version="0.37" exportVersion="1"/><data><quiz><title titleHidden="false"><![CDATA[Demo Tommy Quiz 1]]></title><text><![CDATA[This is a Demo of WP Pro Quiz functionality. The settings are very open ended, so as to permit the test user to freely skip questions and return to previous ones.]]></text><category>Demo</category><resultText gradeEnabled="true"><text prozent="15"><![CDATA[These are your graduation results!]]></text><text prozent=""><![CDATA[]]></text></resultText><btnRestartQuizHidden>false</btnRestartQuizHidden><btnViewQuestionHidden>false</btnViewQuestionHidden><questionRandom>false</questionRandom><answerRandom>false</answerRandom><timeLimit>600</timeLimit><showPoints>true</showPoints><statistic activated="true" ipLock="1440"/><quizRunOnce type="1" cookie="false" time="0">false</quizRunOnce><numberedAnswer>true</numberedAnswer><hideAnswerMessageBox>false</hideAnswerMessageBox><disabledAnswerMark>false</disabledAnswerMark><showMaxQuestion show |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Global Scope (Not On Ready) */ | |
function quizmasterProcessAccessCode( codeEntered, code ) { | |
if( codeEntered == code ) { | |
console.log("code is correct"); | |
quizmasterGrantAccessByCode(); | |
} else { | |
quizmasterDenyAccessByCode(); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object(WP_Error)#693 (2) { | |
["errors"]=> | |
array(1) { | |
["already_active"]=> | |
array(1) { | |
[0]=> | |
string(27) "The user is already active." | |
} | |
} | |
["error_data"]=> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Method A - using form ID | |
add_filter('gpls_rulegroups', 'gpls_globalize'); | |
function gpls_globalize( $rulegroups ) { | |
return array_merge( $rulegroups, GPLS_RuleGroup::load_by_form( 2 ) ); | |
} | |
// Method B - using rulegroup id (GF feed ID) | |
add_filter('gpls_rulegroups', 'gpls_globalize'); | |
function gpls_globalize( $rulegroups ) { | |
$rulegroups[] = GPLS_RuleGroup::load_by_id( 60 ) ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* $quiz QuizMaster_Model_Quiz | |
* $question QuizMaster_Model_Question | |
*/ | |
QuizMaster_Model_Quiz_Question::associate( $quiz->getId(), $question->getId() ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// time period handling segment | |
$time_period = $this->_args['time_period']; | |
$time_period_sql = false; | |
if( $time_period === false ) { | |
// no time period | |
} else if( intval( $time_period ) > 0 ) { | |
$time_period_sql = $wpdb->prepare( 'date_created BETWEEN DATE_SUB(utc_timestamp(), INTERVAL %d SECOND) AND utc_timestamp()', $this->_args['time_period'] ); | |
} else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static function autoload( $class, $dir ) { | |
$registeredExtensions = $this->register(); | |
print '<pre>'; | |
var_dump( $registeredExtensions ); | |
print '</pre>'; | |
foreach( $registeredExtensions as $ext => $extSettings ) { | |
if( $extSettings['type'] == 'pro' ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class QuizMaster_Helper_CopyPost { | |
private $postTypes = array(); | |
public function __construct( $postTypes = array() ) { | |
if( empty( $postTypes )) { | |
$this->postTypes = false; | |
} else { |