Moodle

Forum: Missing language string for print_error in /mod/forum/rate_ajax.php

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Trivial Trivial
  • Resolution: Unresolved
  • Affects Version/s: 1.9.4
  • Fix Version/s: None
  • Component/s: Forum, Language
  • Labels:

Description

While playing with a possible patch for CONTRIB-1085, I noticed the following line:

print_error('mustbeloggedin');

There is no string or documentation page for mustbeloggedin. I played with the idea of simply using 'loggedinnot'; however, there was a comment in print_error indicating that it is best to have the string defined in error.php rather than relying on the backwards compatible option to look in /lang/en_utf8/moodle.php.

We should also go ahead and create:

http://docs.moodle.org/en/error/moodle/mustbeloggedin

I'll attach a patch with the new language string.

Peace - Anthony

Issue Links

Activity

Hide
Anthony Borrow added a comment -

Actually, the 'mustbeloggedin' string exists (not in alphabetical order, but it exists nonetheless) in HEAD's error.php. I'm just going to go ahead and add it to 19STABLE. Peace - Anthony

Show
Anthony Borrow added a comment - Actually, the 'mustbeloggedin' string exists (not in alphabetical order, but it exists nonetheless) in HEAD's error.php. I'm just going to go ahead and add it to 19STABLE. Peace - Anthony
Hide
Anthony Borrow added a comment -

Koen - I've added you as a watcher here just so you see the addition of the error string to 19STABLE. This is a very trivial issue as it is only used in one place. The string was introduced into 1.9 by Eloy while working on MDL-17364. Before adding it, I'll go ahead and wait for your confirmation that it is OK as I do not know the implications for languages of introducing the string. For now, I'm just going to work on the docs page. Peace - Anthony

Show
Anthony Borrow added a comment - Koen - I've added you as a watcher here just so you see the addition of the error string to 19STABLE. This is a very trivial issue as it is only used in one place. The string was introduced into 1.9 by Eloy while working on MDL-17364. Before adding it, I'll go ahead and wait for your confirmation that it is OK as I do not know the implications for languages of introducing the string. For now, I'm just going to work on the docs page. Peace - Anthony
Hide
Anthony Borrow added a comment -

I'm trivializing this and re-assigning to Koen as that seems more appropriate. Peace - Anthony

Show
Anthony Borrow added a comment - I'm trivializing this and re-assigning to Koen as that seems more appropriate. Peace - Anthony
Hide
Anthony Borrow added a comment -

Koen - FYI, in HEAD the string is defined as:

$string['mustbeloggedin'] = 'You must be logged in to do this';

Show
Anthony Borrow added a comment - Koen - FYI, in HEAD the string is defined as: $string['mustbeloggedin'] = 'You must be logged in to do this';
Hide
Anthony Borrow added a comment -

Koen - Here is a patch file. Peace - Anthony

Show
Anthony Borrow added a comment - Koen - Here is a patch file. Peace - Anthony
Hide
Anthony Borrow added a comment -

Koen - I found another missing error string: cannotupdaterate also used in /mod/forum/rate_ajax.php. Again, it is defined in HEAD (just not 19STABLE) as:

Could not update an old rating ($a->id = $a->rating)

Peace - Anthony

Show
Anthony Borrow added a comment - Koen - I found another missing error string: cannotupdaterate also used in /mod/forum/rate_ajax.php. Again, it is defined in HEAD (just not 19STABLE) as: Could not update an old rating ($a->id = $a->rating) Peace - Anthony
Hide
Michael de Raadt added a comment -

Thanks for reporting this issue.

We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported.

If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed.

Michael d;

lqjjLKA0p6

Show
Michael de Raadt added a comment - Thanks for reporting this issue. We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported. If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed. Michael d; lqjjLKA0p6
Hide
Anthony Borrow added a comment -

Just following up that cannotupdaterate is no longer used and is hard coded; however, mustbeloggedin is still used and should be fixed in 1.9. It exists in 2.x branches. Peace - Anthony

Show
Anthony Borrow added a comment - Just following up that cannotupdaterate is no longer used and is hard coded; however, mustbeloggedin is still used and should be fixed in 1.9. It exists in 2.x branches. Peace - Anthony
Hide
Anthony Borrow added a comment -

To facilitate pulling this in I have created a patch that can be pulled in from Github. Peace - Anthony

Show
Anthony Borrow added a comment - To facilitate pulling this in I have created a patch that can be pulled in from Github. Peace - Anthony

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated: