Call to $this in static method

damien.raemy
Forums
Hello, I found a programming error in opigno-lms/web/modules/contrib/opigno_module/src/Controller/ExternalPackageController.php. At the line 207, $this->t(...) is called in method createActivityByPackageType. But at line 83, we can see ExternalPackageController::createActivityByPackageType. This results of an error "Using $this when not in object context"
Profile picture for user James Aparicio
James Aparicio

Hi damien.raemy,

Hi damien.raemy,

 

Tkx for contibuting.

We will take a look at this.

 

Best regards

damien.raemy

Call to undefined method t()

Hi James Aparicio, Thanks for your feedback. I found other errors that are more or less related to this topic (because it also concerns the call to t() method). The TincanContentAnswerAssistant call t() method, but does not implement it. Here is an example of error message: MESSAGE Error: Call to undefined method Drupal\opigno_tincan_activity\TincanContentAnswerAssistant::t() in Drupal\opigno_tincan_activity\TincanContentAnswerAssistant->getScoreFromLrs() (line 154 of /var/www/html/opigno-lms/web/modules/contrib/opigno_module/ActivityTypes/opigno_tincan_activity/src/TincanContentAnswerAssistant.php) #0
Profile picture for user James Aparicio
James Aparicio

Hi damien.raemy,

Hi damien.raemy,

Tkx, we already fixed that internally. 

The changes will be part of the next release .

 

Best regards