diff --git a/app/controllers/candidate_controller.rb b/app/controllers/candidate_controller.rb index aa6cb4c..fb7df1c 100644 --- a/app/controllers/candidate_controller.rb +++ b/app/controllers/candidate_controller.rb @@ -3,7 +3,7 @@ class CandidateController < ApplicationController end def question - @question = Question.where(input_type: 'live-coder').order("RAND()").first + @question = Question.order("RAND()").first # .where(input_type: 'live-coder') @status = QuizStatus.new(Candidate.order("RAND()").first) @answer = @question.answers.order("RAND()").first end diff --git a/app/views/candidate/question.html.erb b/app/views/candidate/question.html.erb index 942631c..be9a415 100644 --- a/app/views/candidate/question.html.erb +++ b/app/views/candidate/question.html.erb @@ -27,27 +27,11 @@ - + +<% end %> diff --git a/app/workers/quiz_status.rb b/app/workers/quiz_status.rb index 8b5af02..0a5a747 100644 --- a/app/workers/quiz_status.rb +++ b/app/workers/quiz_status.rb @@ -21,26 +21,10 @@ class QuizStatus on_summary && candidate.answered_questions.count == candidate.questions.count end - # query($TotalQuestions); - # $TotalQuestions = $result->num_rows + 1; - # - # $progressBarValue = round($questionId/$TotalQuestions * 100); - # $_SESSION['pBarValue'] = $progressBarValue; - # - # $pValue = $_SESSION['pBarValue']; - # - # if(!isset($_GET['qid'])) { ?> - #