Skip to content
Snippets Groups Projects
Commit 9ec615a8 authored by falcon's avatar falcon
Browse files

#631930 by vegardjo: Problems with desimal numbers as scores...

parent 373dfac9
No related branches found
No related tags found
No related merge requests found
......@@ -653,14 +653,14 @@ abstract class AbstractQuizQuestionResponse implements QuizQuestionResponse {
function getScore($weight_adjusted = TRUE) {
if (!isset($this->score)) $this->score = $this->score();
if (isset($this->question->score_weight) && $weight_adjusted)
return $this->score * $this->question->score_weight;
return round($this->score * $this->question->score_weight);
return $this->score;
}
public function getMaxScore($weight_adjusted = TRUE) {
if (!isset($this->question->max_score)) $this->question->max_score = $this->question->getMaximumScore();
if (isset($this->question->score_weight) && $weight_adjusted)
return $this->question->max_score * $this->question->score_weight;
return round($this->question->max_score * $this->question->score_weight);
return $this->question->max_score;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment