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

Recent files option does not work

    Details

    • Testing Instructions:
      Hide
      1. Create an upload assignment (type = uploadsingle)
      2. Login as student
      3. Upload a file to the assignment
      4. Go someplace else and attempt to choose that uploaded file in the file picker under recent files.
      5. Should be able to successfully use the recent file.
      1. Create an upload assignment (type = upload)
      2. Login as student
      3. Upload a file to the assignment
      4. Go someplace else and attempt to choose that uploaded file in the file picker under recent files.
      5. Should be able to successfully use the recent file.
      Show
      Create an upload assignment (type = uploadsingle) Login as student Upload a file to the assignment Go someplace else and attempt to choose that uploaded file in the file picker under recent files. Should be able to successfully use the recent file. Create an upload assignment (type = upload) Login as student Upload a file to the assignment Go someplace else and attempt to choose that uploaded file in the file picker under recent files. Should be able to successfully use the recent file.
    • Affected Branches:
      MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull from Repository:
      git@github.com:marinaglancy/moodle.git
    • Pull Master Branch:
      wip-MDL-30709-master

      Description

      This appears to be the exact same problem as MDL-30214, but for Assignment. Most likely have to create an assignment_get_file_info() method.

      Other modules should be tested to see if they must implement MODNAME_get_file_info() method as well.

        Gliffy Diagrams

          Issue Links

            Activity

            bushido Mark Nielsen created issue -
            bushido Mark Nielsen made changes -
            Field Original Value New Value
            Link This issue discovered while testing MDL-30214 [ MDL-30214 ]
            bushido Mark Nielsen made changes -
            Description This appears to be the exact same problem as MDL-30214, but for Assignment. Most likely have to create an assignment_get_file_info() method. This appears to be the exact same problem as MDL-30214, but for Assignment. Most likely have to create an assignment_get_file_info() method.

            _Other modules should be tested to see if they must implement MODNAME_get_file_info() method as well._
            Labels moodlerooms partner
            bushido Mark Nielsen made changes -
            Priority Minor [ 4 ] Critical [ 2 ]
            bushido Mark Nielsen made changes -
            Fix Version/s 2.1.4 [ 11452 ]
            Affects Version/s 2.1.3 [ 11251 ]
            Affects Version/s 2.2.1 [ 11456 ]
            Hide
            salvetore Michael de Raadt added a comment -

            Thanks for reporting that.

            Feel free to help us work on the issue.

            Show
            salvetore Michael de Raadt added a comment - Thanks for reporting that. Feel free to help us work on the issue.
            salvetore Michael de Raadt made changes -
            Fix Version/s STABLE backlog [ 10463 ]
            Fix Version/s 2.1.4 [ 11452 ]
            Labels moodlerooms partner moodlerooms partner triaged
            Assignee moodle.com [ moodle.com ] Marina Glancy [ marina ]
            Hide
            salvetore Michael de Raadt added a comment -

            Marina, it would be good if you could have a look at this.

            Show
            salvetore Michael de Raadt added a comment - Marina, it would be good if you could have a look at this.
            Hide
            marina Marina Glancy added a comment - - edited

            Fixed bug with inserting files from Recent files repository

            Two parts of changes: in assignment module function assignment_get_file_info was missing;
            and when populating the list of recent files the function get_file_info was not called, which caused populating the list of recent files with the files that could not later be inserted

            Show
            marina Marina Glancy added a comment - - edited Fixed bug with inserting files from Recent files repository Two parts of changes: in assignment module function assignment_get_file_info was missing; and when populating the list of recent files the function get_file_info was not called, which caused populating the list of recent files with the files that could not later be inserted
            marina Marina Glancy made changes -
            Status Open [ 1 ] Waiting for integration review [ 10010 ]
            Pull Master Diff URL https://github.com/marinaglancy/moodle/compare/master...wip-MDL-30709-master
            Pull Master Branch wip-MDL-30709-master
            Pull from Repository git@github.com:marinaglancy/moodle.git
            Pull 2.1 Branch wip-MDL-30709-MOODLE_21_STABLE
            Pull 2.2 Diff URL https://github.com/marinaglancy/moodle/compare/MOODLE_22_STABLE...wip-MDL-30709-MOODLE_22_STABLE
            Pull 2.1 Diff URL https://github.com/marinaglancy/moodle/compare/MOODLE_21_STABLE...wip-MDL-30709-MOODLE_21_STABLE
            Pull 2.2 Branch wip-MDL-30709-MOODLE_22_STABLE
            stronk7 Eloy Lafuente (stronk7) made changes -
            Currently in integration Yes [ 10041 ]
            samhemelryk Sam Hemelryk made changes -
            Status Waiting for integration review [ 10010 ] Integration review in progress [ 10004 ]
            Integrator samhemelryk
            Hide
            samhemelryk Sam Hemelryk added a comment -

            Thanks Marina this has been integrated now.

            I did make one more commit to fix up the phpdocs for the new function however.

            Cheers
            Sam

            Show
            samhemelryk Sam Hemelryk added a comment - Thanks Marina this has been integrated now. I did make one more commit to fix up the phpdocs for the new function however. Cheers Sam
            samhemelryk Sam Hemelryk made changes -
            Status Integration review in progress [ 10004 ] Waiting for testing [ 10005 ]
            Fix Version/s 2.1.5 [ 11553 ]
            Fix Version/s 2.2.2 [ 11552 ]
            Fix Version/s STABLE backlog [ 10463 ]
            blepoxp Glenn Ansley made changes -
            Status Waiting for testing [ 10005 ] Testing in progress [ 10011 ]
            Tester blepoxp
            blepoxp Glenn Ansley made changes -
            Status Testing in progress [ 10011 ] Waiting for testing [ 10005 ]
            Hide
            dobedobedoh Andrew Nicols added a comment -

            Just a point I came across whilst investigating this issue, it looks like the function should really be named mod_MODNAME_get_file_info - I assume that the MODNAME_get_file_info option will be deprecated at some point given the variable name, but there's not comment to that effect.

                    $functionname     = 'mod_'.$this->modname.'_get_file_info';
                    $functionname_old = $this->modname.'_get_file_info';
             
                    if (function_exists($functionname)) {
                        return $functionname($this->browser, $this->areas, $this->course, $this->cm, $this->context, $filearea, $itemid, $filepath, $filename);
                    } else if (function_exists($functionname_old)) {
                        return $functionname_old($this->browser, $this->areas, $this->course, $this->cm, $this->context, $filearea, $itemid, $filepath, $filename);
                    }   

            Might require another issue after testing is complete

            Show
            dobedobedoh Andrew Nicols added a comment - Just a point I came across whilst investigating this issue, it looks like the function should really be named mod_MODNAME_get_file_info - I assume that the MODNAME_get_file_info option will be deprecated at some point given the variable name, but there's not comment to that effect. $functionname = 'mod_'.$this->modname.'_get_file_info'; $functionname_old = $this->modname.'_get_file_info';   if (function_exists($functionname)) { return $functionname($this->browser, $this->areas, $this->course, $this->cm, $this->context, $filearea, $itemid, $filepath, $filename); } else if (function_exists($functionname_old)) { return $functionname_old($this->browser, $this->areas, $this->course, $this->cm, $this->context, $filearea, $itemid, $filepath, $filename); } Might require another issue after testing is complete
            Hide
            samhemelryk Sam Hemelryk added a comment -

            Thanks for spotting that Andrew, given this is going into stable branches I am going to make an additional commit now to rename the function to mod_assignment_get_file_info.
            Indeed we are trying to break the habit of not prefixing module callbacks with mod_, good catch!

            Show
            samhemelryk Sam Hemelryk added a comment - Thanks for spotting that Andrew, given this is going into stable branches I am going to make an additional commit now to rename the function to mod_assignment_get_file_info. Indeed we are trying to break the habit of not prefixing module callbacks with mod_, good catch!
            Hide
            samhemelryk Sam Hemelryk added a comment -

            OK all branches updated with the renamed function: ready for testing

            Show
            samhemelryk Sam Hemelryk added a comment - OK all branches updated with the renamed function: ready for testing
            salvetore Michael de Raadt made changes -
            Peer reviewer rajeshtaneja
            salvetore Michael de Raadt made changes -
            Peer reviewer rajeshtaneja blepoxp
            Tester blepoxp rajeshtaneja
            rajeshtaneja Rajesh Taneja made changes -
            Status Waiting for testing [ 10005 ] Testing in progress [ 10011 ]
            Hide
            rajeshtaneja Rajesh Taneja added a comment -

            Thanks Andrew, Sam and Marina.
            Works great.

            Show
            rajeshtaneja Rajesh Taneja added a comment - Thanks Andrew, Sam and Marina. Works great.
            rajeshtaneja Rajesh Taneja made changes -
            Status Testing in progress [ 10011 ] Tested [ 10006 ]
            dobedobedoh Andrew Nicols made changes -
            Link This issue testing discovered MDL-31661 [ MDL-31661 ]
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            It is late here and I'm very tired but I didn't want to go to sleep before expressing my admiration for your amazing collaboration. Thanks!

            Closing as fixed, heading to zzzZZZzzz, niao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - It is late here and I'm very tired but I didn't want to go to sleep before expressing my admiration for your amazing collaboration. Thanks! Closing as fixed, heading to zzzZZZzzz, niao
            stronk7 Eloy Lafuente (stronk7) made changes -
            Status Tested [ 10006 ] Closed [ 6 ]
            Resolution Fixed [ 1 ]
            Currently in integration Yes [ 10041 ]
            marina Marina Glancy made changes -
            Link This issue has been marked as being related by MDL-31738 [ MDL-31738 ]
            stronk7 Eloy Lafuente (stronk7) made changes -
            Integration date 17/Feb/12
            marina Marina Glancy made changes -
            Link This issue has been marked as being related by MDL-32378 [ MDL-32378 ]

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  12/Mar/12