From 58421ffbefc4994655d8fdadc2c93ed62076e5c2 Mon Sep 17 00:00:00 2001 From: Corey Peterson Date: Tue, 1 Oct 2024 17:07:26 -0400 Subject: [PATCH] Added semester param to instance score history call in score module --- fuel/app/classes/materia/score/module.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fuel/app/classes/materia/score/module.php b/fuel/app/classes/materia/score/module.php index 1fe453cde..554464ff5 100644 --- a/fuel/app/classes/materia/score/module.php +++ b/fuel/app/classes/materia/score/module.php @@ -96,7 +96,8 @@ public function validate_scores($timestamp=false) // Check for attempt limit prior to submission, but only for actual plays (not previews) if ($this->play_id != -1) { - $attempts_used = count(\Materia\Score_Manager::get_instance_score_history($this->inst->id, $this->play->context_id)); + $semester = Semester::get_current_semester(); + $attempts_used = count(\Materia\Score_Manager::get_instance_score_history($this->inst->id, $this->play->context_id, $semester)); if ($this->inst->attempts != -1 && $attempts_used >= $this->inst->attempts) { throw new Score_Exception('Attempt Limit Met', 'You have already met the attempt limit for this widget and cannot submit additional scores.');