Moodle
  1. Moodle
  2. MDL-19110

If modules are restricted, courses created by a user with 'course creator' role don't contain any modules

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.9.4
    • Fix Version/s: 1.9.5, 2.0
    • Component/s: Course
    • Labels:
      None
    • Database:
      PostgreSQL
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE

      Description

      If 'restrictedmodulesfor' is set to 'All courses', 'restrictbydefault' is set and 'defaultallowedmodules' are selected, courses created by a user with 'course creator' role don't contain any modules.

      Reproduce:
      1. visit 'Security' 'Modules security' in the 'Site Administration' menu
      2. set 'restrictmodulesfor'
      3. set 'restrictbydefault'
      4. select some 'defaultallowedmodules'
      5. save changes
      6. change to a user with a 'course creator' role
      7. create a new course

      Result:
      If you want to edit the course afterwards you don't have any ressources/activities available.

      Expected:
      I would expect the course to have at least the defaultallowedmodules in it.

      This seems related to MDL-13567

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            Adrian Schlegel added a comment -

            I created a patch for this issue. It is available from the liip git repository:

            http://git.penny.liip.ch/?p=moodle.git;a=commitdiff;h=c860170b22e315c5b73c6e08d9899c9ac35537d5

            Show
            Adrian Schlegel added a comment - I created a patch for this issue. It is available from the liip git repository: http://git.penny.liip.ch/?p=moodle.git;a=commitdiff;h=c860170b22e315c5b73c6e08d9899c9ac35537d5
            Hide
            Nicolas Connault added a comment -

            I reproduced the bug, then applied the patch, but saw no differences. I logged out and back in, still no difference. Is the patch complete?

            Show
            Nicolas Connault added a comment - I reproduced the bug, then applied the patch, but saw no differences. I logged out and back in, still no difference. Is the patch complete?
            Hide
            Nicolas Connault added a comment -

            OK, my mistake, it actually works fine.

            Show
            Nicolas Connault added a comment - OK, my mistake, it actually works fine.
            Hide
            Penny Leach added a comment -

            fixed in head & stable. I created a linked issue to discuss further implementation improvements.

            Show
            Penny Leach added a comment - fixed in head & stable. I created a linked issue to discuss further implementation improvements.
            Hide
            Nicolas Connault added a comment -

            Thanks for the fix.

            Show
            Nicolas Connault added a comment - Thanks for the fix.

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: