How to find hard coded string in plugin.

How to find hard coded string in plugin.

by Azmat Ullah -
Number of replies: 1

I have made different Moodle pluign & I added some hard coded string in some places instead of lang>en string file. Now if I want to identify the hard coded string location in file then how to find it?

Can anyone tell me that  Moodle provide any script or tool to identify hard coded string?

Could AMOS tool solve this probelm?

Average of ratings: -
In reply to Azmat Ullah

Re: How to find hard coded string in plugin.

by David Mudrák -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators
No, this is not a task for AMOS. There are couple of general text processing tools that can help you though. If you know the text you have added, use some tool that can search for a string in the given directory and subdirectories (like popular "grep" command in Linux world.