StudentQuiz: Must not refer to GET or POST in code #667798 #454
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @timhunt ,
Regarding this ticket,
I have made an effort to eliminate the usage of $_GET and $_POST in the studentquiz module and adopt an alternative approach.
To achieve this, I have added parameters to the URL and subsequently reloaded the page with the updated URL. Consequently, we can obtain these parameters using the built-in functions optional_parameter and required_parameter.
However, in certain cases, specifically in file view.php at line 63, the request includes dynamic parameters such as 'q_123', 'q_456', and so on. Unfortunately, these parameters cannot be retrieved through any other means. Therefore, I have resorted to using $_REQUEST to access them.
Could you kindly assist me in reviewing these changes? Thank you.