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

MDL-71941 core_grades: use 'gradenoun' core string #83

Merged
merged 2 commits into from
Sep 26, 2024

Conversation

wiktorwandachowicz
Copy link
Contributor

Replace ('grade','grades') string by core ('gradenoun') string.

This will help unit tests to pass: question_test.php and walkthrough_test.php

See: https://tracker.moodle.org/browse/MDL-71941
See: moodle/moodle@1e2300f

Replace ('grade','grades') string by core ('gradenoun') string.

See: https://tracker.moodle.org/browse/MDL-71941
See: moodle/moodle@1e2300f
@PhMemmel
Copy link
Member

PhMemmel commented Sep 2, 2024

Thank you very much for providing this patch and sorry for responding that late. Is this change downwards compatible? If not, would you mind adding if ($CFG->branch >= '404') { ... } so we do not need to maintain a different branch? Thanks in advance!

…patibility

Replace ('grade','grades') string by core ('gradenoun') string.

See: https://tracker.moodle.org/browse/MDL-71941
See: moodle/moodle@1e2300f
@wiktorwandachowicz
Copy link
Contributor Author

The language string was introduced in https://tracker.moodle.org/browse/MDL-71118 for Moodle 3.11 branch (Fixed field).

In fact since 3.11 Moodle provides new "global" strings (for "[the] grade" as a thing/noun, and "[to] grade" as action/verb),
see: https://github.com/moodle/moodle/blob/MOODLE_311_STABLE/lang/en/moodle.php

$string['grades'] = 'Grades';
$string['gradenoun'] = 'Grade';
$string['gradeverb'] = 'Grade';

But in 3.10 there is only one "global" string for plural form,
see: https://github.com/moodle/moodle/blob/MOODLE_310_STABLE/lang/en/moodle.php

$string['grades'] = 'Grades';

Since 3.10 is not supported anymore and we already have Moodle 4.4 installed, there is no need to check for branch in our case.

Compatibility

But if you really need backwards compatibility, I have prepared another commit with such a thing.
So you can decide which version you would like to use.

Compare changes: main...wiktorwandachowicz:m44-qtype_geogebra:MDL-71941
See 2nd commit: 3b0e522

Do you want me to open another pull request with both commits?

Copy link
Member

@PhMemmel PhMemmel left a comment

Choose a reason for hiding this comment

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

Thank you so much for the contribution.

You are right, we should not actively support versions of moodle that are that old, but I believe, currently this plugin is being used also on older platforms, so I use your version of the fix which includes backwards compatibility. Once we're reworking this plugin we will remove all legacy code like this.

Again very sorry for the long delay!

@PhMemmel PhMemmel merged commit aa834ce into mebis-lp:main Sep 26, 2024
12 of 16 checks passed
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