pull/2487/head
Yannick Warnier 8 years ago
commit 5955bd802f
  1. 4
      main/exercise/ReadingSpeed.php

@ -57,6 +57,7 @@ class ReadingSpeed extends UniqueAnswer
// Refresh is set to 5s, but speed is in words per minute
$wordsPerSecond = $this->speeds[$this->level] / 60;
$this->expectedWordsPerRefresh = intval($wordsPerSecond * $this->refreshTime);
}
public function createAnswersForm($form)
@ -144,6 +145,9 @@ class ReadingSpeed extends UniqueAnswer
public function processText($text)
{
//recalulate the expected words count
$this->expectedCount = self::$speeds[$this->level];
$words = str_word_count($text, 2, '0..9');
$indexes = array_keys($words);

Loading…
Cancel
Save