Moodle
  1. Moodle
  2. MDL-18691

Resource type names cannot be put in their own local lang files

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8.8, 1.9.4
    • Fix Version/s: 1.8.9, 1.9.5
    • Component/s: Resource
    • Labels:
      None
    • Affected Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE
    • Rank:
      31447

      Description

      Custom resource type plugins can have their own lang/ directory under /mod/resource/type/foo/lang/

      However, the name of the resource type itself has to be in the 'resource' namespace.

      e.g. $string['resourcetypefoo'] = 'Link to a Foo document';

      1. custom_resourcetype_names2.patch
        2 kB
        Francois Marier
      2. resourse-lib.patch
        0.7 kB
        Sam Hemelryk

        Activity

        Francois Marier created issue -
        Hide
        Francois Marier added a comment -

        Patch against 1.9 stable

        Show
        Francois Marier added a comment - Patch against 1.9 stable
        Francois Marier made changes -
        Field Original Value New Value
        Attachment custom_resourcetype_names.patch [ 16688 ]
        Hide
        Francois Marier added a comment -

        Updated patch based on Tim Hunt's comments.

        Show
        Francois Marier added a comment - Updated patch based on Tim Hunt's comments.
        Francois Marier made changes -
        Attachment custom_resourcetype_names2.patch [ 16689 ]
        Francois Marier made changes -
        Attachment custom_resourcetype_names.patch [ 16688 ]
        Hide
        Francois Marier added a comment -

        Fixed in 1.8, 1.9 and HEAD.

        Show
        Francois Marier added a comment - Fixed in 1.8, 1.9 and HEAD.
        Francois Marier made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.8.9 [ 10322 ]
        Fix Version/s 1.9.5 [ 10320 ]
        Resolution Fixed [ 1 ]
        Hide
        Sam Hemelryk added a comment -

        Hi Francois,
        I was just looking to close this issue but wanted to check one thing with you before hand,
        Should the resource name stored in /mod/resource/type/foo/lang/en_utf8/resource_foo.php be used in the editing drop downs should it exist?
        If not then everything is fine and I will close the issue otherwise I have attached a small patch that uses the function you created for this patch to put the /mod/resource/type/foo/lang/en_utf8/resource_foo.php resource name into the drop downs when in editing mode and looking to add a resource.

        Cheers
        Sam

        Show
        Sam Hemelryk added a comment - Hi Francois, I was just looking to close this issue but wanted to check one thing with you before hand, Should the resource name stored in /mod/resource/type/foo/lang/en_utf8/resource_foo.php be used in the editing drop downs should it exist? If not then everything is fine and I will close the issue otherwise I have attached a small patch that uses the function you created for this patch to put the /mod/resource/type/foo/lang/en_utf8/resource_foo.php resource name into the drop downs when in editing mode and looking to add a resource. Cheers Sam
        Sam Hemelryk made changes -
        Attachment resourse-lib.patch [ 17595 ]
        Hide
        Francois Marier added a comment -

        Hi Sam,

        I must have forgotten that case. Please do apply your patch

        Cheers,
        Francois

        Show
        Francois Marier added a comment - Hi Sam, I must have forgotten that case. Please do apply your patch Cheers, Francois
        Hide
        Sam Hemelryk added a comment -

        Closing this issue as I can be sure it works and my involvement was VERY minimal, Thanks Francois

        Show
        Sam Hemelryk added a comment - Closing this issue as I can be sure it works and my involvement was VERY minimal, Thanks Francois
        Sam Hemelryk made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        QA Assignee samhemelryk
        Martin Dougiamas made changes -
        Workflow jira [ 31262 ] MDL Workflow [ 62200 ]
        Martin Dougiamas made changes -
        Workflow MDL Workflow [ 62200 ] MDL Full Workflow [ 91406 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: