aces / Loris

LORIS is a web-accessible database solution for longitudinal multi-site studies.
GNU General Public License v3.0
145 stars 173 forks source link

[tools] Implement LorisInstance in tools directory #8058

Open CamilleBeau opened 2 years ago

CamilleBeau commented 2 years ago

Describe the bug Plenty of tools were failing because they had not been updated to pass a LorisInstance as an argument to various functions.

The following tools were failing: delete_ignored_conflicts.php detect_conflicts.php lorisform_parser.php lorisform_parser.php score_instrument.php

To Reproduce Steps to reproduce the behavior (attach screenshots if applicable):

  1. Run the above tools as intended
  2. See error
CamilleBeau commented 2 years ago

For some reason i'm not able to edit the description properly, but fix_candidate_age.php should also be on this list instead of lorisform_parser.php twice.

driusan commented 2 years ago

the critical ones were fixed, but there's still some other ones that need to be fixed according to @CamilleBeau.. @CamilleBeau can you give a list of which are outstanding?

CamilleBeau commented 2 years ago

the critical ones were fixed, but there's still some other ones that need to be fixed according to @CamilleBeau.. @CamilleBeau can you give a list of which are outstanding?

delete_ignored_conflicts.php detect_conflicts.php

CamilleBeau commented 1 month ago

I believe this has been resolved for the 2 scripts above - I will test before EOD

CamilleBeau commented 1 month ago

Nevermind, still an issue for both:

(base) lorisadmin@cbeaudoin-dev:/var/www/loris/tools/data_integrity/data_deletion$ php delete_ignored_conflicts.php confirm PHP Warning: Undefined variable $loris in /var/www/loris/tools/data_integrity/data_deletion/delete_ignored_conflicts.php on line 72 PHP Fatal error: Uncaught TypeError: NDB_BVL_Instrument::getDDEInstrumentNamesList(): Argument #1 ($loris) must be of type LORIS\LorisInstance, null given, called in /var/www/loris/tools/data_integrity/data_deletion/delete_ignored_conflicts.php on line 72 and defined in /var/www/loris/php/libraries/NDB_BVL_Instrument.class.inc:3253 Stack trace:

0 /var/www/loris/tools/data_integrity/data_deletion/delete_ignored_conflicts.php(72): NDB_BVL_Instrument::getDDEInstrumentNamesList()

1 {main}

thrown in /var/www/loris/php/libraries/NDB_BVL_Instrument.class.inc on line 3253

(base) lorisadmin@cbeaudoin-dev:/var/www/loris/tools$ php detect_conflicts.php -r all -y Array ( [r] => all [y] => ) Removing ignored conflicts

PHP Fatal error: Uncaught TypeError: NDB_BVL_Instrument::factory(): Argument #1 ($loris) must be of type LORIS\LORISInstance, string given, called in /var/www/loris/tools/detect_conflicts.php on line 593 and defined in /var/www/loris/php/libraries/NDB_BVL_Instrument.class.inc:225 Stack trace:

0 /var/www/loris/tools/detect_conflicts.php(593): NDB_BVL_Instrument::factory()

1 /var/www/loris/tools/detect_conflicts.php(145): detectIgnoreColumns()

2 {main}

thrown in /var/www/loris/php/libraries/NDB_BVL_Instrument.class.inc on line 225