$confWrongPen = 2 * $confMultiplier; $confCorrGain = 1 * $confMultiplier; $skillWrongPen = 50; $skillCorrGain = 10; //$userID = getUserID($_SESSION['username']); $userID = '90'; $streakBonus = 0; $skills[] = 'vocabulary'; //Keep track of type of users practice $scoreDecr = 0.0008; $scoreIncr = 0.001; $correct = boolean; //Variables for answer comparison $questionFromBank = $_POST['questionFromBank']; $answerFromBank = $_POST['answerFromBank']; $answerID = getAnswerIDVocab($_POST['questionID'], $questionFromBank); $wordIDGuess = getGuessID($_POST['guess'], $answerID, $answerFromBank); $cvset = getSkill('cvset', $userID); $vstyle = getSkill('vstyle', $userID); //Stats Variables $deck_id = getDeckInfo($cvset, 'id'); $word_id = $_POST['questionID']; $user_id = $userID; $correct = ''; $word_lv = getWordInfo($cvset, $word_id, $questionFromBank); $vstyle_id = getVstyleId($vstyle); $time_taken = (int) $_POST['minutesTaken'] * 60 + (int) $_POST['secondsTaken']; /*$changeLog[] = '<div class="dropdown small"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="fa fa-bar-chart"></i><span class="sr-only">Results</span><span class="hidden-xs caret"></span></span></a> <ul class="dropdown-menu">';*/ //Get and compare the answer ID of the question word with the input word to see if matching
$answerChoices[$rand]['id'] = $answerID; $answerChoices[$rand][$element] = $answer; //print_r($answerChoices); //Finalized Variables Used in kanjiRE.php $question = $vstyle == 'audioR' || $vstyle == 'audioK' ? getWordInfo('audio_filename', $questionID, $questionFromBank) : getWord($questionID, $questionFromBank); if (isSentencesDeck(getVocStat('cvset', $userID)) == '1') { $sentences = getSentences($questionID); } else { $sentences = False; } } elseif (getSkill('vStyle', $userID) == 'engK' || getSkill('vStyle', $userID) == 'engKR') { //*************************************************************************************************** //*************************************English<-->Kanji+Hiragana; Hiragana*************************** //*************************************************************************************************** //$choiceQ = 5; $questionFromBank = 'etest'; $answerFromBank = 'jtest'; //get word $questionID = getQuizWordID($userID, getSkill('vStyle', $userID)); //echo "newQuesID is: $questionID <br />"; $question = getWord($questionID, $questionFromBank); $answerID = getAnswerIDVocab($questionID, $questionFromBank); $answer = getWord($answerID, $answerFromBank); //get random words in HIRAGANA $answerChoices = getRandomWords($choiceQ, $answerFromBank, $answerID, $userID, 'word'); //need to get hiragana, not kanji //hide answer within choices $rand = rand(0, $choiceQ - 1); $answerChoices[$rand] = $answer; list($choice1, $choice2, $choice3, $choice4, $choice5) = $answerChoices; }