Moodle

Its not possible to export as a plain file if the plugin only supports this format

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 2.0
  • Fix Version/s: 2.0
  • Component/s: Portfolio API
  • Labels:
    None
  • Affected Branches:
    MOODLE_20_STABLE
  • Fixed Branches:
    MOODLE_20_STABLE

Description

(Sorry if this bug report is a bit hard to follow - mostly creating it to ensure I remember to investigate/reproduce)

1) Enable a portfolio plugin which allows PORTFOLIO_FORMAT_FILE only
2) Create a forum post with an mp3 attachment
3) The mp3 attachment has the export to portfolio plugin - press it
4) get:
No common formats between any available portfolio plugin and the calling location (caller supported )

More information about this error

Stack trace:
line 296 of /lib/portfolio/exporter.php: portfolio_export_exception thrown
line 236 of /lib/portfolio/exporter.php: call to portfolio_exporter->process_stage_config()
line 267 of /portfolio/add.php: call to portfolio_exporter->process_stage()

In addition to what I suspect the bug is related to:
unsetting 0 file because it conflicts with richhtml
line 690 of /lib/portfoliolib.php: call to debugging()
line 334 of /lib/portfolio/caller.php: call to portfolio_most_specific_formats()
line 292 of /lib/portfolio/exporter.php: call to portfolio_caller_base->supported_formats()
line 236 of /lib/portfolio/exporter.php: call to portfolio_exporter->process_stage_config()
line 267 of /portfolio/add.php: call to portfolio_exporter->process_stage()
unsetting 2 plainhtml because it conflicts with richhtml
line 690 of /lib/portfoliolib.php: call to debugging()
line 334 of /lib/portfolio/caller.php: call to portfolio_most_specific_formats()
line 292 of /lib/portfolio/exporter.php: call to portfolio_caller_base->supported_formats()
line 236 of /lib/portfolio/exporter.php: call to portfolio_exporter->process_stage_config()
line 267 of /portfolio/add.php: call to portfolio_exporter->process_stage()

And a problem with $a->formats:

( ! ) Notice: Trying to get property of non-object in /var/www/moodle/lib/moodlelib.php(6017) : eval()'d code on line 1
Call Stack

  1. Time Memory Function Location
    1 0.0035 148380 {main}( ) ../add.php:0
    2 0.6974 32094940 portfolio_exporter->process_stage( ) ../add.php:267
    3 0.9079 32095960 portfolio_exporter->process_stage_config( ) ../exporter.php:236
    4 0.9104 32098324 portfolio_export_exception->__construct( ) ../exporter.php:296
    5 0.9159 32099296 moodle_exception->__construct( ) ../exceptions.php:63
    6 0.9159 32099296 get_string( ) ../setuplib.php:88
    7 0.9159 32099296 string_manager->get_string( ) ../moodlelib.php:6277
    8 0.9160 32099296 string_manager->get_string_from_file( ) ../moodlelib.php:6138
    9 0.9161 32100940 eval( ''$result = "No common formats between any available portfolio plugin and the calling location $a->location (caller supported $a->formats)";'' ) ../moodlelib.php:6017

If I comment out line 691, I at least get some format choice and can export as a file.

Activity

Hide
Penny Leach added a comment -

what area were you trying to export from?

Show
Penny Leach added a comment - what area were you trying to export from?
Hide
Dan Poltawski added a comment -

a course forum?

Show
Dan Poltawski added a comment - a course forum?
Hide
Penny Leach added a comment -

Sorry I missed that bit in the amount of text

You were trying to export just the attachment, or the post containing the attachment ?

And which portfolio plugin? (Just for completeness)

The conflicts stuff is buggy and I'm having a bit of trouble figuring it out. It has to be in there, but so far it's incomplete

Show
Penny Leach added a comment - Sorry I missed that bit in the amount of text You were trying to export just the attachment, or the post containing the attachment ? And which portfolio plugin? (Just for completeness) The conflicts stuff is buggy and I'm having a bit of trouble figuring it out. It has to be in there, but so far it's incomplete
Hide
Penny Leach added a comment -

ok I can definitely reproduce this problem and I agree, there's a problem. I can't quite wrap my head around the conflicts stuff - some input from someone other than me would be grand!

Show
Penny Leach added a comment - ok I can definitely reproduce this problem and I agree, there's a problem. I can't quite wrap my head around the conflicts stuff - some input from someone other than me would be grand!
Hide
Dan Poltawski added a comment -

*scratches head and tries to remember..

Show
Dan Poltawski added a comment - *scratches head and tries to remember..
Hide
Penny Leach added a comment -

Just committed a fix. Please to test (with your excellent repro steps (it was just the attachment btw))

Show
Penny Leach added a comment - Just committed a fix. Please to test (with your excellent repro steps (it was just the attachment btw))
Hide
Dan Poltawski added a comment -

Verified

Show
Dan Poltawski added a comment - Verified
Hide
Eloy Lafuente (stronk7) added a comment -

Hi, looking for "unsetting 0 richhtml because it conflicts with plainhtml" I arrived here.

I'm getting continuous:

unsetting 0 file because it's not specific enough (plainhtml is better)
line 696 of /lib/portfoliolib.php: call to debugging()
line 181 of /lib/portfoliolib.php: call to portfolio_most_specific_formats()
line 3511 of /mod/forum/lib.php: call to portfolio_add_button->set_formats()
line 5850 of /mod/forum/lib.php: call to forum_print_post()
line 278 of /mod/forum/discuss.php: call to forum_print_discussion()

unsetting 1 richhtml because it conflicts with plainhtml
line 703 of /lib/portfoliolib.php: call to debugging()
line 181 of /lib/portfoliolib.php: call to portfolio_most_specific_formats()
line 3511 of /mod/forum/lib.php: call to portfolio_add_button->set_formats()
line 5850 of /mod/forum/lib.php: call to forum_print_post()
line 278 of /mod/forum/discuss.php: call to forum_print_discussion()

for each post in forum/discussion.php (also in glossary/view.php for each entry...).

Is related to this or should we open a new bug? Ciao

Show
Eloy Lafuente (stronk7) added a comment - Hi, looking for "unsetting 0 richhtml because it conflicts with plainhtml" I arrived here. I'm getting continuous: unsetting 0 file because it's not specific enough (plainhtml is better) line 696 of /lib/portfoliolib.php: call to debugging() line 181 of /lib/portfoliolib.php: call to portfolio_most_specific_formats() line 3511 of /mod/forum/lib.php: call to portfolio_add_button->set_formats() line 5850 of /mod/forum/lib.php: call to forum_print_post() line 278 of /mod/forum/discuss.php: call to forum_print_discussion() unsetting 1 richhtml because it conflicts with plainhtml line 703 of /lib/portfoliolib.php: call to debugging() line 181 of /lib/portfoliolib.php: call to portfolio_most_specific_formats() line 3511 of /mod/forum/lib.php: call to portfolio_add_button->set_formats() line 5850 of /mod/forum/lib.php: call to forum_print_post() line 278 of /mod/forum/discuss.php: call to forum_print_discussion() for each post in forum/discussion.php (also in glossary/view.php for each entry...). Is related to this or should we open a new bug? Ciao
Hide
Penny Leach added a comment -

sorry eloy i left the debugging in too long. i'll remove it tomorrow.

Show
Penny Leach added a comment - sorry eloy i left the debugging in too long. i'll remove it tomorrow.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: