Skip to content

Bug: Rate scale question requires all rows answered even when "Response is required" is set to No #713

@jarvil1

Description

@jarvil1

Description
When creating a Rate scale (1–5) question with multiple possible answers (e.g., 5 rows) and setting "Response is required" = No, the system still forces the user to answer every row. The questionnaire does not allow submitting with only some rows answered.

This contradicts the expected behavior of the "Response is required = No" setting.

Steps to Reproduce

  1. Create a new Rate scale (1–5) question.
  2. Add 5 possible answers (rows).
  3. Set "Response is required" = No.
  4. Save the question.
  5. Open the questionnaire and answer only one (or some) of the rows.
  6. Try to submit the questionnaire.

Expected Behavior

When "Response is required" = No, the respondent should be able to:

  • Leave all rows unanswered, OR
  • Answer only some rows.

The questionnaire should submit successfully without validation errors.

Actual Behavior

The form displays validation errors.
The system requires selecting one radio button for each row.
Error message shown:
“There is something wrong with your answer to question 1.”
“Please check 3 radio buttons!”

Environment
Moodle 4.5 & mod_questionnaire 4.4.0 (Build - 2025110900)
Question type: Rate scale (1–5)
Number of rows: 5
Response required setting: No

Impact

This prevents creating optional matrix-style rating questions and forces mandatory responses even when explicitly configured as optional.

Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions