Skip to content

#77 override rebase - #142

Merged
ndunand merged 2 commits into
ndunand:masterfrom
danowar2k:#77-override-rebase
May 27, 2026
Merged

#77 override rebase#142
ndunand merged 2 commits into
ndunand:masterfrom
danowar2k:#77-override-rebase

Conversation

@danowar2k

@danowar2k danowar2k commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

I've cherry picked the autopass commits into a new branch because the old branch contained a big swath of old code that was already rebased and this was easier than rebasing the old branch.

So this should now contain only the autopass changes and probably solves #77.

What we probably need to do now:

  • My people are tasked with the english and german texts for the strings
  • Someone has to look at the layout/colors/accessibility when a row is shown as autopassed (The task has been mentioned to my people)
  • As of now it is still possible to rename the new stuff (i.e. "autopass" or some such is not set in stone)
  • You could take a general look at the code to check for bugs or potential problems
  • There are still CI errors that have to be looked at

I also have to talk with the exam people about all this again...So this gets to be marked as a draft at first again...

@danowar2k
danowar2k marked this pull request as draft February 9, 2026 18:05
@danowar2k danowar2k mentioned this pull request Feb 9, 2026
@danowar2k
danowar2k force-pushed the #77-override-rebase branch from e997367 to 866b626 Compare May 15, 2026 13:08
@danowar2k
danowar2k force-pushed the #77-override-rebase branch 2 times, most recently from 6ca32d9 to 54cb51e Compare May 26, 2026 11:15
@danowar2k danowar2k changed the title Draft: #77 override rebase #77 override rebase May 26, 2026
@danowar2k
danowar2k marked this pull request as ready for review May 26, 2026 11:25
@danowar2k

Copy link
Copy Markdown
Contributor Author

Hi. So I finally had the time to finish my pull request for autopassing rows. I've rebased again and pushed to my repo. Github Actions right now has problems it seems.

You shouldn't do anything before Actions ran once. I tested locally in a Moodle Docker environment with Behat and PHPUnit under PHP 8.1, but not more.

Once Github Actions ran, I'll comment again.

@danowar2k

Copy link
Copy Markdown
Contributor Author

One note: This PR contains a change done because of a Moodle tracker issue: 9123dfb

If you want, I can extract it into another PR.

@danowar2k
danowar2k force-pushed the #77-override-rebase branch from 54cb51e to fb97642 Compare May 26, 2026 14:50
@danowar2k

Copy link
Copy Markdown
Contributor Author

Of course there are errors. Be right back...

@danowar2k
danowar2k force-pushed the #77-override-rebase branch 2 times, most recently from cce9b8a to db61a7e Compare May 26, 2026 17:20
… the point for it, i.e. letting rows "autopass"

Teachers should be able to e.g. give points to everyone for badly worded questions.

- Settings: Add global setting to enable the feature, defaults to off
- Database: Add boolean autopass field to rows
- Logic: Every grading allows autopassing rows
- Logic: The first version of a question should not be able to set or use autopassing
- Logic: Regrading now prevents going from single to multiple or back if the number of correct answers are different
- Logic/Fix: Clean matrix data only at the end of functions that builds that data to prevent duplicates
- Backup/Restore: Adapt values if question version > v1 is restored as a first version
- Import/Export: Ignore when importing, always export as false
- Editing: If enabled, display autopass column for question versions > v1
- Editing: Prevent showing autopass column when duplicating a question
- Response Feedback: Show an icon and an explaining message when a row is autopassed
- Tests: Created and adapted PHPUnit and Behat tests
@danowar2k
danowar2k force-pushed the #77-override-rebase branch from db61a7e to 2594451 Compare May 26, 2026 17:53
@danowar2k

Copy link
Copy Markdown
Contributor Author

Okay. It seems I'd forgotten something or rather didn't test the last minute changes I made: A late game check to prevent storing autopass values for the matrix row of a question with version 1.

Ugh, I don't like how Moodle handles all this. This is all inherently badly testable. All those lib functions which can't be mocked etc etc. No strategy pattern in use most of the time. Just meh.

Okay, tests are now green. Only the tests were wrong, the code was working before :-D

We're now "eagerly" awaiting your opinion and if and when you will merge the PR.

@ndunand

ndunand commented May 27, 2026

Copy link
Copy Markdown
Owner

Hi @danowar2k thanks for all your work on this.

i've deployed this on our testing site and we'll get back to you.

@ndunand
ndunand merged commit c878aee into ndunand:master May 27, 2026
4 checks passed
@ndunand

ndunand commented May 27, 2026

Copy link
Copy Markdown
Owner

Tested and works as expected.

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.

2 participants