Moodle

Role defaults should be independent of legacy role type

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Won't Fix
  • Affects Version/s: 1.9
  • Fix Version/s: None
  • Component/s: Roles / Access
  • Labels:
    None
  • Environment:
    Tested today on demo.moodle.org
  • Affected Branches:
    MOODLE_19_STABLE

Description

Suppose I view the details of a pre-defined role such as Student (site administration -> Users -> Permissions -> Define roles -> Student). By default, the Legacy role type shows as LEGACY ROLE: Student. As I understand it, this means that the Student role contains capability called Capabilities/moodle/legacy:student which is used for backward-compability with pre-1.7 code.

On the same View role details page, I see a button labeled "Reset to defaults." As I understand it, this button provides me with a way of restoring the original Student permissions, in case I get myself into trouble. And indeed, it seems to work this way. However I am troubled by the wording of the confirmation dialog which asks me to confirm the reset. It says

::::::::Are you sure that you want to reset role "Student (student)" to defaults?
::::::::The defaults are taken from the selected legacy capability (student).

Is this just careless wording, or is there some deeper meaning, which eludes me? Surely the defaults are not taken from a "legacy role;" they are taken from the definition of the default Student role, which Moodle (thankfully) remembers. Role defaults and legacy role type should be completely orthogonal.

Just to add to the confusion, suppose I start with the default Student role and change the Legacy role type to None. AFAIK the only consequence of doing this should be to break old code that depends on the legacy capability. However when I save changes and go back to the View role details page, the button which used to be labeled "Reset to defaults" is now labeled "Clear permissions/" Why did the label change? The button should have the same meaning as before.

This is causing confusion – see discussion http://moodle.org/mod/forum/discuss.php?d=86926.

Issue Links

Activity

Hide
Petr Škoda (skodak) added a comment -

I agree the UI might be confusing, but internally it is working correctly, right?

Show
Petr Škoda (skodak) added a comment - I agree the UI might be confusing, but internally it is working correctly, right?
Hide
John Isner added a comment -

Yes, I believe it is purely a presentation issue that can be easily fixed, but it is a serious one that is causing a lot of confusion. To summarize, I am suggesting two things need to be done:

1) remove the second line of the Reset to defaults confirmation dialog – the line that says
::::::::The defaults are taken from the selected legacy capability (student)

There is no need to reword this line, as others have suggested. The first line says it all.

2) do not change the label on the Reset to defaults button to "Clear permissions."

Show
John Isner added a comment - Yes, I believe it is purely a presentation issue that can be easily fixed, but it is a serious one that is causing a lot of confusion. To summarize, I am suggesting two things need to be done: 1) remove the second line of the Reset to defaults confirmation dialog – the line that says ::::::::The defaults are taken from the selected legacy capability (student) There is no need to reword this line, as others have suggested. The first line says it all. 2) do not change the label on the Reset to defaults button to "Clear permissions."
Hide
John Isner added a comment -

When I created the issue, I didn't understand that the legacy role types were being used to define defaults for the predefined roles. Now I think the wording is fine, and should not be changed!!

Show
John Isner added a comment - When I created the issue, I didn't understand that the legacy role types were being used to define defaults for the predefined roles. Now I think the wording is fine, and should not be changed!!
Hide
Eloy Lafuente (stronk7) added a comment -

Closing as won't fix. Ciao

Show
Eloy Lafuente (stronk7) added a comment - Closing as won't fix. Ciao

People

Vote (0)
Watch (4)

Dates

  • Created:
    Updated:
    Resolved: