getQuestionsOnlyCompletionRate method

double getQuestionsOnlyCompletionRate()

This method is used to compute the completion bar when in question_by_question mode

Implementation

double getQuestionsOnlyCompletionRate() {
  var totalAnswerableQuestions = getAllStepsAnswerableQuestions().length;
  if (totalAnswerableQuestions == 0) {
    return 0;
  }
  var currentPositionInQuestions = 0;
  currentPositionInQuestions = getQuestionIndexInAllStepsAnswerables(currentDisplayableQuestion);
  return currentPositionInQuestions / totalAnswerableQuestions;
}