Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions can have negative position numbers #619

Open
HirotoKagotani opened this issue Dec 24, 2024 · 1 comment
Open

Questions can have negative position numbers #619

HirotoKagotani opened this issue Dec 24, 2024 · 1 comment
Assignees

Comments

@HirotoKagotani
Copy link

I had the same situation as a discussion topic https://moodle.org/mod/forum/discuss.php?d=390636 and I figured out how to give negative position numbers to questions.

I am using Questionnaire version 4.1.1 on Moodle 4.1.

Reproduction steps:

  1. Add a Questionnaire Q1 with one or more question(s).
  2. Add another Questionnaire Q2 with:
    • a question.
    • a page break.
    • any number of question(s).
  3. Move the 1st question of Q2 to the next position of the page break.
  4. The page break is deleted by the code in class/questions_form.php.
  5. You see the position number of the 1st question of Q1 is 0. (Also the position numbers of ALL questions of ALL questionnaires are decreased by one)
  6. Add a page break to Q2.
  7. Move the page break to the 2nd position.
  8. Move the 1st question of Q2 to the next position of the page break again.
  9. You see the position number of the 1st question of Q1 is -1.
  10. and so on...

Also we need a method to safely reset the position numbers for all questionnaires (in a Moodle) from 1.

@simondipad
Copy link

I have this issue, and have discovered that the effect of these negative numbers to the user is that the save/resume action drops the user back into the questionnaire several pages ahead of where they left off, even if there are previous pages with required responses, these are skipped over. There is a reset method but the problem recurs in the same questionnaire instance after a while. Tested this on two seperate moodle installations with the same results. This is a major problem from a UX point of view.

@mchurchward mchurchward self-assigned this Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants