simplified configuration for adminapprove #282
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.
🔀 Purpose of this PR:
📝 Description:
Please describe the purpose of this PR in a few sentences.
This PR is a supplement to "Customise buttons in adminapprove step #266".
#266 allows to customise the adminapprove buttons in order to clarify what will happen in case of proceed or rollback.
Unfortunately the final code adds six configuraion values instead of two, and I was not happy with this solution ;-)
The reason for this PR is that the decision table contains buttons for changing "all" records, "selected" records, and "individual" records. So there are several ways to do the same thing.
If you take a look at Moodle, for example, in the admin user overview or the participant overview in courses, you will see that there is a different approach.
Therefore, I have now adjusted the decision table so that a configuration of the original two values is sufficient.
admin approve works properly with only two button labels configured
📋 Checklist
Please confirm the following (check all that apply):
phpunitand/orbehattests that cover my changes or additions.var_dump()orvar_exportor any other debugging statements (or commented out code) thatshould not appear on the productive branch.
db/upgrade.phpandupdated the
version.php..minfiles with thegrunt amdcommand.version.phpand theCHANGES.md.I ran all tests thoroughly checking for errors. I checked if bootstrap had any changes/deprecations that require
changes in the plugins UI.
🔍 Related Issues
🧾📸🌐 Additional Information (like screenshots, documentation, links, etc.)
Any other relevant information.
Creating backups (Create backup step) with behat is tricky because of a static counter
that is incremented with each backup but only reset in a cron run.
This counter affects all behat test cases within a testsuite.
Backups are skipped if 10 backups are already created and a test case will fail
without warning if only scheduled task "tool_lifecycle\task\lifecycle_task" is used. (trigger cron is required.)
This counter should be reset with every single test setup (without doing it in the test case itself).
This is way I switched to adhoc create backup step in the adminapprove step tests.
I added a sort condition to the decision table because the postgresql database
returns the records in a (for me) unpredictable order.
Decision table: One could consider whether to remove the buttons inside of the decision table,
because the corresponding actions can also be performed by selecting and triggering the action.
These actions are still duplicated in the UI.