studentquiz / moodle-mod_studentquiz

Moodle-Plugin
GNU General Public License v3.0
38 stars 38 forks source link

StudentQuiz: Display all questions when changing state of a question … #402

Closed JBThong closed 2 years ago

JBThong commented 2 years ago

Hi Tim,

I have fixed the issue "Display all questions when changing state of a question after setting page size "

Steps to reproduce:

  1. Create a new StudentQuiz
  2. Add at least 21 questions inside so that the Page size setting is shown (Page size default =20)
  3. Change the Page size (Eg: Page size =10)
  4. Click to state icon to change the state of 1 question
  5. Observe the display of the Confirmation pop-up

Actual: Display all question in pop-up change states image

Expected: We just display one question which was selected.

Could you please help me to review this? Many thanks

timhunt commented 2 years ago

Looking at this issue makes me think that there is somthing fundamentally wrong in the code (probably the same thing that is wrong with #574587.) It seems we sent ->baseurl to a value which is not what we want, and then there are thousands of calls to $this->baseurl->remove_params all over the place.

Really, we should work out what we want in baseurl in the first place, and what we don't. However, a long term fix will have to wait for another issue.

The change proposed here is in the style of the existing code, and makes things a bit better, so merging.