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

Fixes for Moodle 4.1 compatibility #153

Merged

Conversation

marxjohnson
Copy link
Contributor

Resolves #152

@@ -98,7 +98,7 @@ function safety_checks($dryrun) {
AND u.deleted = 0";

if ($DB->count_records_sql($csql, $params)) {
$namefields = "u." . implode(', u.', get_all_user_name_fields());
$namefields = "u." . implode(', u.', \core_user\fields::get_name_fields());
Copy link
Contributor

Choose a reason for hiding this comment

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

won't this break in older moodles where this doesn't exist yet? Either we need to detect the version and call the old function of pick a version and cut a new stable branch. It would be better have this in a unit test to expose that issue across versions too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This function was introduced on Moodle 3.11, so you're right that it won't work on Moodle 3.10 which this branch supports (although it's no longer a supported release). Personally I prefer separate stable branches over version-detection code, as the latter feels like technical debt. Shall I create a new branch and change this PR's target?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yup please cut a new stable

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, I think you'll have to do that for me. I don't have write access and GitHub doesn't have a way for me to submit a new branch from my repo to this one. I think it would make sense to call it MOODLE_311_STABLE as this and the removed user fields both apply from 3.11 onwards.

Copy link
Contributor

Choose a reason for hiding this comment

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

I've made the new branch as a clone of the 310 one so you can make new prs against that now thanks

@marxjohnson marxjohnson changed the base branch from MOODLE_310_STABLE to MOODLE_311_STABLE February 3, 2023 10:39
@marxjohnson
Copy link
Contributor Author

marxjohnson commented Feb 3, 2023

Hi @brendanheywood ,
I've rebased this on the new stable branch, bumped the version and supported core versions, and added the new branch to the README. I think this is ready to merge now.
Scratch that, I just realised I need to update the github actions matrix.

I've also raised additional PRs to update the README on the other branches.

@marxjohnson
Copy link
Contributor Author

@brendanheywood There we go, all green now on 3.11-4.1.

@danmarsden danmarsden merged commit 3daf99f into catalyst:MOODLE_311_STABLE Feb 6, 2023
@danmarsden
Copy link
Member

looks good to me - I've also updated the default branch here it github to "MOODLE_311_STABLE" - I didn't delete the old "master" branch as it will break AU pipelines using the older master branch.

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.

Moodle 4.1 testing -> Some issues found
3 participants