Moodle
  1. Moodle
  2. MDL-9398

Course Creator Role CAN NOT Create Categories - Even with modification of role

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7, 1.7.1, 1.7.2, 1.8
    • Fix Version/s: 1.8.1, 1.9
    • Component/s: Roles / Access
    • Labels:
      None
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_17_STABLE, MOODLE_18_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE
    • Rank:
      29548

      Description

      I have attempted to modify the Course Creator role to allow them to create, delete, and update categories. No matter what I do, the option to create the categories does not appear. Currently, I have the options setup according to:

      moodle/category:create
      moodle/category:delete
      moodle/category:update
      moodle/category:visibility

      If, I modify the option for "Change site configuration" to ALLOW, then the categories can be setup. But, this allows gives full capability to modify the front page, server settings, etc. This is totally unacceptable. Please help resolve this issue, or give some direction of where I might find a solution. Thank you!

        Issue Links

          Activity

          Hide
          Yu Zhang added a comment -

          Hi, fixed this in 1.8 and HEAD. Thanks for the report.

          Show
          Yu Zhang added a comment - Hi, fixed this in 1.8 and HEAD. Thanks for the report.
          Hide
          Scott Grogg added a comment -

          Yu and Petr,

          The issue is still not really resolved. Even with the changes that you've made, the course creator can, of course, create categories, delete them, etc. But, they also now can change site configuration... even with the "Change site configuration" option set to prohibit. I believe the changes are more of a security risk than what it was before. In essence, the course creator role should be able to create/delete/update courses as well as create/delete/update categories... but not site configuration.

          Scott

          Show
          Scott Grogg added a comment - Yu and Petr, The issue is still not really resolved. Even with the changes that you've made, the course creator can, of course, create categories, delete them, etc. But, they also now can change site configuration... even with the "Change site configuration" option set to prohibit. I believe the changes are more of a security risk than what it was before. In essence, the course creator role should be able to create/delete/update courses as well as create/delete/update categories... but not site configuration. Scott
          Hide
          Scott Grogg added a comment -

          This issue appears to be similar in nature to the bug reported earlier.

          Show
          Scott Grogg added a comment - This issue appears to be similar in nature to the bug reported earlier.
          Hide
          Scott Grogg added a comment -

          Thank you Yu and Petr... the issue appears to be fully resolved now! I found that one of the config/index.php file was partially corrupted during transfer. This prevented me from seeing the fix. One thought, on the fix... shouldn't the course creator have the "Courses" section of the site administration block so that if specific options are chosen (Add/edit courses, enrollments, backups) should be shown? I do not see it right now, so the course creator must go into a specific category, click on the "Course categories" breadcrumb to get to the correct section of the site. Am I missing an option in the roles so that this part of the menu shows????

          Show
          Scott Grogg added a comment - Thank you Yu and Petr... the issue appears to be fully resolved now! I found that one of the config/index.php file was partially corrupted during transfer. This prevented me from seeing the fix. One thought, on the fix... shouldn't the course creator have the "Courses" section of the site administration block so that if specific options are chosen (Add/edit courses, enrollments, backups) should be shown? I do not see it right now, so the course creator must go into a specific category, click on the "Course categories" breadcrumb to get to the correct section of the site. Am I missing an option in the roles so that this part of the menu shows????
          Hide
          Ralf Hilgenstock added a comment -

          My 1+ for Scotts idea for a coursers section in admin menu for course creators.

          But the issue doesn't work for me on several systems with 1.7.2. and 1.8 actual systems from May. The course creators donÄt see a field ta add a category. (screenshot added)

          Show
          Ralf Hilgenstock added a comment - My 1+ for Scotts idea for a coursers section in admin menu for course creators. But the issue doesn't work for me on several systems with 1.7.2. and 1.8 actual systems from May. The course creators donÄt see a field ta add a category. (screenshot added)
          Hide
          Gordon Bateson added a comment -

          To make the "Courses" option on the "Site Administration" block available to course creators ...

          1. open "admin/settings/courses.php" in a text editor

          2. change this line (around line 5) ...

          $ADMIN->add('courses', new admin_externalpage('coursemgmt', get_string('coursemgmt', 'admin'), $CFG->wwwroot . '/course/index.php','moodle/category:update'));

          ... to this ...

          $ADMIN->add('courses', new admin_externalpage('coursemgmt', get_string('coursemgmt', 'admin'), $CFG->wwwroot . '/course/index.php','moodle/course:create'));

          3. save the modfied file
          HTH
          Gordon

          Show
          Gordon Bateson added a comment - To make the "Courses" option on the "Site Administration" block available to course creators ... 1. open "admin/settings/courses.php" in a text editor 2. change this line (around line 5) ... $ADMIN->add('courses', new admin_externalpage('coursemgmt', get_string('coursemgmt', 'admin'), $CFG->wwwroot . '/course/index.php','moodle/category:update')); ... to this ... $ADMIN->add('courses', new admin_externalpage('coursemgmt', get_string('coursemgmt', 'admin'), $CFG->wwwroot . '/course/index.php','moodle/course:create')); 3. save the modfied file HTH Gordon
          Hide
          Marc Grober added a comment -

          Hey folks.... I am a bit confused....
          Though this indicates that the issue is resolved, the site admin block is still not visible to course creator in 1.9
          Does "fixed" here only apply to the initial issue and not the additional problem noted?
          If so, is there another tracker number for making the site admin block visible without resorting to gordon's patch?

          Show
          Marc Grober added a comment - Hey folks.... I am a bit confused.... Though this indicates that the issue is resolved, the site admin block is still not visible to course creator in 1.9 Does "fixed" here only apply to the initial issue and not the additional problem noted? If so, is there another tracker number for making the site admin block visible without resorting to gordon's patch?
          Hide
          Nicolas Connault added a comment -

          Actually this issue is completely solved now. The site admin block is available on the site front page, with the course section only.

          Show
          Nicolas Connault added a comment - Actually this issue is completely solved now. The site admin block is available on the site front page, with the course section only.

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: