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 · 0 comments
Open

Questions can have negative position numbers #619

HirotoKagotani opened this issue Dec 24, 2024 · 0 comments

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.

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

1 participant