$string['groupmembersonlyerror'] not used in Moodle 2?

$string['groupmembersonlyerror'] not used in Moodle 2?

ໂດຍ Joseph Rézeau -
ຈຳນວນການຕອບກັບ: 4
ຮູບພາບຂອງ Core developers ຮູບພາບຂອງ Particularly helpful Moodlers ຮູບພາບຂອງ Plugin developers ຮູບພາບຂອງ Testers ຮູບພາບຂອງ Translators

In Moodle 1.9, that string was used in moodlelib.

In Moodle 2.x, that string is still present in lang/en/group.php but it is not used anywhere in moodle core. I expect the reason is that modules are expected to test group membership in such ways that the 'groupmembersonlyerror' warning is no longer necessary.

Can developers confirm my findings? Do any add-ons developers actually use that string?

Joseph

ການຈັດອັນດັບສະເລ່ຍ: -
ໃນການຕອບກັບຫາ Joseph Rézeau

Re: $string['groupmembersonlyerror'] not used in Moodle 2?

ໂດຍ Gareth J Barnard -
ຮູບພາບຂອງ Core developers ຮູບພາບຂອງ Particularly helpful Moodlers ຮູບພາບຂອງ Plugin developers

Dear Joseph,

I did a search on the whole of Moodle 2.5.2+ (Build: 20130927) on 'groupmembersonlyerror' and only found it defined as you said in 'lang/en/group.php' - so it could be removed - perhaps with an advanced warning notice to developers.

I think that core takes the view that anything in core is subject to change and plugin's should follow it with core not 'pandering' to plugins.

Cheers,

Gareth

ການຈັດອັນດັບສະເລ່ຍ: -
ໃນການຕອບກັບຫາ Gareth J Barnard

Re: $string['groupmembersonlyerror'] not used in Moodle 2?

ໂດຍ Anne Krijger -

While it may be true that the string is no longer used...

...searching and not finding on 'groupmembersonlyerror' is not a definate enough finding to come to this conclusion.

The string may be used with double quotes,
or even concatenated by a couple of variables;

$warning = get_string($grptype . $grprole . $grplimit . $grperrormsg);

which would be near to impossible to find as being a reference to groupmembersonlyerror.

Anne.

ການຈັດອັນດັບສະເລ່ຍ: -
ໃນການຕອບກັບຫາ Anne Krijger

Re: $string['groupmembersonlyerror'] not used in Moodle 2?

ໂດຍ Joseph Rézeau -
ຮູບພາບຂອງ Core developers ຮູບພາບຂອງ Particularly helpful Moodlers ຮູບພາບຂອງ Plugin developers ຮູບພາບຂອງ Testers ຮູບພາບຂອງ Translators

Anne "The string may be [...] concatenated by a couple of variables;"

I doubt it. Do you have any concrete examples of such concatenations in moodle core files?

Joseph

ການຈັດອັນດັບສະເລ່ຍ: -
ໃນການຕອບກັບຫາ Joseph Rézeau

Re: $string['groupmembersonlyerror'] not used in Moodle 2?

ໂດຍ Anne Krijger -

Hi Jospeh,

Just to be clear; I concur that 'groupmembersonlyerror' may not be used anymore.

But concatenations of strings do[es] happen quite a few times.
I ran a simple search for get_string($ and that alone already gave 256 hits.
Nothing compared to the 15717 hits for get_string( but still enough to make it hard to be a 100% certain a specific string is no longer used.

None of the 256 hits had a reference to the group component, making it extremely likely that the string is no longer used, but still can't make a definite call.

Anne.

ການຈັດອັນດັບສະເລ່ຍ:Useful (1)