Skip to content

Commit

Permalink
adjust instance appending to only occur on repeating events
Browse files Browse the repository at this point in the history
  • Loading branch information
ChemiKyle committed Mar 20, 2020
1 parent 0c4d029 commit 8d70b5d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ExternalModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -417,10 +417,9 @@ protected function loadFRSL($location, $record = null, $event_id = null, $instru
// Path to the next available form in the current event.
$next_step_path = APP_PATH_WEBROOT . 'DataEntry/index.php?pid=' . $Proj->project_id . '&id=' . $record . '&event_id=' . $event_id . '&page=' . $next_instrument;

// If a repeating instrument immediately follows another repeating instrument, maintain the instance
// If this is a repeating event, maintain the instance
if ($Proj->hasRepeatingFormsEvents() && $instance) {
$this_event_repeating_forms = $Proj->getRepeatingFormsEvents()[$event_id];
if ( array_key_exists($instrument, $this_event_repeating_forms) && array_key_exists($next_instrument, $this_event_repeating_forms) ) {
if ($Proj->RepeatingFormsEvents[$event_id] == "WHOLE") {
$next_step_path .= '&instance=' . $instance;
}
}
Expand Down

0 comments on commit 8d70b5d

Please sign in to comment.