Skip to content

Commit 69f00dc

Browse files
Merge pull request #1612 from clpetersonucf/issue/1611-fix-for-score-module-attempt-limit-validation
Fix for score module attempt limit validation
2 parents 7b4655a + 58421ff commit 69f00dc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fuel/app/classes/materia/score/module.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ public function validate_scores($timestamp=false)
9696
// Check for attempt limit prior to submission, but only for actual plays (not previews)
9797
if ($this->play_id != -1)
9898
{
99-
$attempts_used = count(\Materia\Score_Manager::get_instance_score_history($this->inst->id, $this->play->context_id));
99+
$semester = Semester::get_current_semester();
100+
$attempts_used = count(\Materia\Score_Manager::get_instance_score_history($this->inst->id, $this->play->context_id, $semester));
100101
if ($this->inst->attempts != -1 && $attempts_used >= $this->inst->attempts)
101102
{
102103
throw new Score_Exception('Attempt Limit Met', 'You have already met the attempt limit for this widget and cannot submit additional scores.');

0 commit comments

Comments
 (0)