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

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

Bởi Joseph Rézeau -
Số lượng các câu trả lời: 4
Hình của Core developers Hình của Particularly helpful Moodlers Hình của Plugin developers Hình của Testers Hình của 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

Trung bình điểm đánh giá: -
Để phản hồi tới Joseph Rézeau

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

Bởi Gareth J Barnard -
Hình của Core developers Hình của Particularly helpful Moodlers Hình của 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

Để phản hồi tới Gareth J Barnard

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

Bởi 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.

Để phản hồi tới Anne Krijger

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

Bởi Joseph Rézeau -
Hình của Core developers Hình của Particularly helpful Moodlers Hình của Plugin developers Hình của Testers Hình của 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

Để phản hồi tới Joseph Rézeau

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

Bởi 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.

Trung bình điểm đánh giá:Useful (1)