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

When exporting to portfolio the module instance name is not displayed correctly in header

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • 2.0
    • Portfolio
    • MOODLE_20_STABLE
    • Easy

      When exporting to portfolio from a module the module instance name is not displayed correctly in the navigation breadcrumb in the header.

      Have seen this in core mods (glossary) and also in my own custom module.

      Problem lies with lib/portfolio/caller.php portfolio_module_caller_base class.

      function get_navigation returns $extranav as a flat associative array.

      Needs to be returned as a multi-dimensional array as lib/portfoliolib.php portfolio_export_pagesetup() expects to run through array and get named values from each element.

      Not sure which part is at fault (lib or caller) so have not provided patch.

      To fix I changed portfolio_module_caller_base.

      i.e.
      wrap $extranav in array
      ln 529: $extranav = array(array('name' => $this->cm->name, 'link' => $this->get_return_url()));

            mudrd8mz David Mudrák (@mudrd8mz)
            jp76 Jason Platts
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.