lmsace / moodle-hide-correct-questions

This Moodle plugin allows teachers to hide questions that have been correctly answered in previous attempts. This can be useful in preventing students from seeing the correct answers and encourages them to attempt the questions again.
https://lmsace.com
0 stars 1 forks source link

Error "A required parameter (attempt) was missing when starting a new preview" in Quiz Preview Mode #9

Open vithushau opened 1 month ago

vithushau commented 1 month ago

Hi

In the Quiz module, when attempting to "Start a new preview" while in preview mode, an error occurs: "A required parameter (attempt) was missing." This issue arises when the following options are enabled under Extra restrictions on attempts:

  1. Questions auto grade
  2. Hide questions on attempt
  3. Additionally, the Each attempt builds on the last option under Question behaviour is also enabled.

Screenshot from 2024-07-16 15-31-03

The error message below

A required parameter (attempt) was missing

More information about this error
Debug info:
Error code: missingparam
Stack trace:

    line 610 of /lib/moodlelib.php: moodle_exception thrown
    line 304 of /mod/quiz/accessrule/hidecorrect/rule.php: call to required_param()
    line 401 of /mod/quiz/accessmanager.php: call to quizaccess_hidecorrect->current_attempt_finished()
    line 2614 of /mod/quiz/locallib.php: call to quiz_access_manager->current_attempt_finished()
    line 70 of /mod/quiz/startattempt.php: call to quiz_validate_new_attempt()

Moodle Version: 4.1

abinesh-lmsace commented 1 month ago

Hi vithushau

Thank you for bringing this issue to our attention. We will address it and release an updated version soon.