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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Portfolio
    • 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.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                24/Nov/10