Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewPoppe committed Sep 27, 2023
1 parent 0b36f54 commit f413c1f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/enroll.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
echo "<script defer>Swal.fire({'title':'This participant is not currently active in REDCapPRO', 'html':'Contact your REDCap Administrator with questions.', 'icon':'info', 'showConfirmButton': false});</script>";
} else {

$redcap_dag = $module->DAG->getCurrentDag($module->framework->getUser()->getUsername(), $this->framework->getProjectId());
$redcap_dag = $module->DAG->getCurrentDag($module->framework->getUser()->getUsername(), $module->framework->getProjectId());
$pid = intval($project_id);
$rcpro_username = $module->PARTICIPANT->getUserName($rcpro_participant_id);
$result = $module->PROJECT->enrollParticipant($rcpro_participant_id, $pid, $redcap_dag, $rcpro_username);
Expand Down Expand Up @@ -195,7 +195,7 @@ function searchEmail() {
</div>

<?php if ( $module->DAG->getProjectDags() ) {
$userDag = $module->DAG->getCurrentDag($this->framework->getUser()->getUsername(), $this->framework->getProjectId());
$userDag = $module->DAG->getCurrentDag($module->framework->getUser()->getUsername(), $module->framework->getProjectId());
$dagName = isset($userDag) ? \REDCap::getGroupNames(false, $userDag) : "No Assignment";
?>
<div class="mb-3 row">
Expand Down
2 changes: 1 addition & 1 deletion src/manage.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ function coalesce_string()
if ( !$error && $projectHasDags ) {
$rcpro_link_id = $module->PROJECT->getLinkId($rcpro_participant_id, $rcpro_project_id);
$participant_dag = intval($module->DAG->getParticipantDag($rcpro_link_id));
$user_dag = $module->DAG->getCurrentDag($module->framework->getUser()->getUsername(), $this->framework->getProjectId());
$user_dag = $module->DAG->getCurrentDag($module->framework->getUser()->getUsername(), $module->framework->getProjectId());
if ( isset($user_dag) && $participant_dag !== $user_dag ) {
$function = $generic_function;
$icon = "error";
Expand Down

0 comments on commit f413c1f

Please sign in to comment.