Given that __construct() seems to run on every page with no regard for the module's activation status at the project level, this modules construct block should probably be moved to a redcap_module_project_enable hook.
A bit more digging shows that unaffected versions of redcap keep PROJECT_ID as 0 if the module is inactive.
Outside the scope of this specific PR, now that the EM repo is private (RIP) I had to hunt for complete hook documentation (the Documentation link in the ControlCenter is quite lacking); best bet is to go to redcap_vx.y.z/ExternalModules/docs/official-documentation.md in your filesystem.
Closes #5
Given that
__construct()
seems to run on every page with no regard for the module's activation status at the project level, this modules construct block should probably be moved to aredcap_module_project_enable
hook.A bit more digging shows that unaffected versions of redcap keep
PROJECT_ID
as 0 if the module is inactive.Outside the scope of this specific PR, now that the EM repo is private (RIP) I had to hunt for complete hook documentation (the Documentation link in the ControlCenter is quite lacking); best bet is to go to
redcap_vx.y.z/ExternalModules/docs/official-documentation.md
in your filesystem.