Skip to content

Commit

Permalink
implement psalm fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
ihabzee committed Apr 14, 2023
1 parent 4f6c40e commit 515c588
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 17 deletions.
9 changes: 5 additions & 4 deletions OnCoreIntegration.php
Original file line number Diff line number Diff line change
Expand Up @@ -630,16 +630,17 @@ public function injectIntegrationUI($project_irb)
"matching_library" => $matching_library
);

$aa = ($this->escape(json_encode($notifs_config)));
//Initialize JSMO
$this->initializeJavascriptModuleObject();
?>
<script src="<?= $oncore_js ?>" type="text/javascript"></script>
<script src="<?= $notif_js ?>" type="text/javascript"></script>
<script src="<?= $integration_jsmo?>" type="text/javascript"></script>
<script src="<?= $integration_jsmo ?>" type="text/javascript"></script>
<script>
$(function() {
const module = <?=$this->getJavascriptModuleObjectName()?>;
module.config = <?=json_encode($notifs_config)?>;
$(function () {
const module = <?=$this->getJavascriptModuleObjectName()?>;
module.config = decode_object("<?=$this->escape(json_encode($notifs_config))?>");
module.afterRender(<?=$this->getJavascriptModuleObjectName()?>.InitFunction);
})
</script>
Expand Down
7 changes: 1 addition & 6 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,6 @@
"approveIntegrateOncore",
"triggerIRBSweep"
],
"no-auth-ajax-actions": [
"integrateOnCore",
"approveIntegrateOncore",
"triggerIRBSweep"
],
"project-settings": [
{
"key": "redcap-oncore-fields-mapping",
Expand Down Expand Up @@ -340,7 +335,7 @@
"compatibility": {
"php-version-min": "8.0.0",
"php-version-max": "8.99.99",
"redcap-version-min": "12.0.0",
"redcap-version-min": "13.1.2",
"redcap-version-max": ""
}
}
14 changes: 7 additions & 7 deletions pages/summary_page.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@
<h5 class="mb-0">
<button class="btn btn-link" data-toggle="collapse" data-target="#collapseOne" aria-expanded="true"
aria-controls="collapseOne">
Total number of linked Protocols: <?php echo $protocols['total'] ?>
Total number of linked Protocols: <?php echo $module->escape($protocols['total']) ?>
</button>
</h5>
</div>

<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
<div class="card-body">
<p>Number of Approved Protocols:
<strong><?php echo $protocols[OnCoreIntegration::ONCORE_PROTOCOL_STATUS_YES] ?></strong></p>
<strong><?php echo $module->escape($protocols[OnCoreIntegration::ONCORE_PROTOCOL_STATUS_YES]) ?></strong></p>
<p>Number of Pending Protocols:
<strong><?php echo $protocols[OnCoreIntegration::ONCORE_PROTOCOL_STATUS_NO] ?></strong></p>
<strong><?php echo $module->escape($protocols[OnCoreIntegration::ONCORE_PROTOCOL_STATUS_NO]) ?></strong></p>
<p><a href="<?php echo $module->getUrl('pages/protocols_viewer.php') ?>">View All Protocols</a></p>
</div>
</div>
Expand All @@ -45,11 +45,11 @@
<div id="collapseTwo" class="collapse" aria-labelledby="headingTwo" data-parent="#accordion">
<div class="card-body">
<p>Number of Records Pushed that existed in OnCore:
<strong><?php echo $logs[Entities::PUSH_TO_ONCORE_FROM_ONCORE] ?: 0 ?></strong></p>
<strong><?php echo $module->escape($logs[Entities::PUSH_TO_ONCORE_FROM_ONCORE]) ?: 0 ?></strong></p>
<p>Number of Records Pushed that existed in OnStage:
<strong><?php echo $logs[Entities::PUSH_TO_ONCORE_FROM_ON_STAGE] ?: 0 ?></strong></p>
<strong><?php echo $module->escape($logs[Entities::PUSH_TO_ONCORE_FROM_ON_STAGE]) ?: 0 ?></strong></p>
<p>Number of Records Pushed Directly from REDCap:
<strong><?php echo $logs[Entities::PUSH_TO_ONCORE_FROM_REDCAP] ?: 0 ?></strong></p>
<strong><?php echo $module->escape($logs[Entities::PUSH_TO_ONCORE_FROM_REDCAP]) ?: 0 ?></strong></p>
<p><a href="<?php echo $module->getUrl('pages/linkage_viewer.php') ?>">View Linked Records </a></p>

</div>
Expand All @@ -59,7 +59,7 @@
<h5 class="mb-0">
<button class="btn btn-link collapsed" data-toggle="collapse" data-target="#collapseThree"
aria-expanded="false" aria-controls="collapseThree">
Total number of Records Pulled from OnCore: <?php echo $logs[Entities::PULL_FROM_ONCORE] ?>
Total number of Records Pulled from OnCore: <?php echo $module->escape($logs[Entities::PULL_FROM_ONCORE]) ?>
</button>
</h5>
</div>
Expand Down

0 comments on commit 515c588

Please sign in to comment.