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

Google Docs Repository doesn't show all files

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.5
    • Fix Version/s: 2.3
    • Component/s: Repositories
    • Labels:
    • Affected Branches:
      MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE

      Description

      I'm trying to setup Google Docs access on my site.

      I'm able to login through the filepicker and see my Google Docs but not all files are showing up. Right now all I can see are pdf's.

      When uploading files to Google you are given the option to convert. If I don't convert all I see are pdf's. If I do use Google's convert I can then see Microsoft Word Docs as well as pdf's. Other files it takes and appends .rtf to the end. I don't see this in Google and only assume this is done by the filepicker.

      Is this a bug or is this supposed to be how it works. None of the documentation I have seen says what it should and should not show.

        Gliffy Diagrams

        1. googledocs.png
          42 kB
        2. googledocsconverted.png
          68 kB
        3. googledocsfixed.png
          49 kB

          Issue Links

            Activity

            henestofelj James Henestofel created issue -
            Hide
            henestofelj James Henestofel added a comment - - edited

            googledocs.png shows what my google docs has in it and what the filepicker shows

            Show
            henestofelj James Henestofel added a comment - - edited googledocs.png shows what my google docs has in it and what the filepicker shows
            henestofelj James Henestofel made changes -
            Field Original Value New Value
            Attachment googledocs.png [ 27699 ]
            henestofelj James Henestofel made changes -
            Description I'm trying to setup Google Docs access on my site.

            I'm able to login through the filepicker and see my Google Docs but not all files are showing up. Right now all I can see are pdf's.

            When uploading files to Google you are given the option to convert. If I don't convert all I see are pdf's. If I do use Google's convert I can then see Microsoft Word Docs as well as pdf's. Other files it takes and appends .rtf to the end which breaks the file(This is a Google Issue).

            Is this a bug or is this supposed to be how it works. None of the documentation I have seen says what it should and should not show.
            I'm trying to setup Google Docs access on my site.

            I'm able to login through the filepicker and see my Google Docs but not all files are showing up. Right now all I can see are pdf's.

            When uploading files to Google you are given the option to convert. If I don't convert all I see are pdf's. If I do use Google's convert I can then see Microsoft Word Docs as well as pdf's. Other files it takes and appends .rtf to the end. I don't see this in Google and only assume this is done by the filepicker.

            Is this a bug or is this supposed to be how it works. None of the documentation I have seen says what it should and should not show.
            Hide
            henestofelj James Henestofel added a comment - - edited

            googledocsconverted.png shows my google docs setup with the files converted using google's convert and what the file picker shows. Files that are not microsoft word files have .rtf appended. Not sure if thats google or the filepicker

            Show
            henestofelj James Henestofel added a comment - - edited googledocsconverted.png shows my google docs setup with the files converted using google's convert and what the file picker shows. Files that are not microsoft word files have .rtf appended. Not sure if thats google or the filepicker
            henestofelj James Henestofel made changes -
            Attachment googledocsconverted.png [ 27700 ]
            henestofelj James Henestofel made changes -
            Priority Minor [ 4 ] Major [ 3 ]
            Hide
            salvetore Michael de Raadt added a comment -

            Thanks for reporting that.

            I was able to reproduce this. The only file types I was able to see were documents, spreadsheets and presentations and these were provided with extensions .rtf, .xls and .ppt respectively. Other files in my Google docs storage were not shown.

            I've put that on the backlog.

            In the meantime feel free to help us work on this issue. If you are able to provide a patch, please add a patch label so we will spot it.

            Show
            salvetore Michael de Raadt added a comment - Thanks for reporting that. I was able to reproduce this. The only file types I was able to see were documents, spreadsheets and presentations and these were provided with extensions .rtf, .xls and .ppt respectively. Other files in my Google docs storage were not shown. I've put that on the backlog. In the meantime feel free to help us work on this issue. If you are able to provide a patch, please add a patch label so we will spot it.
            salvetore Michael de Raadt made changes -
            Labels triaged
            salvetore Michael de Raadt made changes -
            Fix Version/s STABLE backlog [ 10463 ]
            Hide
            henestofelj James Henestofel added a comment - - edited

            Michael,

            On my instance I was able to get the all the docs to show by adding a case for the types of files its looking for.

            In Moodle 2.1.5 (Build: 20120312) and the file at /lib/googleapi.php I added the following lines at line 322.

            case 'file':
            $title = (string)$gdoc->title;
            $source = (string)$gdoc->content[0] -> attributes() -> src;
            break;

            It just adds another case to look for in the google docs file system. All files that are not "Google Converted" Word docs or pdfs come through with the type as "file" which wasn't being checked for. I was able to add the files to my courses and view them just fine.

            Show
            henestofelj James Henestofel added a comment - - edited Michael, On my instance I was able to get the all the docs to show by adding a case for the types of files its looking for. In Moodle 2.1.5 (Build: 20120312) and the file at /lib/googleapi.php I added the following lines at line 322. case 'file': $title = (string)$gdoc->title; $source = (string)$gdoc->content [0] -> attributes() -> src; break; It just adds another case to look for in the google docs file system. All files that are not "Google Converted" Word docs or pdfs come through with the type as "file" which wasn't being checked for. I was able to add the files to my courses and view them just fine.
            Hide
            henestofelj James Henestofel added a comment -

            googledocsfixed.png shows that after the code I have above is added all the files now show up in the filepicker

            Show
            henestofelj James Henestofel added a comment - googledocsfixed.png shows that after the code I have above is added all the files now show up in the filepicker
            henestofelj James Henestofel made changes -
            Attachment googledocsfixed.png [ 27851 ]
            henestofelj James Henestofel made changes -
            Labels triaged patch triaged
            Hide
            henestofelj James Henestofel added a comment -

            Any progress on this issue. Will the patch I show above work for this?? We really need this and the provider we work with won't make changes like this and will only use the latest versions of moodle so they don't have to modify the core.

            Show
            henestofelj James Henestofel added a comment - Any progress on this issue. Will the patch I show above work for this?? We really need this and the provider we work with won't make changes like this and will only use the latest versions of moodle so they don't have to modify the core.
            Hide
            rob13 Rob added a comment - - edited

            The file picker also does not display files of any type if they are placed in a collection (folder in Google Drive).

            Show
            rob13 Rob added a comment - - edited The file picker also does not display files of any type if they are placed in a collection (folder in Google Drive).
            poltawski Dan Poltawski made changes -
            Assignee Dongsheng Cai [ dongsheng ] Dan Poltawski [ poltawski ]
            poltawski Dan Poltawski made changes -
            Fix Version/s MUST FIX FOR 2.3 [ 12158 ]
            poltawski Dan Poltawski made changes -
            Link This issue will be resolved by MDL-29857 [ MDL-29857 ]
            Hide
            henestofelj James Henestofel added a comment -

            Since the move to Google Drive. I can't get Google Docs to work at all anymore on our system. My guess is they have changed some stuff and this plugin needs to be modified further than what I have now.

            Show
            henestofelj James Henestofel added a comment - Since the move to Google Drive. I can't get Google Docs to work at all anymore on our system. My guess is they have changed some stuff and this plugin needs to be modified further than what I have now.
            Hide
            rob13 Rob added a comment -

            Hi James,

            It is still working for me and the 30,000 users in my district. What do you see when you click the repository in the file picker?

            Show
            rob13 Rob added a comment - Hi James, It is still working for me and the 30,000 users in my district. What do you see when you click the repository in the file picker?
            Hide
            henestofelj James Henestofel added a comment -

            I think I've figured out the issue. We just recently started using Google Apps for our institution for email and so on. When we did this we now need to register our site with google. Below is the error I get though and the page I searched and found what is likely wrong

            http://info.rjmetrics.com/blog/bid/44933/Google-Analytics-API-Snags-Malformed-Request-The-Site-Has-Not-Been-Registered

            The page you have requested cannot be displayed. Another site was requesting access to your Google Account, but sent a malformed request. Please contact the site that you were trying to use when you received this message to inform them of the error. A detailed error message follows:

            The site "your site here" has not been registered.

            Show
            henestofelj James Henestofel added a comment - I think I've figured out the issue. We just recently started using Google Apps for our institution for email and so on. When we did this we now need to register our site with google. Below is the error I get though and the page I searched and found what is likely wrong http://info.rjmetrics.com/blog/bid/44933/Google-Analytics-API-Snags-Malformed-Request-The-Site-Has-Not-Been-Registered The page you have requested cannot be displayed. Another site was requesting access to your Google Account, but sent a malformed request. Please contact the site that you were trying to use when you received this message to inform them of the error. A detailed error message follows: The site "your site here" has not been registered.
            Hide
            poltawski Dan Poltawski added a comment -

            Hi, I believe issues such as this should be resolved by the linked issue.

            Show
            poltawski Dan Poltawski added a comment - Hi, I believe issues such as this should be resolved by the linked issue.
            poltawski Dan Poltawski made changes -
            Fix Version/s MUST FIX FOR 2.3 [ 12158 ]
            Hide
            henestofelj James Henestofel added a comment -

            Hi Dan,
            I noticed you removed the Fix Version 'MUST FIX FOR 2.3' from this issue. Does that mean you aren't looking at this as a must fix anymore because this causes big issues for our institution and this really needs fixed for us.

            Show
            henestofelj James Henestofel added a comment - Hi Dan, I noticed you removed the Fix Version 'MUST FIX FOR 2.3' from this issue. Does that mean you aren't looking at this as a must fix anymore because this causes big issues for our institution and this really needs fixed for us.
            Hide
            poltawski Dan Poltawski added a comment -

            Hi James,

            No. I have just taken it off the backlog of things to be done as its already address in the linked issue.

            Show
            poltawski Dan Poltawski added a comment - Hi James, No. I have just taken it off the backlog of things to be done as its already address in the linked issue.
            Hide
            poltawski Dan Poltawski added a comment -

            To be clear: yes this will be fixed in 2.3 along with the OAuth plugins.

            Show
            poltawski Dan Poltawski added a comment - To be clear: yes this will be fixed in 2.3 along with the OAuth plugins.
            Hide
            henestofelj James Henestofel added a comment -

            Dan,
            Checked the git repository for 2.3 and this looks fixed. Doesn't looked fixed though for MOODLE_22_STABLE. Is the fix applied to 2.3 going to be done for 2.2?

            Show
            henestofelj James Henestofel added a comment - Dan, Checked the git repository for 2.3 and this looks fixed. Doesn't looked fixed though for MOODLE_22_STABLE. Is the fix applied to 2.3 going to be done for 2.2?
            Hide
            poltawski Dan Poltawski added a comment -

            Sorry James, no this new feature is going to be in 2.3 and above only.

            Show
            poltawski Dan Poltawski added a comment - Sorry James, no this new feature is going to be in 2.3 and above only.
            poltawski Dan Poltawski made changes -
            Status Open [ 1 ] Closed [ 6 ]
            Fix Version/s 2.3 [ 10657 ]
            Fix Version/s STABLE backlog [ 10463 ]
            Resolution Fixed [ 1 ]

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  25/Jun/12