Moodle

Course creator on category level can restore a new course in all categories

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Not a bug
  • Affects Version/s: 1.9.5
  • Fix Version/s: 1.9.6
  • Labels:
    None
  • Environment:
    1.9.5+ 20090515
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

User that are coursecreator for one category get the capability to restore in a new course in all categories in the system. This breaks the idea of course creators at category level.

Activity

Hide
Petr Škoda (skodak) added a comment -

Eloy, could you please verify this?

Show
Petr Škoda (skodak) added a comment - Eloy, could you please verify this?
Hide
Eloy Lafuente (stronk7) added a comment - - edited

I've created:

  • cat1
    • cat11
    • cat12
      • cat121
      • cat122
  • cat2
    • cat21
      • cat211
      • cat222
    • cat22
  • cat3
    • cat31

And then, I've assigned the "course creator" role to one user in the "cat12" and "cat2" categories only (those having "2" on their name).

Logged as such user, then restore form only allows to select "cat12" and "cat2" categories (and children, obviously). But the rest of categories (cat1, cat11, cat3 and cat31) aren't available as target to create a new course.

Code seems to be relying properly in the make_categories_list() function executed with the 'moodle/course:create' capability. So I think this isn't a bug at all.

Show
Eloy Lafuente (stronk7) added a comment - - edited I've created:
  • cat1
    • cat11
    • cat12
      • cat121
      • cat122
  • cat2
    • cat21
      • cat211
      • cat222
    • cat22
  • cat3
    • cat31
And then, I've assigned the "course creator" role to one user in the "cat12" and "cat2" categories only (those having "2" on their name). Logged as such user, then restore form only allows to select "cat12" and "cat2" categories (and children, obviously). But the rest of categories (cat1, cat11, cat3 and cat31) aren't available as target to create a new course. Code seems to be relying properly in the make_categories_list() function executed with the 'moodle/course:create' capability. So I think this isn't a bug at all.
Hide
Eloy Lafuente (stronk7) added a comment -

Closing as not a bug. Feel free to reopen if you can reproduce it in any detailed way.

Thanks and ciao

Show
Eloy Lafuente (stronk7) added a comment - Closing as not a bug. Feel free to reopen if you can reproduce it in any detailed way. Thanks and ciao
Hide
Ralf Hilgenstock added a comment -

Hi Eloy,

I've checked it again on several systems and found differences. Course creators can't do it if they are working on a 1.9.x system that is set up in this version. In systems build up in Version 1.7.x or earlier and updated up to now the roles are not in standard settings for course creators and they can do it as described.

Ralf

Show
Ralf Hilgenstock added a comment - Hi Eloy, I've checked it again on several systems and found differences. Course creators can't do it if they are working on a 1.9.x system that is set up in this version. In systems build up in Version 1.7.x or earlier and updated up to now the roles are not in standard settings for course creators and they can do it as described. Ralf
Hide
Eloy Lafuente (stronk7) added a comment -

Uhm,

that's pretty strange, Ralf. AFAIK the only way to have course creators able to create courses in any category is to have them assigned as course creators at system level (or, alternatively, in all the root categories in the site).

Can you confirm if that is your case? I really cannot imagine another cause for being able to create courses out from the ones he has perms. No matter of the upgrade path of the moodle site.

Ciao

Show
Eloy Lafuente (stronk7) added a comment - Uhm, that's pretty strange, Ralf. AFAIK the only way to have course creators able to create courses in any category is to have them assigned as course creators at system level (or, alternatively, in all the root categories in the site). Can you confirm if that is your case? I really cannot imagine another cause for being able to create courses out from the ones he has perms. No matter of the upgrade path of the moodle site. Ciao
Hide
Ralf Hilgenstock added a comment -

I sent you an account for a system, where you can see this behaviour. This system was updated over several versions starting with 1.4 or 1.5.

I never changed the role settings for ths course creator role, but they are not standard like marked in the settig table. The same behaviour was visible at a client system which was installed with 1.7. and now updated for the first time to 1.9.5.

I've made an other test with an 1.9.x system that was built as 1.9 from scratch. In this system it is as you described and as it is expected.

Show
Ralf Hilgenstock added a comment - I sent you an account for a system, where you can see this behaviour. This system was updated over several versions starting with 1.4 or 1.5. I never changed the role settings for ths course creator role, but they are not standard like marked in the settig table. The same behaviour was visible at a client system which was installed with 1.7. and now updated for the first time to 1.9.5. I've made an other test with an 1.9.x system that was built as 1.9 from scratch. In this system it is as you described and as it is expected.
Hide
Eloy Lafuente (stronk7) added a comment -

Hi Ralf,

note that MDL-15355 is the bug where the list of categories fixed (4 months ago). That's in the middle of 1.9.5+ versions (20090522). So any server running an older version will be showing ALL the categories. Perhaps that's the cause of the behaviour in your servers?

Ciao

Show
Eloy Lafuente (stronk7) added a comment - Hi Ralf, note that MDL-15355 is the bug where the list of categories fixed (4 months ago). That's in the middle of 1.9.5+ versions (20090522). So any server running an older version will be showing ALL the categories. Perhaps that's the cause of the behaviour in your servers? Ciao

People

Dates

  • Created:
    Updated:
    Resolved: