Pages

Friday, June 23, 2023

How to Locate and Edit Moodle Files Using Terminal How to find string in Moodle EJSS analytics and edit it


Search term

to edit Teacher's Dashboard string
lti_report.mustache 
output
/public_html/moodle402/mod/laejss/templates/lti_report.mustache

to edit deployment ID string
content_show.mustache
output
/public_html/moodle402/enrol/lti/templates/local/ltiadvantage/content_show.mustache


Introduction: 

Moodle is a popular open-source learning management system used by educational institutions worldwide. It offers a range of features and customization options to create engaging online courses. One important aspect of Moodle customization is editing files to suit specific requirements. In this blog post, we will guide you through the process of locating and editing Moodle files using the terminal.

Step 1: Download Moodle Backup Before we begin, ensure that you have a copy of the Moodle backup file on your computer, preferably on your desktop. This backup will serve as a reference point and allow you to make changes without affecting the live Moodle installation.

Step 2: Launch the Terminal On your computer, open the terminal or command line interface. The terminal provides a text-based interface to interact with your operating system and execute commands.

Step 3: Locate the Desired File In the terminal, enter the following command to search for a specific phrase or word within your Moodle backup directory:
bash
grep -Rnw /Users/lookang/Desktop/moodle30.542_61559.2023-06-16_10-07-10/ -e 'EjsS Simulation Monitor Assignment'
This command searches for the phrase 'EjsS Simulation Monitor Assignment' within the specified directory. The terminal output will display the file(s) where the phrase is found, along with the corresponding line number.

Step 4: Identify the File Location Review the terminal output to identify the file that contains the desired phrase. For example, let's assume the output indicates the presence of the phrase in the following file:
bash
/Users/lookang/Desktop/moodle30.542_61559.2023-06-16_10-07-10//mod/laejss/templates/lti_report.mustache:113:

This output indicates that the file 'lti_report.mustache' within the 'mod/laejss/templates' directory contains the phrase we are searching for.

Step 5: Access and Edit the File To make changes to the identified file, you will need to log in to your cPanel or use a file manager provided by your hosting service. Access your file manager and navigate to the location indicated in the terminal output, in this case:
bash
mod/laejss/templates/lti_report.mustache

Locate the file and proceed to edit it according to your specific requirements. Be cautious while editing files and ensure you have a backup copy in case you need to revert any changes.

use file manager and navigate there and locate and edit to you own specification.


 

test it on https://vle.dev.sls.ufinity.com/assignment/view/c5800832-6a32-47e0-a94b-8861b3715031/page/890848992




Conclusion: 

Locating and editing Moodle files using the terminal can be a powerful method for customizing your e-learning platform. By following the steps outlined in this blog post, you can efficiently search for specific phrases within your Moodle backup and make necessary modifications to enhance your Moodle experience. Remember to exercise caution while editing files and always keep backups to avoid any unintended consequences.






 https://www.youtube.com/watch?v=ac2F-B4Uw_4

download a copy of the Moodle backup to your computer say desktop

launch terminal

type grep -Rnw /Users/lookang/Desktop/moodle30.542_61559.2023-06-16_10-07-10/ -e 'EjsS Simulation Monitor Assignment'

lookang@Opens-MacBook-Pro moodle30.542_61559.2023-06-16_10-07-10 %  grep -Rnw /Users/lookang/Desktop/moodle30.542_61559.2023-06-16_10-07-10/ -e 'EjsS Simulation Monitor Assignment'

/Users/lookang/Desktop/moodle30.542_61559.2023-06-16_10-07-10//softdatadir/localcache/mustache/1663401169/boost/__Mustache_be23f4d7e6bc1045b626b2f46112666e.php:182:        $buffer .= $indent . '     <span>EjsS Simulation Monitor Assignment</span>

/Users/lookang/Desktop/moodle30.542_61559.2023-06-16_10-07-10//softdatadir/localcache/mustache/1663062853/boost/__Mustache_7a40f4a9d299706a2774fd5e1d089dcd.php:182:        $buffer .= $indent . '     <span>EjsS Simulation Monitor Assignment</span>

/Users/lookang/Desktop/moodle30.542_61559.2023-06-16_10-07-10//mod/laejss/templates/lti_report.mustache:113:     <span>EjsS Simulation Monitor Assignment</span>

lookang@Opens-MacBook-Pro moodle30.542_61559.2023-06-16_10-07-10 % 


the output suggests the word "EjsS Simulation Monitor Assignment" is in the file located here /Users/lookang/Desktop/moodle30.542_61559.2023-06-16_10-07-10//mod/laejss/templates/lti_report.mustache:113:

login to your cpanel

use file manager and navigate there and locate and edit to you own specification.


 

test it on https://vle.dev.sls.ufinity.com/assignment/view/c5800832-6a32-47e0-a94b-8861b3715031/page/890848992





No comments:

Post a Comment