Search code examples
moodle

How can I edit functionality in Moodle in the 'Restrict Access' section for an assignment?


Here is the section moodle I'm talking about

I want to change the text field under the "choose.." to a drop down. I'm under the impression that I need to make this change in the Availability folder in moodle?


Solution

  • To find the string

    First go to Site admin > Development > Debugging

    And switch on "Show origin of languages strings" (debugstringids)

    And save changes

    Then go to the assignment and add ?strings=1 or &strings=1 to the url

    This will display the string id and component of every string

    eg:

    Screenshot of the restrict access popup in Moodle with the string ids displayed

    So the string id is choosedots and the component is moodle

    To change the text of the string, it is advisable to do this through language customisation rather than development.

    Go to Site admin > Language > Language customisation > [Choose language] > Open language for customisation

    Then search for Component = Moodle.php and String identifier = choosedots

    You can then change the text - this is a core Moodle string though, so beware that this will change the string everywhere not just in the assignment activity

    Screenshot of the language customisation screen in Moodle