Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-38500

Repository names have to be unique (not sure why) but no check on create, only edit.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.8, 2.3.5, 2.4.2
    • Fix Version/s: 2.3.7, 2.4.4
    • Component/s: Repositories
    • Labels:
    • Testing Instructions:
      Hide
      1. Enable Flickr Public repository (Enable User/Course instances, the API does not need to be valid)
      2. Go to My home ► Site administration ► Plugins ► Repositories ► Flickr public
      3. Make sure you can add a new instance of Flickr Public named BOB
      4. Make sure you CANNOT add one more instance of Flickr Public named BOB
      1. Login as a student
      2. Go to My home ► My profile ► Repositories ► XXX ► Repositories
      3. Add a new instance of Flickr Public named BOB
      4. Login as another student
      5. Go to My home ► My profile ► Repositories ► XXX ► Repositories
      6. Make sure you can add a new instance of Flickr Public named BOB
      7. Make sure you CANNOT add one more instance of Flickr Public named BOB
      1. Login as a Teacher
      2. Go to My home ► XXX ► Repositories ► Course repositories
      3. Make sure you can add a new instance of Flickr Public named BOB
      4. Make sure you CANNOT add one more instance of Flickr named Public BOB
      Show
      Enable Flickr Public repository (Enable User/Course instances, the API does not need to be valid) Go to My home ► Site administration ► Plugins ► Repositories ► Flickr public Make sure you can add a new instance of Flickr Public named BOB Make sure you CANNOT add one more instance of Flickr Public named BOB Login as a student Go to My home ► My profile ► Repositories ► XXX ► Repositories Add a new instance of Flickr Public named BOB Login as another student Go to My home ► My profile ► Repositories ► XXX ► Repositories Make sure you can add a new instance of Flickr Public named BOB Make sure you CANNOT add one more instance of Flickr Public named BOB Login as a Teacher Go to My home ► XXX ► Repositories ► Course repositories Make sure you can add a new instance of Flickr Public named BOB Make sure you CANNOT add one more instance of Flickr named Public BOB
    • Affected Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-38500-master

      Description

      You can create 2 repository instances with the same name, and only when you go to edit one of them will you get an error.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            fred Frédéric Massart added a comment -

            Here is a patch to fix the issue.

            1. The query should be tested against > 0, not > 1
            2. I am using the safest value, not the one passed through the form
            3. There was a bug where 2 different users could not use the same name for their repo. Now the repository name has to be unique per context.
            Show
            fred Frédéric Massart added a comment - Here is a patch to fix the issue. The query should be tested against > 0, not > 1 I am using the safest value, not the one passed through the form There was a bug where 2 different users could not use the same name for their repo. Now the repository name has to be unique per context.
            Hide
            abgreeve Adrian Greeve added a comment -

            [Y] Syntax
            [Y] Output
            [Y] Whitespace
            [-] Language
            [Y] Databases
            [Y] Testing
            [Y] Security
            [-] Documentation
            [Y] Git
            [Y] Sanity check

            Hi,

            Everything here looks fine. The code makes sense and the testing instructions are easy to follow.

            Carry on.

            Show
            abgreeve Adrian Greeve added a comment - [Y] Syntax [Y] Output [Y] Whitespace [-] Language [Y] Databases [Y] Testing [Y] Security [-] Documentation [Y] Git [Y] Sanity check Hi, Everything here looks fine. The code makes sense and the testing instructions are easy to follow. Carry on.
            Hide
            fred Frédéric Massart added a comment -

            orz

            Show
            fred Frédéric Massart added a comment - orz
            Hide
            poltawski Dan Poltawski added a comment -

            Integrated to master, 24 and 23. Thanks Fred.

            Show
            poltawski Dan Poltawski added a comment - Integrated to master, 24 and 23. Thanks Fred.
            Hide
            andyjdavis Andrew Davis added a comment -

            Raised MDL-39561 (its very minor).

            Show
            andyjdavis Andrew Davis added a comment - Raised MDL-39561 (its very minor).
            Hide
            andyjdavis Andrew Davis added a comment -

            Works as described. Passing.

            Show
            andyjdavis Andrew Davis added a comment - Works as described. Passing.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Did you think this day was not going to arrive ever?

            Your patience has been rewarded, yay, sent upstream, thanks!

            Closing...ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Did you think this day was not going to arrive ever? Your patience has been rewarded, yay, sent upstream, thanks! Closing...ciao

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  13/May/13