Moodle
  1. Moodle
  2. MDL-7442

Help files search should work the same as message string files search

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8
    • Fix Version/s: 1.8
    • Component/s: Language
    • Labels:
      None
    • Affected Branches:
      MOODLE_18_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE
    • Rank:
      34302

      Description

      get_string() now looks for message string files in location <lang>local amongst other locations. However help.php strangely chooses locations in $CFG->dirroot or $CFG->dataroot depending upon whether the language is en_utf8 or not and never checks <lang>_local at all. This is not consistent with regard to searching for message string files as if you have <lang>_local messages you would expect help files to be located in <lang>_local/help. Also if you have your own language setting of my<lang> say in $CFG->dirroot you would expect help files to be located in $CFG->dirroot/land/my_<lang>/help.

      The attached patch addresses this inconsistency and extends search locations for help files. It still searches the same locations as before, and the order of searching for each language has been modified to:

      $CFG->dirroot/lang/<lang>_local/help
      $CFG->dirroot/lang/<lang>/help
      $CFG->dataroot/lang/<lang>_local/help
      $CFG->dataroot/lang/<lang>/help
      $CFG->dirroot/mod/<module>/lang/<lang>/help

        Activity

        Hide
        Derek Woolhead added a comment -

        Well, as it appears nobody has even bothered to look at this, and help file has subsequently been changed, badly to resolve part of this issue, which invalidates this patch, I am closing this bug and correcting the changes made to the help file.

        Show
        Derek Woolhead added a comment - Well, as it appears nobody has even bothered to look at this, and help file has subsequently been changed, badly to resolve part of this issue, which invalidates this patch, I am closing this bug and correcting the changes made to the help file.
        Hide
        Derek Woolhead added a comment -

        We plan to fix the code currently in head and make sure that the search works in dirroot as well as dataroot.

        Show
        Derek Woolhead added a comment - We plan to fix the code currently in head and make sure that the search works in dirroot as well as dataroot.
        Hide
        David Mudrak added a comment -

        See MDL-8089 as well

        Show
        David Mudrak added a comment - See MDL-8089 as well

          People

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

            Dates

            • Created:
              Updated:
              Resolved: