Moodle
  1. Moodle
  2. MDL-39414

Don't wait option does not work when exporting data to Google Docs portfolio

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.6, 2.4.3, 2.5
    • Fix Version/s: 2.3.7, 2.4.4
    • Component/s: Portfolio
    • Labels:
    • Testing Instructions:
      Hide
      1. Enable portfolios
      2. Enable the googledocs and picasa portfolio plugins (you'll need to register/use api details, its not hard)
      3. In Site administration > Plugins > Portfolios > Common portfolio settings, take note of moderate transfer filesize
      4. Create a forum post and upload an image bigger then moderate filesize (or change with the settings if you don't have the image, use your noggin son!) with it
      5. View the forum post, and click the export to portfolio *icon*
      6. Choose google docs
      7. VERIFY: that you are just taken to export the item (it might take a bit of time)
      8. VERIFY: that you are not prompted to wait.
      9. VERIFY: that you are not told that the export is queued
      10. Repeat the export process choosing picasa.
      Show
      Enable portfolios Enable the googledocs and picasa portfolio plugins (you'll need to register/use api details, its not hard) In Site administration > Plugins > Portfolios > Common portfolio settings, take note of moderate transfer filesize Create a forum post and upload an image bigger then moderate filesize (or change with the settings if you don't have the image, use your noggin son!) with it View the forum post, and click the export to portfolio * icon * Choose google docs VERIFY: that you are just taken to export the item (it might take a bit of time) VERIFY: that you are not prompted to wait. VERIFY: that you are not told that the export is queued Repeat the export process choosing picasa.
    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Pull Master Branch:
      MDL-39414-master

      Description

      Discovered by Carol Shergold during MDLQA-5392 testing. With portfolios and the GDocs portfolio enabled, when you export a chat session to a GDocs portfolio, depending on the estimated size of the transfer users are asked to choose to wait or to don't wait (see MDLQA-5392 screenshots) to begin the download. The Wait option works as described in https://tracker.moodle.org/browse/MDLQA-5392?focusedCommentId=219057&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-219057 but not the Don't wait

      You can force PORTFOLIO_TIME_MODERATE editing the code or follow Carol tips https://tracker.moodle.org/browse/MDLQA-5392?focusedCommentId=219057&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-219057

      Not sure if other branches are affected, probably other modules than chat are also affected.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            Dan Poltawski added a comment -

            2.3 onwards is affected. To be frank, I think the best solution is to not support the 'dont wait' option for the google docs plugin. Otherwise we have another key storage solution on our hands.

            Show
            Dan Poltawski added a comment - 2.3 onwards is affected. To be frank, I think the best solution is to not support the 'dont wait' option for the google docs plugin. Otherwise we have another key storage solution on our hands.
            Hide
            Dan Poltawski added a comment -

            Download plugin forces the expected time to be low. Its not quite intuitive, but seems like the solution.

            Show
            Dan Poltawski added a comment - Download plugin forces the expected time to be low. Its not quite intuitive, but seems like the solution.
            Hide
            Dan Poltawski added a comment -

            The regression has come from the fact in <2.3 we used to store the token for authenticating in the DB, then we moved to OAuth and session based short lived token in 2.3+, so its impossible for this to work in cron.

            To be honest I think the use case for sending huge files is limited and I strongly believe its the lesser of two evils for us to just keep this 'interactive only' in Moodle.

            Show
            Dan Poltawski added a comment - The regression has come from the fact in <2.3 we used to store the token for authenticating in the DB, then we moved to OAuth and session based short lived token in 2.3+, so its impossible for this to work in cron. To be honest I think the use case for sending huge files is limited and I strongly believe its the lesser of two evils for us to just keep this 'interactive only' in Moodle.
            Hide
            Dan Poltawski added a comment -

            LOL, Sorry David/Carol - I see you've come to the same conclusion as me and I ddin't read your comments properly!

            Show
            Dan Poltawski added a comment - LOL, Sorry David/Carol - I see you've come to the same conclusion as me and I ddin't read your comments properly!
            Hide
            Dan Poltawski added a comment -

            Sending straight for integration. As said, we use the same technique for file download, so i'm relatively confident in the solution.

            Show
            Dan Poltawski added a comment - Sending straight for integration. As said, we use the same technique for file download, so i'm relatively confident in the solution.
            Hide
            Sam Hemelryk added a comment -

            Thanks Dan, changes look spot on and have been integrated now.

            Show
            Sam Hemelryk added a comment - Thanks Dan, changes look spot on and have been integrated now.
            Hide
            Andrew Davis added a comment -

            I'm having trouble with this. Regardless of whether the image is an attachment to the post or within the post itself when I click export to portfolio I get the following error. This is when Im trying to export to Google Docs.

            No common formats between any available portfolio plugin and the calling location forum_portfolio_caller (caller supported )

            More information about this error
            Debug info:
            Error code: nocommonformats
            Stack trace:

            line 287 of /lib/portfolio/exporter.php: portfolio_export_exception thrown
            line 227 of /lib/portfolio/exporter.php: call to portfolio_exporter->process_stage_config()
            line 265 of /portfolio/add.php: call to portfolio_exporter->process_stage()

            Show
            Andrew Davis added a comment - I'm having trouble with this. Regardless of whether the image is an attachment to the post or within the post itself when I click export to portfolio I get the following error. This is when Im trying to export to Google Docs. No common formats between any available portfolio plugin and the calling location forum_portfolio_caller (caller supported ) More information about this error Debug info: Error code: nocommonformats Stack trace: line 287 of /lib/portfolio/exporter.php: portfolio_export_exception thrown line 227 of /lib/portfolio/exporter.php: call to portfolio_exporter->process_stage_config() line 265 of /portfolio/add.php: call to portfolio_exporter->process_stage()
            Hide
            Dan Poltawski added a comment -

            Hi Andrew,

            You need to make sure you click on the tiny icon: https://moodle.org/theme/image.php/moodleofficial/core/1367200486/t/portfolioadd

            That common formats thing is an unfortunate annoyance of the portfolio design (it cna't tell if any plugins are available for that richer data)

            Show
            Dan Poltawski added a comment - Hi Andrew, You need to make sure you click on the tiny icon: https://moodle.org/theme/image.php/moodleofficial/core/1367200486/t/portfolioadd That common formats thing is an unfortunate annoyance of the portfolio design (it cna't tell if any plugins are available for that richer data)
            Hide
            Andrew Davis added a comment -

            This is actually working. If you put the image in the forum post itself and try to export the whole post you get an error as that is not supported. If however you upload the image as an attachment and just export the image it all works nicely. Passing.

            Show
            Andrew Davis added a comment - This is actually working. If you put the image in the forum post itself and try to export the whole post you get an error as that is not supported. If however you upload the image as an attachment and just export the image it all works nicely. Passing.
            Hide
            Dan Poltawski added a comment -

            Thanks! You're changes are now spread to the world through this git and our source control repositories.

            No time to rest though, we've got days to make 2.5 the best yet!

            ciao

            Show
            Dan Poltawski added a comment - Thanks! You're changes are now spread to the world through this git and our source control repositories. No time to rest though, we've got days to make 2.5 the best yet! ciao

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: