Skip to content

REDCap UI bug fixes from testing#1

Merged
regisoc merged 1 commit into
regisoc:20250710_redcap_uifrom
MaximeBICMTL:regis_redcap_ui_pr_fix
Apr 3, 2026
Merged

REDCap UI bug fixes from testing#1
regisoc merged 1 commit into
regisoc:20250710_redcap_uifrom
MaximeBICMTL:regis_redcap_ui_pr_fix

Conversation

@MaximeBICMTL
Copy link
Copy Markdown

@MaximeBICMTL MaximeBICMTL commented Jan 18, 2026

List of fixes:

  • Fix a typo in an SQL patch statement.
  • Fix a type error in the import script where the instrument name was sent instead of the instrument object.
  • Update import Queries to RedcapQueries.
  • Update queries column FormName to InstrumentName to match the SQL schema.
  • Convert booleans to integers before sending it to the database (because the LORIS PHP database abstraction sucks and cannot directly insert booleans).
  • Add trailing newlines to some files that were missing them (note that this helps to generate better SQL patches when combining all the patches of a LORIS version).
  • Add a .gitignore file so that the compiled Javascript files do not pollute the git tree.

@MaximeBICMTL MaximeBICMTL force-pushed the regis_redcap_ui_pr_fix branch from 68d6d9c to fce2cc3 Compare January 18, 2026 16:33
regisoc pushed a commit that referenced this pull request Mar 16, 2026
PHP Fatal error: Uncaught TypeError: Project::getProjectFromID():
Argument #1 ($projectID) must be of type ProjectID, int given, called
regisoc pushed a commit that referenced this pull request Mar 16, 2026
This fixes the following errors when running the tool
`fix_timepoint_date_problems.php`
```
PHP Fatal error:  Uncaught TypeError: preg_match(): Argument aces#2 ($subject) must be of type string, LORIS\StudyEntities\Candidate\CandID given in /var/www/Loris/tools/fix_timepoint_date_problems.php:157
Stack trace:
#0 /var/www/Loris/tools/fix_timepoint_date_problems.php(157): preg_match()
#1 {main}
  thrown in /var/www/Loris/tools/fix_timepoint_date_problems.php on line 157
```

```
PHP Fatal error:  Uncaught TypeError: checkdate(): Argument #1 ($month) must be of type int, string given in /var/www/Loris/tools/fix_timepoint_date_problems.php:519
Stack trace:
#0 /var/www/Loris/tools/fix_timepoint_date_problems.php(519): checkdate()
#1 /var/www/Loris/tools/fix_timepoint_date_problems.php(244): fixDate()
aces#2 {main}
  thrown in /var/www/Loris/tools/fix_timepoint_date_problems.php on line 519
```

```
PHP Warning:  Undefined variable $db in /var/www/Loris/php/libraries/NDB_BVL_Feedback.class.inc on line 717
PHP Fatal error:  Uncaught Error: Call to a member function pselectOne() on null in /var/www/Loris/php/libraries/NDB_BVL_Feedback.class.inc:717
Stack trace:
#0 /var/www/Loris/tools/fix_timepoint_date_problems.php(553): NDB_BVL_Feedback->createThread()
#1 /var/www/Loris/tools/fix_timepoint_date_problems.php(244): fixDate()
aces#2 {main}
  thrown in /var/www/Loris/php/libraries/NDB_BVL_Feedback.class.inc on line 717
```
regisoc pushed a commit that referenced this pull request Mar 16, 2026
The REDcap "radio option" sometimes includes no index and, in this
case, a decimal (float) causing redcap2linst show the following error:

PHP Fatal error: Uncaught DomainException: Could not parse radio option:
'0.01 ' in
/var/www/loris/project/modules/redcap/php/client/models/redcapdictionaryrecord.class.inc:316
Stack trace: #0
/var/www/loris/project/modules/redcap/php/client/models/redcapdictionaryrecord.class.inc(268):
LORIS\redcap\client\models\RedcapDictionaryRecord->_optionsToLINST() #1
/var/www/loris/project/tools/redcap2linst.php(74):
LORIS\redcap\client\models\RedcapDictionaryRecord->toLINST() aces#2 {main}
thrown in
/var/www/loris/project/modules/redcap/php/client/models/redcapdictionaryrecord.class.inc
on line 316

the fetch was 0.01 | 0.05 | 0.10 | 0.15 without indices, But this code
fixes it
@regisoc regisoc merged commit d9414ce into regisoc:20250710_redcap_ui Apr 3, 2026
17 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants