Moodle
  1. Moodle
  2. MDL-33594

Fatal Error exporting glossary entries to portfolio

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3
    • Component/s: Glossary, Portfolio
    • Labels:
    • Testing Instructions:
      Hide

      This test requires the following:

      • Portfolios and the file download and Google Docs portfolio plugins to be enabled for the site
      • A glossary activity containing entries from at least two students
      • A Google Docs account for use in testing
      1. Login as a student, and access the glossary activity.
      2. Try exporting an entry made by you, selecting file download as the portfolio.

      Expected result:

      • The student can export the Glossary entry.
      Show
      This test requires the following: Portfolios and the file download and Google Docs portfolio plugins to be enabled for the site A glossary activity containing entries from at least two students A Google Docs account for use in testing Login as a student, and access the glossary activity. Try exporting an entry made by you, selecting file download as the portfolio. Expected result: The student can export the Glossary entry.
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      wip-MDL-33594-master

      Description

      When a student clicks the link to export a glossary entry to portfolio, Moodle serves a blank page. The server log records the following fatal exception:

      PHP Fatal error: Class 'file_info' not found in /home/tim/webs/moodle/mod/glossary/locallib.php on line 458, referer: http://localhost/moodle/mod/glossary/view.php?id=6

      To Recreate:
      This test requires the following:

      Portfolios and the file download and Google Docs portfolio plugins to be enabled for the site
      A glossary activity containing entries from at least two students
      A Google Docs account for use in testing

      1. Login as a student, and access the glossary activity.
      2. Try exporting an entry made by you, selecting file download as the portfolio.

      Expected result:

      • The student can export the Glossary entry.

      Actual result:

      • Fatal exception is thrown.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            Dan Poltawski added a comment -

            I'm afraid I don't think the solution here or in the related data export export issue (MDL-33527) is quite correct.

            I think we should be including filelib.php which will itself include this internal part of filelib. Rather than this specific class.

            The problem is that it this internal class might depend on some other part of filelib. Its sort of a private part of the api.

            Thats why you only get one result for it in current codebase:

            git grep file_info.php
            lib/filebrowser/file_browser.php:require_once("$CFG->libdir/filebrowser/file_info.php");
            mod/data/locallib.php:require_once($CFG->libdir . '/filebrowser/file_info.php');
            

            Show
            Dan Poltawski added a comment - I'm afraid I don't think the solution here or in the related data export export issue ( MDL-33527 ) is quite correct. I think we should be including filelib.php which will itself include this internal part of filelib. Rather than this specific class. The problem is that it this internal class might depend on some other part of filelib. Its sort of a private part of the api. Thats why you only get one result for it in current codebase: git grep file_info.php lib/filebrowser/file_browser.php:require_once("$CFG->libdir/filebrowser/file_info.php"); mod/data/locallib.php:require_once($CFG->libdir . '/filebrowser/file_info.php');
            Hide
            Dan Poltawski added a comment -

            The patch didn't apply cleanly as it wasn't done on top of integration so I fixed it up myself.

            Show
            Dan Poltawski added a comment - The patch didn't apply cleanly as it wasn't done on top of integration so I fixed it up myself.
            Hide
            Tim Barker added a comment -

            Works for file export and Google Docs

            Show
            Tim Barker added a comment - Works for file export and Google Docs
            Hide
            Eloy Lafuente (stronk7) added a comment -

            We could celebrate it today... but better if we perform a bigger party after releasing Moodle 2.3.

            Print this message and come to Perth that day, it's valid for one beer, wine, coke or... water, as you wish.

            Many thanks for your collaboration!

            Ciao

            Show
            Eloy Lafuente (stronk7) added a comment - We could celebrate it today... but better if we perform a bigger party after releasing Moodle 2.3. Print this message and come to Perth that day, it's valid for one beer, wine, coke or... water, as you wish. Many thanks for your collaboration! Ciao

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: