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

Add device experiment #79

Merged
merged 3 commits into from
Jan 15, 2025
Merged

Conversation

bwalkerl
Copy link
Contributor

@bwalkerl bwalkerl commented Jan 13, 2025

Closes #75
Closes #74 - Rather than converting everything to _before_session and trying to resolve other issues with $SESSION and $USER being null, it's safer to only have the new experiment type use it.

lib.php Outdated Show resolved Hide resolved
lib.php Outdated Show resolved Hide resolved
lib.php Outdated Show resolved Hide resolved

// Now, execute all commands in the arrays.
foreach ($commandarray as $shortname => $command) {
tool_abconfig_execute_command_array($command, $shortname);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be good to split out most of the logic above which figures out what to do, from the execution, so that we can unit test the first half

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this depend on how much testing we want. I've left it as is for now, but I haven't gone too deep into testing the specific logic for devices (the tests I've added so far are variations of the original tests that have been slightly modified for devices).

@bwalkerl bwalkerl force-pushed the 75-add-device-experiment branch 3 times, most recently from e0c40d7 to 661e7ef Compare January 14, 2025 07:33
@bwalkerl bwalkerl force-pushed the 75-add-device-experiment branch from 661e7ef to 1f0f4b7 Compare January 14, 2025 07:50
@brendanheywood brendanheywood merged commit ab2d43e into MOODLE_38_STABLE Jan 15, 2025
35 checks passed
@brendanheywood brendanheywood deleted the 75-add-device-experiment branch January 15, 2025 01:20
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

Successfully merging this pull request may close these issues.

We need a new type of experiment 'device' Convert _after_config to _before_session
2 participants