Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- defined('BASEPATH') OR exit('No direct script access allowed');
- class Hello extends CI_Controller {function __construct(){
- parent::__construct();
- if (!$this->ion_auth->logged_in()) {
- redirect("auth/login");
- }
- }
- /*public function gobackwriting($prevquestionid){
- $category = "SELECT Category FROM SMARTDiagnosticQSourceData WHERE QuestionID = $prevquestionid";
- $larry = $this->db->query($category);
- $moe = $larry->row();
- if ($moe->Category == "IP"){
- for ($i = 1; $moe->Category = "IP"; $i++){
- $prevquestionid = $prevquestionid - 1;
- echo $prevquestionid;
- $category = "SELECT Category FROM SMARTDiagnosticQSourceData WHERE QuestionID = $prevquestionid";
- $larry = $this->db->query($category);
- $moe = $larry->row();
- }
- }
- redirect("/Hello/writingdiagnostics/{prevquestionid}");
- }*/
- public function submit_ans($q_num, $q_ans, $q_time){
- $user = $this->ion_auth->user()->row();
- $userid = $user->email;
- $duh = array("1" => "A", "2" => "B", "3" => "C", "4" => "D", "5" => "E", "6" => "F", "7" => "yolo");
- $numbans = $q_ans;
- $timetaken = $q_time;
- $i = $q_num;
- $yolo = "SELECT QuestionID FROM SMARTDiagnosticWritingQSourceData WHERE SmartDiagnosticID = $i";
- $cholo = $this->db->query($yolo);
- $bolo = $cholo->row();
- $lolo = $bolo->QuestionID; //extracting the real question id
- $rage = "SELECT QuestionAnswer FROM QSourceData WHERE QuestionID = $lolo";
- $anger = $this->db->query($rage);
- $hatred = $anger->row();
- $venom = $hatred->QuestionAnswer; // extracted answer correct answer, reterded benjamin with his stupid variable names >:-|
- $insert = "INSERT INTO TestDatabase (UserID, QuestionID, CorrectAnswer, SelectedAnswer, Time, Type) VALUES ('$userid', '$lolo', '$venom', '$duh[$numbans]', '$timetaken', 'Writing')";
- $this->db->query($insert);
- echo "success";
- }
- public function submit_ans_reading($q_num, $q_ans, $q_time){
- $user = $this->ion_auth->user()->row();
- $userid = $user->email;
- $duh = array("1" => "A", "2" => "B", "3" => "C", "4" => "D", "5" => "E", "6" => "F", "7" => "yolo");
- $numbans = $q_ans;
- $timetaken = $q_time;
- $i = $q_num;
- $yolo = "SELECT QuestionID FROM SMARTDiagnosticReadingQSourceData WHERE SmartDiagnosticID = $i";
- $cholo = $this->db->query($yolo);
- $bolo = $cholo->row();
- $lolo = $bolo->QuestionID; //extracting the real question id
- $rage = "SELECT QuestionAnswer FROM QSourceData WHERE QuestionID = $lolo";
- $anger = $this->db->query($rage);
- $hatred = $anger->row();
- $venom = $hatred->QuestionAnswer; // extracted answer correct answer, reterded benjamin with his stupid variable names >:-|
- $insert = "INSERT INTO TestDatabase (UserID, QuestionID, CorrectAnswer, SelectedAnswer, Time, Type) VALUES ('$userid', '$lolo', '$venom', '$duh[$numbans]', '$timetaken', 'Reading')";
- $this->db->query($insert);
- echo "success";
- }
- public function ans_get_writing()
- {
- $user = $this->ion_auth->user()->row();
- $userid = $user->email;
- $meh = $this->input->post('len');
- echo $meh;
- $newdata = ($meh - 1)/2 ;
- $duh = array("1" => "A", "2" => "B", "3" => "C", "4" => "D", "5" => "E", "6" => "F", "7" => "yolo");
- /*$category = "SELECT Category FROM SMARTDiagnosticQSourceData WHERE QuestionID = $q_num";
- $larry = $this->db->query($category);
- $moe = $larry->row();*/
- for ($i = 1; $i <= 61; $i++){
- $conlion = "$i" . "_time";
- $contiger = "$i" . "_ans";
- if (isset($contiger)){
- $numbans = $this->input->post("$contiger");
- $timetaken = $this->input->post("$conlion");
- $yolo = "SELECT QuestionID FROM SMARTDiagnosticWritingQSourceData WHERE SmartDiagnosticID = $i";
- $cholo = $this->db->query($yolo);
- $bolo = $cholo->row();
- $lolo = $bolo->QuestionID;
- $rage = "SELECT QuestionAnswer FROM QSourceData WHERE QuestionID = $lolo";
- $anger = $this->db->query($rage);
- $hatred = $anger->row();
- $venom = $hatred->QuestionAnswer;
- $insert = "INSERT INTO TestDatabase (UserID, QuestionID, CorrectAnswer, SelectedAnswer, Time, Type) VALUES ('$userid', '$lolo', '$venom', '$duh[$numbans]', '$timetaken', 'Writing')";
- $this->db->query($insert);
- $this->db->query("DELETE FROM TestDatabase WHERE SelectedAnswer = ' ';");
- }
- }
- }
- public function ans_get_writing_quiz_one()
- {
- $user = $this->ion_auth->user()->row();
- $userid = $user->email;
- $meh = $this->input->post('len');
- echo $meh;
- $newdata = ($meh - 1)/2 ;
- $duh = array("1" => "A", "2" => "B", "3" => "C", "4" => "D", "5" => "E", "6" => "F", "7" => "yolo");
- /*$category = "SELECT Category FROM SMARTDiagnosticQSourceData WHERE QuestionID = $q_num";
- $larry = $this->db->query($category);
- $moe = $larry->row();*/
- for ($i = 1; $i <= $newdata; $i++){
- $conlion = "$i" . "_time";
- $contiger = "$i" . "_ans";
- $numbans = $this->input->post("$contiger");
- $timetaken = $this->input->post("$conlion");
- $yolo = "SELECT QuestionID FROM SMARTQuizOneWritingQSourceData WHERE SmartDiagnosticID = $i";
- $cholo = $this->db->query($yolo);
- $bolo = $cholo->row();
- $lolo = $bolo->QuestionID;
- $insert = "INSERT INTO TestDatabase (UserID, QuestionID, SelectedAnswer, Time, Type) VALUES ('$userid', '$lolo', '$duh[$numbans]', '$timetaken', 'Writing')";
- $this->db->query($insert);
- $this->db->query("DELETE FROM TestDatabase WHERE SelectedAnswer = ' ';");
- }
- }
- public function ans_get_reading()
- {
- $user = $this->ion_auth->user()->row();
- $userid = $user->email;
- $meh = $this->input->post('len');
- echo $meh;
- $newdata = ($meh - 1)/2 ;
- $duh = array("1" => "A", "2" => "B", "3" => "C", "4" => "D", "5" => "E", "6" => "F", "7" => "yolo");
- /*$category = "SELECT Category FROM SMARTDiagnosticQSourceData WHERE QuestionID = $q_num";
- $larry = $this->db->query($category);
- $moe = $larry->row();*/
- for ($i = 1; $i <= $newdata; $i++){
- $conlion = "$i" . "_time";
- $contiger = "$i" . "_ans";
- $numbans = $this->input->post("$contiger");
- $timetaken = $this->input->post("$conlion");
- $yolo = "SELECT QuestionID FROM SMARTDiagnosticReadingQSourceData WHERE SmartDiagnosticID = $i";
- $cholo = $this->db->query($yolo);
- $bolo = $cholo->row();
- $lolo = $bolo->QuestionID;
- $rage = "SELECT QuestionAnswer FROM QSourceData WHERE QuestionID = $lolo";
- $anger = $this->db->query($rage);
- $hatred = $anger->row();
- $venom = $hatred->QuestionAnswer;
- $insert = "INSERT INTO TestDatabase (UserID, QuestionID, CorrectAnswer, SelectedAnswer, Time, Type) VALUES ('$userid', '$lolo', '$venom', '$duh[$numbans]', '$timetaken', 'Reading')";
- $this->db->query($insert);
- $this->db->query("DELETE FROM TestDatabase WHERE SelectedAnswer = ' ';");
- }
- }
- public function writingdiagnostics($smartdiagnosticid)
- {
- $user = $this->ion_auth->user()->row();
- $userid = $user->username;
- $this->load->helper('url');
- $this->load->library('parser');
- $this->load->model('Model');
- // $sql = "INSERT INTO TestDatabase(UserID,QuestionID) VALUES ('$userid','$q_num');";
- // $this->db->query($sql);
- $q_num = $this->Model->getqnumberwriting($smartdiagnosticid);
- $stuff = $this->Model->assign_sample_data_writing($q_num);
- $test = array('username' => $userid);
- $this->load->view('userheader', $test);
- $this->parser->parse($stuff["question_type"], $stuff);
- }
- public function writingquizone($smartdiagnosticid)
- {
- $user = $this->ion_auth->user()->row();
- $userid = $user->email;
- $this->load->helper('url');
- $this->load->library('parser');
- $this->load->model('Model');
- // $sql = "INSERT INTO TestDatabase(UserID,QuestionID) VALUES ('$userid','$q_num');";
- // $this->db->query($sql);
- $q_num = $this->Model->getqnumberwritingquizone($smartdiagnosticid);
- $stuff = $this->Model->assign_sample_data_writing_quiz_one($q_num);
- $this->parser->parse($stuff["question_type"], $stuff);
- }
- public function readingdiagnostics($smartdiagnosticid)
- {
- $user = $this->ion_auth->user()->row();
- $userid = $user->username;
- $this->load->helper('url');
- $this->load->library('parser');
- $this->load->model('Model');
- // $sql = "INSERT INTO TestDatabase(UserID,QuestionID) VALUES ('$userid','$q_num');";
- // $this->db->query($sql);
- $q_num = $this->Model->getqnumberreading($smartdiagnosticid);
- $stuff = $this->Model->assign_sample_data_reading($q_num);
- $test = array('username' => $userid);
- $this->load->view('userheader', $test);
- $this->parser->parse($stuff["question_type"], $stuff);
- }
- public function display_attempt_writing() {
- $this->db->query("DELETE TestDatabase FROM TestDatabase LEFT OUTER JOIN (SELECT MAX(num) AS num, UserID, QuestionID FROM TestDatabase GROUP BY UserID, QuestionID) AS KeepRows ON TestDatabase.num = KeepRows.num WHERE KeepRows.num IS NULL");
- $this->db->query("UPDATE TestDatabase SET SelectedAnswer = 'F' WHERE SelectedAnswer = 'yolo'");
- $answers = $this->load->view('writingattempts','', false);
- echo $answers;
- }
- public function display_attempt_writing_quiz_one() {
- $answers = $this->load->view('writingattemptsquizone','', true);
- echo $answers;
- }
- public function display_attempt_reading() {
- $this->db->query("DELETE TestDatabase FROM TestDatabase LEFT OUTER JOIN (SELECT MAX(num) AS num, UserID, QuestionID FROM TestDatabase GROUP BY UserID, QuestionID) AS KeepRows ON TestDatabase.num = KeepRows.num WHERE KeepRows.num IS NULL");
- $this->db->query("UPDATE TestDatabase SET SelectedAnswer = 'F' WHERE SelectedAnswer = 'yolo'");
- $answers = $this->load->view('readingattempts','', true);
- echo $answers;
- }
- public function fuck() {
- $this->load->view('graph','');
- // echo base_url();
- }
- public function get_directions($actualid, $q_type) {
- $this->load->helper('url');
- $this->load->library('parser');
- $stuff = array("actualid" => $actualid);
- $this->parser->parse($q_type . '_header', $stuff);
- }
- public function diagnostics() {
- $user = $this->ion_auth->user()->row();
- $usercreated = $user->created_on;
- $userlogin = $user->last_login;
- $timespent = $userlogin - $usercreated;
- $hours = $timespent/3600;
- $stuff = array("hours" => "shit");
- $this->load->library('parser');
- $this->parser->parse('diagnostics', array("hours" => $hours));
- }
- public function get_incorrect_answers(){
- $user = $this->ion_auth->user()->row();
- $userid = $user->email;
- $ferrari = "SELECT QuestionID FROM TestDatabase WHERE (SelectedAnswer != CorrectAnswer AND UserID = '$userid' AND TYPE = 'Writing');" ;
- $query = $this->db->query($ferrari);
- $qs = array();
- $count = 0;
- foreach ($query->result() as $row)
- {
- array_push($qs, $row->QuestionID);
- }
- $nqs = array();
- for ($i = 0; $i < count($qs); ++$i)
- {
- array_push($nqs, array('id' => $qs[$i], 'q_num' => $i + 1 ));
- }
- $stuff = array("data" => $nqs);
- $data = array(
- 'blog_entries' => array(
- array('title' => 'Title 1'),
- array('title' => 'Title 2'),
- array('title' => 'Title 3'),
- array('title' => 'Title 4'),
- array('title' => 'Title 5')
- )
- );
- echo "<br><br>";
- $this->load->library('parser');
- $this->parser->parse("wrong_questions", $stuff);
- }
- public function writingdiagnostics_new($smartdiagnosticid)
- {
- $user = $this->ion_auth->user()->row();
- $userid = $user->username;
- $this->load->helper('url');
- $this->load->library('parser');
- $this->load->model('Model');
- // $sql = "INSERT INTO TestDatabase(UserID,QuestionID) VALUES ('$userid','$q_num');";
- // $this->db->query($sql);
- $q_num = $smartdiagnosticid;
- $stuff = $this->Model->assign_sample_data_writing($q_num);
- $test = array('username' => $userid);
- $this->load->view('userheader', $test);
- $this->parser->parse($stuff["question_type"]."_review", $stuff);
- }
- public function statistics() {
- $user = $this->ion_auth->user()->row();
- $useremail = $user->email;
- $question = array();
- for ($i = 1; $i <= 61; $i++){
- $yolo = "SELECT QuestionID FROM SMARTDiagnosticWritingQSourceData WHERE SmartDiagnosticID = $i";
- $cholo = $this->db->query($yolo);
- $bolo = $cholo->row();
- $lolo = $bolo->QuestionID;
- $rage = "SELECT SelectedAnswer, CorrectAnswer, Time FROM TestDatabase WHERE UserID = '$useremail' AND QuestionID = $lolo";
- $anger = $this->db->query($rage);
- $hatred = $anger->row();
- $venom = $hatred->SelectedAnswer;
- $poison = $hatred->CorrectAnswer;
- $carnage = $hatred->Time;
- ${$i} = array(
- "username" => $useremail,
- "Ans" => $venom,
- "Time" => $carnage,
- "CorrectAnswer" => $poison,
- );
- $questions[] = ${$i};
- }
- $stuff = array("details" => $questions);
- $this->load->library('parser');
- $this->parser->parse("statistics", $stuff);
- }
- public function statistics2() {
- $user = $this->ion_auth->user()->row();
- $useremail = $user->email;
- $question = array();
- for ($i = 1; $i <= 61; $i++){
- $yolo = "SELECT QuestionID FROM SMARTDiagnosticWritingQSourceData WHERE SmartDiagnosticID = $i";
- $cholo = $this->db->query($yolo);
- $bolo = $cholo->row();
- $lolo = $bolo->QuestionID;
- $rage = "SELECT SelectedAnswer, CorrectAnswer, Tim FROM TestDatabase WHERE UserID = '268098121@qq.com' AND QuestionID = $lolo";
- $anger = $this->db->query($rage);
- $hatred = $anger->row();
- $venom = $hatred->SelectedAnswer;
- $poison = $hatred->CorrectAnswer;
- $tony = "SELECT PercentageCorrect, AveTimeCorrect FROM SMARTDiagnosticWritingQSourceData WHERE QuestionID = $lolo";
- $stark = $this->db->query($tony);
- $invincible = $stark->row();
- $iron = $invincible->PercentageCorrect;
- $carnage = $hatred->Tim;
- $AveTimeCorrect = $invincible->AveTimeCorrect;
- ${$i} = array(
- "q_num" => $i,
- "username" => $useremail,
- "Ans" => $venom,
- "CorrectAnswer" => $poison,
- "Tim" => $carnage,
- "PercentageCorrect" => $iron,
- "AveTimeCorrect" => $AveTimeCorrect
- );
- $questions[] = ${$i};
- }
- $test = array("details" => $questions);
- $this->load->library('parser');
- $this->parser->parse('statistics', $test);
- }
- public function statistics3() {
- $user = $this->ion_auth->user()->row();
- $useremail = 'Anderson';
- $ferrari = "SELECT WritingCorrect, WritingSkipped, WritingIncorrect, WritingTotal FROM UserDistributions2 WHERE User = 'Anderson'";
- $algo = $this->db->query($ferrari);
- $aldo = $algo->row();
- $roma = $aldo->WritingCorrect;
- $alta = $aldo->WritingTotal;
- $forza = $aldo->WritingSkipped;
- $italia = $aldo->WritingIncorrect;
- $florentina = intval($italia)*(-0.25) + intval($roma);
- $simple = array(
- "Correct" => $roma,
- "Skipped" => $forza,
- "Incorrect" => $italia,
- "Total" => $alta,
- "Scaled" => $florentina
- );
- $this->load->library('parser');
- $this->parser->parse('stats_ind', $simple);
- }
- public function statistics4() {
- $user = $this->ion_auth->user()->row();
- $useremail = 'Anderson';
- /*$ferrari = "SELECT WritingCorrect, WritingSkipped, WritingIncorrect, WritingTotal FROM UserDistributions2 WHERE User = 'Anderson'";
- $algo = $this->db->query($ferrari);
- $aldo = $algo->row();
- $roma = $aldo->WritingCorrect;
- $alta = $aldo->WritingTotal;
- $forza = $aldo->WritingSkipped;
- $italia = $aldo->WritingIncorrect;
- $total = array(
- "Correct" => $roma,
- "Skipped" => $forza,
- "Incorrect" => $aldo,
- "Total" => $alta,
- );*/
- $ferrari = "SELECT IECorrect, IESkipped, IEIncorrect, IETotal FROM UserDistributions2 WHERE User = 'Anderson'";
- $algo = $this->db->query($ferrari);
- $aldo = $algo->row();
- $IECorrect = $aldo->IECorrect;
- $IETotal = $aldo->IETotal;
- $IESkipped = $aldo->IESkipped;
- $IEIncorrect = $aldo->IEIncorrect;
- $ferrari = "SELECT ISCorrect, ISSkipped, ISIncorrect, ISTotal FROM UserDistributions2 WHERE User = 'Anderson'";
- $algo = $this->db->query($ferrari);
- $aldo = $algo->row();
- $ISCorrect = $aldo->ISCorrect;
- $ISTotal = $aldo->ISTotal;
- $ISSkipped = $aldo->ISSkipped;
- $ISIncorrect = $aldo->ISIncorrect;
- $ferrari = "SELECT IPCorrect, IPSkipped, IPIncorrect, IPTotal FROM UserDistributions2 WHERE User = 'Anderson'";
- $algo = $this->db->query($ferrari);
- $aldo = $algo->row();
- $IPCorrect = $aldo->IPCorrect;
- $IPTotal = $aldo->IPTotal;
- $IPSkipped = $aldo->IPSkipped;
- $IPIncorrect = $aldo->IPIncorrect;
- $yes = array(
- "IE_Correct" => $IECorrect,
- "IE_Skipped" => $IESkipped,
- "IE_Incorrect" => $IEIncorrect,
- "IE_Total" => $IETotal,
- "IS_Correct" => $ISCorrect,
- "IS_Skipped" => $ISSkipped,
- "IS_Incorrect" => $ISIncorrect,
- "IS_Total" => $ISTotal,
- "IP_Correct" => $IPCorrect,
- "IP_Skipped" => $IPSkipped,
- "IP_Incorrect" => $IPIncorrect,
- "IP_Total" => $IPTotal
- );
- $this->load->library('parser');
- $this->parser->parse('stats_total', $yes);
- }
- public function statistics65() {
- $user = $this->ion_auth->user()->row();
- $useremail = $user->first_name;
- $ferrari = "SELECT WritingCorrect, WritingSkipped, WritingIncorrect, WritingTotal FROM UserDistributions2 WHERE User = '$useremail'";
- $algo = $this->db->query($ferrari);
- $aldo = $algo->row();
- $roma = $aldo->WritingCorrect;
- $alta = $aldo->WritingTotal;
- $forza = $aldo->WritingSkipped;
- $italia = $aldo->WritingIncorrect;
- $total = array(
- "Correct" => $roma,
- "Skipped" => $forza,
- "Incorrect" => $aldo,
- "Total" => $alta,
- );
- $ferrari = "SELECT IECorrect, IESkipped, IEIncorrect, IETotal FROM UserDistributions2 WHERE User = '$useremail'";
- $algo = $this->db->query($ferrari);
- $aldo = $algo->row();
- $IECorrect = $aldo->IECorrect;
- $IETotal = $aldo->IETotal;
- $IESkipped = $aldo->IESkipped;
- $IEIncorrect = $aldo->IEIncorrect;
- echo $IEIncorrect;
- $ferrari = "SELECT ISCorrect, ISSkipped, ISIncorrect, ISTotal FROM UserDistributions2 WHERE User = '$useremail'";
- $algo = $this->db->query($ferrari);
- $aldo = $algo->row();
- $ISCorrect = $aldo->ISCorrect;
- $ISTotal = $aldo->ISTotal;
- $ISSkipped = $aldo->ISSkipped;
- $ISIncorrect = $aldo->ISIncorrect;
- echo $ISIncorrect;
- $ferrari = "SELECT IPCorrect, IPSkipped, IPIncorrect, IPTotal FROM UserDistributions2 WHERE User = '$useremail'";
- $algo = $this->db->query($ferrari);
- $aldo = $algo->row();
- $IPCorrect = $aldo->IPCorrect;
- $IPTotal = $aldo->IPTotal;
- $IPSkipped = $aldo->IPSkipped;
- $IPIncorrect = $aldo->IPIncorrect;
- $yes = array(
- "Correct" => $roma,
- "Skipped" => $forza,
- "Incorrect" => $italia,
- "Total" => $alta,
- "IE_Correct" => $IECorrect,
- "IE_Skipped" => $IESkipped,
- "IE_Incorrect" => $IEIncorrect,
- "IE_Total" => $IETotal,
- "IS_Correct" => $ISCorrect,
- "IS_Skipped" => $ISSkipped,
- "IS_Incorrect" => $ISIncorrect,
- "IS_Total" => $ISTotal,
- "IP_Correct" => $IPCorrect,
- "IP_Skipped" => $IPSkipped,
- "IP_Incorrect" => $IPIncorrect,
- "IP_Total" => $IPTotal
- );
- $this->load->library('parser');
- $this->parser->parse('stats_total', $yes);
- }
- public function concept_wise(){
- $user = $this->ion_auth->user()->row();
- $useremail = $user->first_name;
- $ferrari = "SELECT PronounCasePercentage, PronounAntecedentPercentage, WordPhraseUsagePercentage, ClausesPercentage, ConcisePercentage, VerbFormsPercentage, SubjectAgreementPercentage, ModifiersPercentage, ParallelismPercentage, ComparisonPercentage, ImprovingParagraphsPercentage FROM UserDistributions2 WHERE User = '$useremail'";
- $algo = $this->db->query($ferrari);
- $aldo = $algo->row();
- $a = $aldo->PronounCasePercentage;
- $b = $aldo->PronounAntecedentPercentage;
- $c = $aldo->WordPhraseUsagePercentage;
- $d = $aldo->ClausesPercentage;
- $e = $aldo->ConcisePercentage;
- $f = $aldo->VerbFormsPercentage;
- $g = $aldo->SubjectAgreementPercentage;
- $h = $aldo->ModifiersPercentage;
- $i = $aldo->ParallelismPercentage;
- $j = $aldo->ComparisonPercentage;
- $k = $aldo->ImprovingParagraphsPercentage;
- if (floatval($a) < 0.75){$a = "Struggling";}
- else if (floatval($a) >= 0.75 && floatval($a) <= 0.99 ){$a = "Needs Practice";}
- else {$a = "Mastered";}
- if (floatval($b) < 0.75){$b = "Struggling";}
- else if (floatval($b) >= 0.75 && floatval($b) <= 0.99 ){$b = "Needs Practice";}
- else {$b = "Mastered";}
- if (floatval($c) < 0.75){$c = "Struggling";}
- else if (floatval($c) >= 0.75 && floatval($c) <= 0.99 ){$c = "Needs Practice";}
- else {$c = "Mastered";}
- if (floatval($d) < 0.75){$d = "Struggling";}
- else if (floatval($d) >= 0.75 && floatval($d) <= 0.99 ){$d = "Needs Practice";}
- else {$d = "Mastered";}
- if (floatval($e) < 0.75){$e = "Struggling";}
- else if (floatval($e) >= 0.75 && floatval($e) <= 0.99 ){$e = "Needs Practice";}
- else {$e = "Mastered";}
- if (floatval($f) < 0.75){$f = "Struggling";}
- else if (floatval($f) >= 0.75 && floatval($f) <= 0.99 ){$f = "Needs Practice";}
- else {$f = "Mastered";}
- if (floatval($g) < 0.75){$g = "Struggling";}
- else if (floatval($g) >= 0.75 && floatval($g) <= 0.99 ){$g = "Needs Practice";}
- else {$g = "Mastered";}
- if (floatval($h) < 0.75){$h = "Struggling";}
- else if (floatval($h) >= 0.75 && floatval($h) <= 0.99 ){$h = "Needs Practice";}
- else {$h = "Mastered";}
- if (floatval($i) < 0.75){$i = "Struggling";}
- else if (floatval($i) >= 0.75 && floatval($i) <= 0.99 ){$i = "Needs Practice";}
- else {$i = "Mastered";}
- if (floatval($j) < 0.75){$j = "Struggling";}
- else if (floatval($j) >= 0.75 && floatval($a) <= 0.99 ){$j = "Needs Practice";}
- else {$j = "Mastered";}
- if (floatval($k) < 0.75){$k = "Struggling";}
- else if (floatval($k) >= 0.75 && floatval($a) <= 0.99 ){$k = "Needs Practice";}
- else {$k = "Mastered";}
- $no = array(
- "PronounCase" => $a,
- "PronounAntecedent" => $b,
- "WordPhrase" => $c,
- "Clauses" => $d,
- "Conciseness" => $e,
- "VerbForms" => $f,
- "SubjectAgreement" => $g,
- "Modifiers" => $h,
- "Parallelism" => $i,
- "Comparison" => $j,
- "ImprovingParagraphs" => $k
- );
- $this->load->library('parser');
- $this->parser->parse('concept', $no);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement