catalyst / moodle-tool_abconfig

A way to A/B test config, or slowly turn on config for certain audiences or % of traffic
https://moodle.org/plugins/tool_abconfig
6 stars 4 forks source link

Avoid raw _GET access #19

Closed brendanheywood closed 4 years ago

brendanheywood commented 4 years ago

https://github.com/catalyst/moodle-tool_abconfig/blob/master/lib.php#L35

https://github.com/catalyst/moodle-tool_abconfig/blob/master/lib.php#L44

danmarsden commented 4 years ago

@Peterburnett is the $_GET here really needed? https://github.com/catalyst/moodle-tool_abconfig/blob/master/lib.php#L44 Can't you iterate over the list of $experiements to see if one exists? especially as you check to see if the experiment exists in the array before you do anything with it here? https://github.com/catalyst/moodle-tool_abconfig/blob/master/lib.php#L53