Skip to content

Code Customization

christinerogers edited this page Jul 28, 2016 · 16 revisions

Modifying and overriding code under the project/ directory

The project/ directory is designed to house project-specific code and some data such as documents. This includes instruments forms (.linst or php), instrument table schemas, and any customizations to other pages or modules in the Loris codebase.

Code stored under project/modules/ and project/libraries/ and project/templates/ will override the file of the same name found in the same path under Loris root

  • /var/www/loris/project/libraries/filename.class.inc will override /var/www/loris/libraries/filename.class.inc)

Module override

For projects wishing to customize modules, the recommended best practice is to copy the module code under project/modules/ and modify code there, utilizing the project/ override functionality, and committing these customizations to a private project/ repo.

It is highly recommended to keep a Readme file under the project/ directory tracking all your project's customizations. This practices will help developers and also be useful at Release upgrade time, when merging any module updates in the codebase with your custom code.

Clone this wiki locally