Moodle

The langdoc preview do not work on subdirectories

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.9
  • Fix Version/s: 1.9
  • Component/s: Language
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

The langdoc_preview_url function doesn't work as expected on nested subdirectories of the help tree!

I suggest this fix on line 246 of the admin/langdoc.php file

$url = '/help.php?module='.implode('/',array_slice($currentpathexp,0,count($currentpathexp)-1)).'&file='.end($currentpathexp);

instead of

$url = '/help.php?module='.$currentpathexp[0].'&file='.$currentpathexp[1];

as not all the paths are LANGDIR/help/module/file... eg LANGDIR/help/enrol/authorize/aba.html !!!

Activity

Hide
David Mudrak added a comment -

I plan to rewrite whole langdoc.php and incorporate it into lang.php. I will keep this issue in mind. Thank you.

Show
David Mudrak added a comment - I plan to rewrite whole langdoc.php and incorporate it into lang.php. I will keep this issue in mind. Thank you.
Hide
David Mudrak added a comment -

Fixed in 19-STABLE and merged into HEAD. Thanks for the patch.

Show
David Mudrak added a comment - Fixed in 19-STABLE and merged into HEAD. Thanks for the patch.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: