This file contains 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 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 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 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
array(1) { | |
[0]=> | |
object(WpProQuiz_Model_AnswerTypes)#567 (7) { | |
["_answer":protected]=> | |
string(20) "charter | |
ford | |
right" | |
["_html":protected]=> | |
bool(false) | |
["_points":protected]=> |
This file contains 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
/** | |
* Get template. | |
* | |
* Search for the template and include the file. | |
* | |
* @since 1.0.0 | |
* | |
* @see wcpt_locate_template() | |
* | |
* @param string $template_name Template to load. |
This file contains 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
=== ACF Option Pages === | |
Contributors: goldhat | |
Donate link: https://goldhat.ca/donate/ | |
Tags: acf, option pages, options | |
Requires at least: 4.0 | |
Tested up to: 4.5 | |
Stable tag: 1.1 | |
License: GPLv2 or later | |
License URI: http://www.gnu.org/licenses/gpl-2.0.html |
This file contains 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 subscriptionsAvailableTest() { | |
$settings = new LiveGlam_WaitlistSettings; | |
$io = new LiveGlam_InventoryOrder; | |
// get settings and convert to ratio for calculations | |
$replacement = $settings->getReplacementPercentage() / 100; | |
$buffer = $settings->getActivationBuffer() / 100; | |
// get orderLimit for period | |
$orderLimit = $io->getNextOrderLimitByCategory( $this->productCategory ); |
This file contains 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
/* | |
* Calculate the ShippableCap that represents current maximum shippable units | |
* ShippableCap varies during OrderPeriod | |
* Takes into account potential gain/loss of shippable subscribers | |
* Returns ShippableCap that is compared to current OrderLimit | |
*/ | |
public function calcShippableCap( $orderLimit, $shippableCount ) { | |
$dailyLossRate = 0.0065; | |
$daysRemaining = $this->daysRemainingOrderPeriod(); | |
$periodLossRate = $daysRemaining * $dailyLossRate; |
This file contains 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 activateWaitlistSubscriber() { | |
$productCategories = LiveGlam_ProductCategory::getAll(); | |
if(!empty($productCategories)) { | |
foreach( $productCategories as $cat ) { | |
$wsa = new LiveGlam_WaitlistSubscriberActivate( $cat->key ); | |
$subAvailCount = $wsa->subscriptionsAvailableTest(); | |
if( $subAvailCount >= 1 ) { | |
$subscriberToActivate = $wsa->getWaitlistSubscriberFrontOfLine(); | |
if( $subscriberToActivate ) { | |
$wsa->activate(); |
This file contains 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
[acf-render name="acfr_demo_text"] |