Moodle | New lang strings not accessible

| By Webner

In Moodle we had declared some new strings in lang file of a plugin like this: $string[‘LIBRARY_NAME’] = ‘E-Lab’; $string[‘BOOK_READ_SUCCESS’]=’Congratulations on reading the book’; We wanted to use it in view.php file of the plugin like this: $result=Get_String(‘BOOK_READ_SUCCESS’, ‘plugin name’);

PHP | How to merge multiple PDFs into single file using pdftk

| By Webner

Using PDFtk we can merge multiple files into a single file using a command like this: Example : pdftk file1 file2 output file3. Sample code to accomplish the same using PHP is given below: $arrayOfPDFFiles; $outputPDFName = “mergeResult.pdf”; $dir =”Files/GeneratedPDFs/”;

Moodle/Totara | Upgrade Moodle database after making changes to a plugin

| By Webner

In one of our Moodle projects, we modified a plugin’s code to add extra functionality to plugin. The modification in plugin’s code was not reflected and Moodle showed the older version of plugin. To solve this problem, we upgraded the

Eclipse | Undo deleted file in Eclipse

| By Webner

Problem: Undo deleted file in Eclipse Solution: We were working on a project in Eclipse. Accidentally one of the PHP files got deleted in which code was written. Eclipse does not use the Linux ‘Trash’ but keeps local history from where we

Ubuntu 14.04 | Installing postgresql 9.4

| By Webner

Follow steps below to install Postgresql 9.4 (instead of 9.3 for which sources are added by default in Ubuntu 14.04): 1.  Remove the previous PostgreSQL Version: *Make sure that you firstly backup your databases. $ sudo apt-get –purge remove postgresql-* 2.  Add