Moodle

Add a new setting "defaultfrontpageroleid" where you choose a role for all users on the front page course

Details

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

Description

If we revive this pre-roles setting, we can hack things to give all people an automatic role on the site course.

(Something like the defaultuserroleid, it would be a new defaultfrontpageroleid)

The login process would add this automatically to in the capabilities cached structure, and some of accesslib needs to be hacked (like get_users_by_capability) to check for this and return ALL users in this case.

Yu, can you identify a list of areas that would need to be hacked for this solution and possibly produce a patch here?

Issue Links

Activity

Hide
Petr Škoda (skodak) added a comment -

I think this depends on internal roles changes by ML, right?

Show
Petr Škoda (skodak) added a comment - I think this depends on internal roles changes by ML, right?
Hide
Martin Dougiamas added a comment -

Yes indeed it must wait for those.

Show
Martin Dougiamas added a comment - Yes indeed it must wait for those.
Hide
Yu Zhang added a comment -

I have put a bit of code in, right now I need to know what the participants list should do

Options are

a) List all users under default role
b) List only manually assigned users (what we are doing right now)
c) List all users, but separated by roles. Everyone is in the default role, but some (e.g. teachers) might have a separate role (seems sensible to me but could be quite a big hack)
d) Just list all users, regardless of whether there is a default role set
e) Other options

Hmmm

Show
Yu Zhang added a comment - I have put a bit of code in, right now I need to know what the participants list should do Options are a) List all users under default role b) List only manually assigned users (what we are doing right now) c) List all users, but separated by roles. Everyone is in the default role, but some (e.g. teachers) might have a separate role (seems sensible to me but could be quite a big hack) d) Just list all users, regardless of whether there is a default role set e) Other options Hmmm
Hide
Helen Foster added a comment -

Hi Yu,

I think the front page participants list should behave in exactly the same way as all other course participants lists i.e. option c).

It would also be nice if the front page settings could include the option to re-name roles, like in the 1.9 course settings.

Show
Helen Foster added a comment - Hi Yu, I think the front page participants list should behave in exactly the same way as all other course participants lists i.e. option c). It would also be nice if the front page settings could include the option to re-name roles, like in the 1.9 course settings.
Hide
Helen Foster added a comment -

Hi Yu,

I've just found a [[frontpagedefaultfole]] link in the front page section of the site administration block - great work!

Just one small suggestion:

Rather than adding the setting to the front page section, how about adding it to the user policies page (Administration > Users > Permissions > User policies)?

Show
Helen Foster added a comment - Hi Yu, I've just found a [[frontpagedefaultfole]] link in the front page section of the site administration block - great work! Just one small suggestion: Rather than adding the setting to the front page section, how about adding it to the user policies page (Administration > Users > Permissions > User policies)?
Hide
Petr Škoda (skodak) added a comment - - edited

I am doing some frontpage related bugfixing in MDL-11566 , moving the frontpagedefaultrole into Frontpage settings - I think it will be easier to find it there

Please note that we should be able to add more settings to the "Frontpage settings" section now because only site shortname, fullname and description settings will be shown during installation...

Show
Petr Škoda (skodak) added a comment - - edited I am doing some frontpage related bugfixing in MDL-11566 , moving the frontpagedefaultrole into Frontpage settings - I think it will be easier to find it there Please note that we should be able to add more settings to the "Frontpage settings" section now because only site shortname, fullname and description settings will be shown during installation...
Hide
Petr Škoda (skodak) added a comment -

Fixed defaultfrongpageroleid typo and undefined warnings during upgrade and install

Show
Petr Škoda (skodak) added a comment - Fixed defaultfrongpageroleid typo and undefined warnings during upgrade and install
Hide
Yu Zhang added a comment -

I think this can be closed.?

Show
Yu Zhang added a comment - I think this can be closed.?

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: