Skip to content

Commit

Permalink
Added semester param to instance score history call in score module
Browse files Browse the repository at this point in the history
  • Loading branch information
clpetersonucf committed Oct 1, 2024
1 parent 087030c commit 58421ff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fuel/app/classes/materia/score/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
Expand Down

0 comments on commit 58421ff

Please sign in to comment.