Moodle
  1. Moodle
  2. MDL-30195

Export forum discussion without attachments to google docs portfolio

    Details

    • Testing Instructions:
      Hide
      1. Create a new forum
      2. Add a discussion
      3. Create a few posts
        • One with with images in the text
        • One with an attachment
        • One with both
      4. Enable the portfolios
      5. Configure the portfolio Google Docs
      6. Disable all the portfolios but the Google Docs one
      7. Return to the forum discussion
      8. Click the button to export the entire discussion
        • Make sure the discussion and the attachments and images have been exported
      9. Export a single post
        • Make sure the post images and attachments have been exported
      Show
      Create a new forum Add a discussion Create a few posts One with with images in the text One with an attachment One with both Enable the portfolios Configure the portfolio Google Docs Disable all the portfolios but the Google Docs one Return to the forum discussion Click the button to export the entire discussion Make sure the discussion and the attachments and images have been exported Export a single post Make sure the post images and attachments have been exported
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • Pull from Repository:
    • Pull 2.4 Branch:
    • Pull 2.5 Branch:
    • Pull 2.6 Branch:
    • Pull Master Branch:
      MDL-30195-master
    • Story Points:
      20
    • Rank:
      53648
    • Sprint:
      FRONTEND Sprint 7

      Description

      We've got google docs portfolio enabled in our moodle site.

      Now, when I want to export a forum discussion to google docs and no forum post within this discussion contains any attachments, the export works flawlessly.

      As soon as a forum post within this discussion contains an attachment (mainly an image) and
      a) when exporting the whole discussion, there is a nice but meaningless error message saying "No common formats between any available portfolio plugin and the calling location forum_portfolio_caller"
      b) when exporting a single post, google docs is not available anymore as portfolio

      Would it be possible to improve this to export the forum discussion to google docs regardless of any attachment so that the user gets at least the discussion text?

        Issue Links

          Activity

          Hide
          Michael de Raadt added a comment -

          This sounds like a bug to me.

          Could you please add replication steps and possibly some screen shots? That would help.

          Show
          Michael de Raadt added a comment - This sounds like a bug to me. Could you please add replication steps and possibly some screen shots? That would help.
          Hide
          Penny Leach added a comment -

          This should be assigned to Dan P - he wrote the googledocs plugin.

          Show
          Penny Leach added a comment - This should be assigned to Dan P - he wrote the googledocs plugin.
          Hide
          Alexander Bias added a comment -

          Could you please add replication steps and possibly some screen shots? That would help.

          Here are the replication steps.

          Case a)

          • Go to a forum discussion, for example http://YOURMOODLEURL/mod/forum/discuss.php?d=DISCUSSIONID
          • Make sure that all discussion entries are text only
          • From the top of the discussion page, select "Google Docs" and click "Export whole discussion" button
          • Discussion is exported to google docs
          • Now add a discussion entry and make sure that this discussion entry has an image attached
          • From the top of the discussion page, select "Google Docs" and click "Export whole discussion" button
          • Error message "No common formats between any available portfolio plugin and the calling location forum_portfolio_caller (caller supported )" appears

          ------------

          Case b)

          • Now pick a discussion entry which has an image attached
          • Click "Export to portfolio"
          • In "Select destination" there is no "Google docs" entry
          • Export to google docs is impossible
          Show
          Alexander Bias added a comment - Could you please add replication steps and possibly some screen shots? That would help. Here are the replication steps. Case a) Go to a forum discussion, for example http://YOURMOODLEURL/mod/forum/discuss.php?d=DISCUSSIONID Make sure that all discussion entries are text only From the top of the discussion page, select "Google Docs" and click "Export whole discussion" button Discussion is exported to google docs Now add a discussion entry and make sure that this discussion entry has an image attached From the top of the discussion page, select "Google Docs" and click "Export whole discussion" button Error message "No common formats between any available portfolio plugin and the calling location forum_portfolio_caller (caller supported )" appears ------------ Case b) Go to a forum discussion, for example http://YOURMOODLEURL/mod/forum/discuss.php?d=DISCUSSIONID Pick a discussion entry which is text only. Click "Export to portfolio" Set "Select destination" box to "Google docs" Click "next" Discussion entry is exported to google docs Now pick a discussion entry which has an image attached Click "Export to portfolio" In "Select destination" there is no "Google docs" entry Export to google docs is impossible
          Hide
          Dan Poltawski added a comment -

          Verified this

          Show
          Dan Poltawski added a comment - Verified this
          Hide
          Frédéric Massart added a comment -

          Looks like it is not an issue... MDLQA-2520

          Show
          Frédéric Massart added a comment - Looks like it is not an issue... MDLQA-2520
          Hide
          Dan Poltawski added a comment -

          I think this was fixed by 2.3, closing.

          Show
          Dan Poltawski added a comment - I think this was fixed by 2.3, closing.
          Hide
          Scott Brubaker added a comment -

          I still have this issue in Moodle 2.3.3.

          Show
          Scott Brubaker added a comment - I still have this issue in Moodle 2.3.3.
          Hide
          Michael de Raadt added a comment -

          I encountered these errors when I tried to export a forum post or discussion to the Google portfolio. I tried this in 2.3 and master (2.4.1+).

          Here is some more detail on the "Export whole discussion error"...

          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()
          

          When I exported a single post with an image inside I was presented with the same error. I suspect this is because I don't have any other portfolio plugins enabled.

          I'll reopen this issue.

          Show
          Michael de Raadt added a comment - I encountered these errors when I tried to export a forum post or discussion to the Google portfolio. I tried this in 2.3 and master (2.4.1+). Here is some more detail on the "Export whole discussion error"... 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() When I exported a single post with an image inside I was presented with the same error. I suspect this is because I don't have any other portfolio plugins enabled. I'll reopen this issue.
          Hide
          Johan Reinalda added a comment -

          We are experiencing the exact same errors on a site running "Moodle 2.3.4+ (Build: 20130208)",
          where we are trying to figure out if and how this functionality can help us.

          Johan

          Show
          Johan Reinalda added a comment - We are experiencing the exact same errors on a site running "Moodle 2.3.4+ (Build: 20130208)", where we are trying to figure out if and how this functionality can help us. Johan
          Hide
          Dan Poltawski added a comment -

          This issue was assigned to me automatically, however I will not be able to work on this issue in the immediate future. In order to create a truer sense of the state of this issue and to allow other developers to have chance to become involved, I am removing myself as the assignee of this issue.
          For more information, see http://docs.moodle.org/dev/Changes_to_issue_assignment

          Show
          Dan Poltawski added a comment - This issue was assigned to me automatically, however I will not be able to work on this issue in the immediate future. In order to create a truer sense of the state of this issue and to allow other developers to have chance to become involved, I am removing myself as the assignee of this issue. For more information, see http://docs.moodle.org/dev/Changes_to_issue_assignment
          Hide
          Yvonne Hamilton added a comment - - edited

          Still stuffed in Moodle 2.4.4+ too!
          Also the Glossary issue is a problem still (not able to select Google docs) and also when I was using the file download option it didn't download the attachments for Glossary entries. I got a zip file with the HTML page but no images. Do others get that also?
          With the Google Docs the option to select Google docs shows on the 'Select Destination' page for forum posts with no attachements but if there are attachments it defaults straight to the 'Configure exported data' page with File download options displayed. But....if you check on the button that says 'export whole discussion' and have Google Docs selected ( not file download)at the top of the forum discussion then it trys to connect to Google Docs....and the 'No common formats between available portfolis plugin....' errors displays.

          Show
          Yvonne Hamilton added a comment - - edited Still stuffed in Moodle 2.4.4+ too! Also the Glossary issue is a problem still (not able to select Google docs) and also when I was using the file download option it didn't download the attachments for Glossary entries. I got a zip file with the HTML page but no images. Do others get that also? With the Google Docs the option to select Google docs shows on the 'Select Destination' page for forum posts with no attachements but if there are attachments it defaults straight to the 'Configure exported data' page with File download options displayed. But....if you check on the button that says 'export whole discussion' and have Google Docs selected ( not file download)at the top of the forum discussion then it trys to connect to Google Docs....and the 'No common formats between available portfolis plugin....' errors displays.
          Hide
          Frédéric Massart added a comment -

          I am pushing a patch for peer review, and here are some details about the problem here.

          First of all, the exception raised is part of an issue in the portfolio API. It is impossible, or really bad performance wise, to figure out if some of the posts contain files, and so when we start the export, the format of the export changes to something we do not support at all. I did not attempt to fix this. What I did was simply allowing Google Docs to export rich HTML, which is just a combination of files.

          There are some other issues though, I have raised MDL-43403 because the files are not exported in the site_files directory, but I am not sure if that should be fixed before MDL-37984 - converting to Google Drive API.

          So yeah, the fix is quite easy, but that solves exactly what this issue is about, without restricting the attachments at all (which is also another hard/impossible due to the current portfolio API).

          Thanks,
          Fred

          Show
          Frédéric Massart added a comment - I am pushing a patch for peer review, and here are some details about the problem here. First of all, the exception raised is part of an issue in the portfolio API. It is impossible, or really bad performance wise, to figure out if some of the posts contain files, and so when we start the export, the format of the export changes to something we do not support at all. I did not attempt to fix this. What I did was simply allowing Google Docs to export rich HTML, which is just a combination of files. There are some other issues though, I have raised MDL-43403 because the files are not exported in the site_files directory, but I am not sure if that should be fixed before MDL-37984 - converting to Google Drive API. So yeah, the fix is quite easy, but that solves exactly what this issue is about, without restricting the attachments at all (which is also another hard/impossible due to the current portfolio API). Thanks, Fred
          Hide
          Frédéric Massart added a comment -

          (Adding qa_test_required_, though MDLQA-2521 passed through the years, it shouldn't have and should be reviewed.)

          Show
          Frédéric Massart added a comment - (Adding qa_test_required_, though MDLQA-2521 passed through the years, it shouldn't have and should be reviewed.)
          Hide
          Dan Poltawski added a comment -

          Hi Fred,

          I agree with your assessment - simple and does the job.

          Only thing i'd say is that this line in the testing instructions might be a bit confusing to the tester:

          • 'Create a few posts with images/rich HTML and attachments'

          (What is rich html? Perhaps it ok just to ask for an attachment?)

          Show
          Dan Poltawski added a comment - Hi Fred, I agree with your assessment - simple and does the job. Only thing i'd say is that this line in the testing instructions might be a bit confusing to the tester: 'Create a few posts with images/rich HTML and attachments' (What is rich html? Perhaps it ok just to ask for an attachment?)
          Hide
          Frédéric Massart added a comment -

          Thanks Dan. I have clarified what I was expecting in the testing instructions.

          Show
          Frédéric Massart added a comment - Thanks Dan. I have clarified what I was expecting in the testing instructions.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Hi guys,

          this is just a message to share with you that I'm going to perform a test of the automated pre-checker against all the current issues awaiting integration (16 issues).

          So, soon, you'll get some extra comments in this issue with some information from the pre-checker. Note it's not final, but just an experiment and there are lots of things to improve, from the message itself to various false positives in the checkers. So take any report with caution, it's not 100% accurate yet.

          Please, feel free to comment any idea/objection @ MDLSITE-2662. I'll be collecting everything there.

          TIA and ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Hi guys, this is just a message to share with you that I'm going to perform a test of the automated pre-checker against all the current issues awaiting integration (16 issues). So, soon, you'll get some extra comments in this issue with some information from the pre-checker. Note it's not final, but just an experiment and there are lots of things to improve, from the message itself to various false positives in the checkers. So take any report with caution, it's not 100% accurate yet. Please, feel free to comment any idea/objection @ MDLSITE-2662 . I'll be collecting everything there. TIA and ciao
          Hide
          CiBoT added a comment -

          Results for MDL-30195

          Show
          CiBoT added a comment - Results for MDL-30195 Branch MDL-30195 -24 to be integrated into upstream MOODLE_24_STABLE Executed job http://ci.stronk7.com/job/Precheck%20remote%20branch/679 Execution status: 0 Details: http://ci.stronk7.com/job/Precheck%20remote%20branch/679/artifact/work/smurf.html Branch MDL-30195 -25 to be integrated into upstream MOODLE_25_STABLE Executed job http://ci.stronk7.com/job/Precheck%20remote%20branch/680 Execution status: 0 Details: http://ci.stronk7.com/job/Precheck%20remote%20branch/680/artifact/work/smurf.html Branch MDL-30195 -26 to be integrated into upstream MOODLE_26_STABLE Executed job http://ci.stronk7.com/job/Precheck%20remote%20branch/681 Execution status: 0 Details: http://ci.stronk7.com/job/Precheck%20remote%20branch/681/artifact/work/smurf.html Branch MDL-30195 -master to be integrated into upstream master Executed job http://ci.stronk7.com/job/Precheck%20remote%20branch/682 Execution status: 0 Details: http://ci.stronk7.com/job/Precheck%20remote%20branch/682/artifact/work/smurf.html
          Hide
          Sam Hemelryk added a comment -

          Thanks Fred - this has been integrated now.

          Show
          Sam Hemelryk added a comment - Thanks Fred - this has been integrated now.
          Hide
          Sam Hemelryk added a comment -

          Waiting for CI to complete testing before finally passing.

          Show
          Sam Hemelryk added a comment - Waiting for CI to complete testing before finally passing.
          Hide
          Sam Hemelryk added a comment -

          Tested and passed

          Show
          Sam Hemelryk added a comment - Tested and passed
          Hide
          Sam Hemelryk added a comment -

          Thank you, your code has landed just in time for 2013.
          Merry Christmas and may your 2014 be even better than 2013.

          Kind regards with much holiday spirit
          Sam

          Show
          Sam Hemelryk added a comment - Thank you, your code has landed just in time for 2013. Merry Christmas and may your 2014 be even better than 2013. Kind regards with much holiday spirit Sam

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Agile