Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3
    • Component/s: Filepicker, Files API
    • Labels:
      None
    • Testing Instructions:
      Hide
      1. Enable box.net repository (requires configuration)
      2. Upload a file to your box.net account
      3. Go to my private files
      4. Choose the file from the box.net repository
      5. Choose 'create an alias/shortcut'
      6. Save Changes
      7. Go to a course, create a new file resource
      8. Choose the private files repository and choose the file from your private files area which you just aliased from box.net. Test 1: choose it as a copy
      9. Make sure the copy of the file appeared (no link icon in filemanager)
      10. Test 2: choose file as an alias, select "Rename" if name conflict occurs
      11. Make sure the file is an alias (link icon in filemanager) and when you click on the file, it shows that original is in Box.net (and not in private files)
      Show
      Enable box.net repository (requires configuration) Upload a file to your box.net account Go to my private files Choose the file from the box.net repository Choose 'create an alias/shortcut' Save Changes Go to a course, create a new file resource Choose the private files repository and choose the file from your private files area which you just aliased from box.net. Test 1: choose it as a copy Make sure the copy of the file appeared (no link icon in filemanager) Test 2: choose file as an alias, select "Rename" if name conflict occurs Make sure the file is an alias (link icon in filemanager) and when you click on the file, it shows that original is in Box.net (and not in private files)
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull Master Branch:
      wip-MDL-33452-master
    • Rank:
      41346

      Description

      See http://moodle.org/local/chatlogs/index.php?conversationid=10297#c358057 and http://moodle.org/local/chatlogs/index.php?conversationid=10308#c358427

      When an alias is picked in the filepicker, we must not create a new alias to it. Instead, we need to make sure that the picked file links to the original external file.

        Activity

        Hide
        David Mudrak added a comment -

        We may want to wait for MDL-33330 landing as I am dealing with

        {files_reference}

        records creating there, too.

        Show
        David Mudrak added a comment - We may want to wait for MDL-33330 landing as I am dealing with {files_reference} records creating there, too.
        Hide
        Marina Glancy added a comment -

        David, I think that your changes will not affect it.
        Please integrate this after MDL-33479 because I based this commit on it.

        Show
        Marina Glancy added a comment - David, I think that your changes will not affect it. Please integrate this after MDL-33479 because I based this commit on it.
        Hide
        Dan Poltawski added a comment -

        Reopening for some phpdoc on get_moodle_file please.

        Show
        Dan Poltawski added a comment - Reopening for some phpdoc on get_moodle_file please.
        Hide
        Marina Glancy added a comment -

        added phpdocs

        Show
        Marina Glancy added a comment - added phpdocs
        Hide
        Dan Poltawski added a comment -

        Writing my own testing instructions for this..

        Show
        Dan Poltawski added a comment - Writing my own testing instructions for this..
        Hide
        Dan Poltawski added a comment -

        Well, I added the testing instructions, I tested and this was failing my instructions. So either this isn't working, or my testing instructions are wrong.

        Either way, reopening as it doesn't seem to be fixing the issue described.

        Show
        Dan Poltawski added a comment - Well, I added the testing instructions, I tested and this was failing my instructions. So either this isn't working, or my testing instructions are wrong. Either way, reopening as it doesn't seem to be fixing the issue described.
        Hide
        Marina Glancy added a comment -

        I corrected the test
        we can either copy a file or copy an alias. But we can not reference to the file in Private files that is already a reference

        Show
        Marina Glancy added a comment - I corrected the test we can either copy a file or copy an alias. But we can not reference to the file in Private files that is already a reference
        Hide
        Dan Poltawski added a comment -

        OK, ready for testing.

        Show
        Dan Poltawski added a comment - OK, ready for testing.
        Hide
        Tim Barker added a comment -

        Tested using the testing instructions. The test failed at step 11.

        If the user does not delete the old file first the following happens:

        10. Test 2: choose file as and alias.
        Result: a dialog appears asking the user if they want to overwrite the existing file. I selected "yes".
        11. Make sure the file is an alias....
        Result:
        The file is not an alias. There is no link icon and when you click on it, it does not point to box.net but to the same place as in step 9.

        Tested in Google Chrome.

        Show
        Tim Barker added a comment - Tested using the testing instructions. The test failed at step 11. If the user does not delete the old file first the following happens: 10. Test 2: choose file as and alias. Result: a dialog appears asking the user if they want to overwrite the existing file. I selected "yes". 11. Make sure the file is an alias.... Result: The file is not an alias. There is no link icon and when you click on it, it does not point to box.net but to the same place as in step 9. Tested in Google Chrome.
        Hide
        Marina Glancy added a comment -

        Tim, this is another bug. Although I could not find an issue (I am pretty sure it existed!)
        After you choose 'Overwrite' the filemanager is not refreshed. For this test you have to refresh it manually by clicking on "Files" in path bar.

        Show
        Marina Glancy added a comment - Tim, this is another bug. Although I could not find an issue (I am pretty sure it existed!) After you choose 'Overwrite' the filemanager is not refreshed. For this test you have to refresh it manually by clicking on "Files" in path bar.
        Hide
        Tim Barker added a comment -

        OK Marina, then in that case will you change the testing instructions for me and do I need to raise another bug?

        Show
        Tim Barker added a comment - OK Marina, then in that case will you change the testing instructions for me and do I need to raise another bug?
        Hide
        Tim Barker added a comment -

        Once you have done that I will retest it again and fingers crossed I'll pass it

        Show
        Tim Barker added a comment - Once you have done that I will retest it again and fingers crossed I'll pass it
        Hide
        Marina Glancy added a comment -

        Tim, I changed the test so you avoid clicking 'Overwrite' button
        yes please create the issue, you may link it to MDL-33136

        Show
        Marina Glancy added a comment - Tim, I changed the test so you avoid clicking 'Overwrite' button yes please create the issue, you may link it to MDL-33136
        Hide
        Dan Poltawski added a comment -

        Ready for testing again.

        Show
        Dan Poltawski added a comment - Ready for testing again.
        Hide
        Tim Barker added a comment -

        Works perfectly as specified in the testing instructions.

        I will raise the other issue elsewhere.

        Congrats, your fix has passed testing.

        Show
        Tim Barker added a comment - Works perfectly as specified in the testing instructions. I will raise the other issue elsewhere. Congrats, your fix has passed testing.
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Big thanks for the effort. This is now part of Moodle upstream. Let's wait for regressions, yay! LOL

        Ciao

        Show
        Eloy Lafuente (stronk7) added a comment - Big thanks for the effort. This is now part of Moodle upstream. Let's wait for regressions, yay! LOL Ciao

          People

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

            Dates

            • Created:
              Updated:
              Resolved: