Moodle

No way to order roles (& you used to be able to do this before roles!)

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.8, 1.8.1, 1.8.2
  • Fix Version/s: 1.8.3, 1.9
  • Component/s: Roles / Access
  • Labels:
    None
  • Affected Branches:
    MOODLE_18_STABLE
  • Fixed Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE

Description

There is no way to prioritise roles to reflect seniority. In the pre-roles world the list of "teachers" could be ordered so that the person who led the course was at the top and the guy that cleaned the toilets was at the bottom . In roles one can clone the teacher to give different names but you can no longer reflect levels of seniority. Many users have a problem with that.

Activity

Hide
Howard Miller added a comment -

The course information display did not respect the sortorder of the role table. It does now.

Show
Howard Miller added a comment - The course information display did not respect the sortorder of the role table. It does now.
Hide
Teresa Gibbison added a comment -

This fix sorts the roles on the front page but not the users of each role (only alphabetically). Can we have it sort within a role (eg. three Teachers sorted based on the order selected when assigning the teacher role, not alphabetically).

I assign the following to a course in this order:
1. Teachername Banana
2. Teachername Apple
3. Teachername Orange

They are sorted alphabetically (2. Apple, 1. Banana, 3. Orange) but I would like the teachers to be displayed in the order assigned (1. Banana, 2. Apple, 3. Orange).

Thanks in anticipation
Teresa

Show
Teresa Gibbison added a comment - This fix sorts the roles on the front page but not the users of each role (only alphabetically). Can we have it sort within a role (eg. three Teachers sorted based on the order selected when assigning the teacher role, not alphabetically). I assign the following to a course in this order: 1. Teachername Banana 2. Teachername Apple 3. Teachername Orange They are sorted alphabetically (2. Apple, 1. Banana, 3. Orange) but I would like the teachers to be displayed in the order assigned (1. Banana, 2. Apple, 3. Orange). Thanks in anticipation Teresa
Hide
Tim Hunt added a comment -

Yuck Howard, you are getting all the records from the roles table, even when you only need a few.

Show
Tim Hunt added a comment - Yuck Howard, you are getting all the records from the roles table, even when you only need a few.
Hide
Tim Hunt added a comment -

Oh, I see, this is ancient history anyway. It is just that Teresa's comment bumped it up the list of recently changed bugs. This code has all been rewritten (as part of Martin L's great roles performance imporvements) anyway. And the new code in get_courses_wmanagers is doing

ORDER BY r.sortorder ASC, ctx.contextlevel ASC, ra.sortorder ASC";

That looks like it is trying to list the teachers in the order that they were assigned. Howver, it also looks to me like ra.sortorder is never set to anything other than 0. Anyway Teresa, if you want to persue this, I suggest creating a new issue.

Show
Tim Hunt added a comment - Oh, I see, this is ancient history anyway. It is just that Teresa's comment bumped it up the list of recently changed bugs. This code has all been rewritten (as part of Martin L's great roles performance imporvements) anyway. And the new code in get_courses_wmanagers is doing ORDER BY r.sortorder ASC, ctx.contextlevel ASC, ra.sortorder ASC"; That looks like it is trying to list the teachers in the order that they were assigned. Howver, it also looks to me like ra.sortorder is never set to anything other than 0. Anyway Teresa, if you want to persue this, I suggest creating a new issue.
Hide
Tim Hunt added a comment -

Closing, because the original issue is long fixed.

Show
Tim Hunt added a comment - Closing, because the original issue is long fixed.

People

Vote (1)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: