Skip to content

Commit

Permalink
Refactor: remove questions check from addscalestandarderror
Browse files Browse the repository at this point in the history
It is not necessary and not the responsibility of this class to check
if no questions are remaining.
  • Loading branch information
davidszkiba committed Jan 23, 2024
1 parent c535218 commit 150d12d
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions classes/teststrategy/preselect_task/addscalestandarderror.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,6 @@ public function __construct() {
*
*/
public function run(array &$context, callable $next): result {
if (count($context['questions']) === 0) {
return result::err(status::ERROR_NO_REMAINING_QUESTIONS);
}

$cache = cache::make('local_catquiz', 'adaptivequizattempt');
$context['playedquestionsperscale'] = $this->getplayedquestionsperscale();
$cachedresponses = $cache->get('userresponses');
Expand Down

0 comments on commit 150d12d

Please sign in to comment.