Uploaded image for project: '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
    • Status: Closed
    • Priority: 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

          Attachments

            Issue Links

              Activity

              Hide
              adisch 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
              adisch 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
              nicolasconnault 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
              nicolasconnault 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
              nicolasconnault Nicolas Connault added a comment -

              OK, my mistake, it actually works fine.

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

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

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

              Thanks for the fix.

              Show
              nicolasconnault 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:
                    Fix Release Date:
                    13/May/09