Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.4, 2.1.1, 2.2
    • Fix Version/s: 2.0.5, 2.1.2
    • Component/s: Repositories
    • Labels:
    • Database:
      Any
    • Testing Instructions:
      Hide

      With the YouTube repository enabled, In the TinyMCE editor, click on the Moodle Media icon, then "Find or upload sound, video or applet". Select the YouTube repository. Perform a searches for a keyword sorted by each option. Perform the same search on http://www.youtube.com/results?search_type=videos and verify that they are sorted as expected.

      Show
      With the YouTube repository enabled, In the TinyMCE editor, click on the Moodle Media icon, then "Find or upload sound, video or applet". Select the YouTube repository. Perform a searches for a keyword sorted by each option. Perform the same search on http://www.youtube.com/results?search_type=videos and verify that they are sorted as expected.
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull from Repository:
      git@github.com:dongsheng/moodle.git
    • Pull Master Branch:
      s13_MDL-28509_youtube_master

      Description

      When searching using the YouTube repository, the sorting is hard-coded to sort by Date Published. This is contrary to the default behaviour of YouTube which defaults to sorting by Relevance, and makes it harder to find relevant or particular videos when searching.
      I appreciate that there is a use case for sorting by Date Published (e.g. if you've just uploaded a video yourself and want to find it), but I think the user should be able to specify the sort order, and that it should default to Relevance like YouTube does.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            Mark Johnson added a comment -

            This fix adds a select box to the search form allowing selection of sorting by Relevance, Date Published, View Count or Rating, as allowed on the YouTube site.

            Show
            Mark Johnson added a comment - This fix adds a select box to the search form allowing selection of sorting by Relevance, Date Published, View Count or Rating, as allowed on the YouTube site.
            Hide
            Dongsheng Cai added a comment -

            Looks good, Thanks Mark!

            Show
            Dongsheng Cai added a comment - Looks good, Thanks Mark!
            Hide
            Dongsheng Cai added a comment -

            Submitting to integration.

            Show
            Dongsheng Cai added a comment - Submitting to integration.
            Hide
            Aparup Banerjee added a comment -

            Thanks! This has been integrated now!

            Show
            Aparup Banerjee added a comment - Thanks! This has been integrated now!
            Hide
            Rossiani Wijaya added a comment -

            While trying to search for another youtube video, I received 'ERROR: Invalid JSON string'.

            To reproduce,

            1. with tinyMCE, select the YouTube repository.
            2. Perform search for a video, select any kind of filter and click search
            3. click 'search' button (pop up search should appear), search for a video, click submit

            Invalid json string error appear.

            Workaround for this is to click on refresh/youtube repository button then search for other video.

            Show
            Rossiani Wijaya added a comment - While trying to search for another youtube video, I received 'ERROR: Invalid JSON string'. To reproduce, with tinyMCE, select the YouTube repository. Perform search for a video, select any kind of filter and click search click 'search' button (pop up search should appear), search for a video, click submit Invalid json string error appear. Workaround for this is to click on refresh/youtube repository button then search for other video.
            Hide
            Dongsheng Cai added a comment -

            it's the youtube_sort parameter missing default value, I attached a patch to fix this.

            Show
            Dongsheng Cai added a comment - it's the youtube_sort parameter missing default value, I attached a patch to fix this.
            Hide
            Aparup Banerjee added a comment - - edited

            Thanks for that DS. Rajesh has also seen that this is breaking file picker upload everywhere (no response after successful upload). so we'll either need to revert this or patch+test it quicky. (works fine after i reverted this commit (0638e55) on my local integration copy)

            Show
            Aparup Banerjee added a comment - - edited Thanks for that DS. Rajesh has also seen that this is breaking file picker upload everywhere (no response after successful upload). so we'll either need to revert this or patch+test it quicky. (works fine after i reverted this commit (0638e55) on my local integration copy)
            Hide
            Rossiani Wijaya added a comment - - edited

            Thanks Ds for the patch. It fixed the 'invalid json error'.

            However, the search result doesn't return the expected video.

            To reproduce:

            1. with tinyMCE, select the YouTube repository.
            2. Perform search for a video, select any kind of filter and click search
            3. click 'search' button (pop up search should appear), search for a video, click submit
            4. click 'search' button again and type different keyword and submit (notice that the view list are similiar to the previous one)

            I think this issue need more work to be done.

            Test failed.

            Show
            Rossiani Wijaya added a comment - - edited Thanks Ds for the patch. It fixed the 'invalid json error'. However, the search result doesn't return the expected video. To reproduce: with tinyMCE, select the YouTube repository. Perform search for a video, select any kind of filter and click search click 'search' button (pop up search should appear), search for a video, click submit click 'search' button again and type different keyword and submit (notice that the view list are similiar to the previous one) I think this issue need more work to be done. Test failed.
            Hide
            Aparup Banerjee added a comment -

            this has been reverted from integration. There seems to be issues related to sorting and the results obtained.

            Show
            Aparup Banerjee added a comment - this has been reverted from integration. There seems to be issues related to sorting and the results obtained.
            Hide
            Dongsheng Cai added a comment -

            Change git repo to mine for fixing

            Show
            Dongsheng Cai added a comment - Change git repo to mine for fixing
            Hide
            Sam Hemelryk added a comment -

            Hi DS,

            This gets my +1 on a peer-review.
            The only thing I noted was that once I had run the first search if I then proceeded to click search at the top of the file manager again I could enter a new keyword to search but I could not change the sorting of the results like I could for the first search. Perhaps a new issue to fix that one, the workaround is of course to select a different repository and then select youtube again.

            Cheers
            Sam

            Show
            Sam Hemelryk added a comment - Hi DS, This gets my +1 on a peer-review. The only thing I noted was that once I had run the first search if I then proceeded to click search at the top of the file manager again I could enter a new keyword to search but I could not change the sorting of the results like I could for the first search. Perhaps a new issue to fix that one, the workaround is of course to select a different repository and then select youtube again. Cheers Sam
            Hide
            moodle.com added a comment -

            Hi, Dongsheng.

            I noticed this was hanging around in STABLE Sprint 12. It would be good to resolve this. It looks to be almost there.

            Show
            moodle.com added a comment - Hi, Dongsheng. I noticed this was hanging around in STABLE Sprint 12. It would be good to resolve this. It looks to be almost there.
            Hide
            Dongsheng Cai added a comment -

            new issue created to improve filepicker search dialog.

            Show
            Dongsheng Cai added a comment - new issue created to improve filepicker search dialog.
            Hide
            Eloy Lafuente (stronk7) added a comment -

            The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

            TIA and ciao

            Show
            Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
            Hide
            Aparup Banerjee added a comment -

            Thanks everyone! Fixes here have been integrated

            Show
            Aparup Banerjee added a comment - Thanks everyone! Fixes here have been integrated
            Hide
            Rossiani Wijaya added a comment -

            This works great.

            Test passed.

            Show
            Rossiani Wijaya added a comment - This works great. Test passed.
            Hide
            Eloy Lafuente (stronk7) added a comment -

            And this code has been spread to all Moodle git and cvs repositories. Many thanks! Closing.

            Ciao

            Show
            Eloy Lafuente (stronk7) added a comment - And this code has been spread to all Moodle git and cvs repositories. Many thanks! Closing. Ciao

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: