The Elearning Community • Too few arguments when downloading files
Page 1 of 1

Too few arguments when downloading files

Posted: Mon Feb 22, 2021 10:10 am
by jamesd
Hi all,

I've had lots of help with v2.3 here and one more thing seems to be broken. We have started looking at adding documents to courses and have hit a similar error to one we've seen elsewhere. Unfortunately I'm unsure how to resolve:
Fatal error: Uncaught ArgumentCountError: Too few arguments to function Track_Item::__construct(), 1 passed in /home/digitald/public_html/learn/appLms/modules/item/do.item.php on line 59 and exactly 2 expected in /home/digitald/public_html/learn/appLms/class.module/track.item.php:18 Stack trace: #0 /home/digitald/public_html/learn/appLms/modules/item/do.item.php(59): Track_Item->__construct(false) #1 /home/digitald/public_html/learn/appLms/class.module/learning.item.php(174): play('1', '192', 'index.php?modna...') #2 /home/digitald/public_html/learn/appLms/class.module/class.organization.php(279): Learning_Item->play('1', '192', 'index.php?modna...') #3 /home/digitald/public_html/learn/appLms/index.php(84): Module_Organization->loadBody() #4 {main} thrown in /home/digitald/public_html/learn/appLms/class.module/track.item.php on line 18

Re: Too few arguments when downloading files

Posted: Mon Feb 22, 2021 10:42 am
by alfa24

Re: Too few arguments when downloading files

Posted: Mon Feb 22, 2021 11:39 am
by jamesd
My apologies and thank you alfa24. I didn't see these ones and didn't think to look in the Italian section.

I'll have a look now –I don't have any Italian but I'll hopefully the snippets will help.

Thanks again

Re: Too few arguments when downloading files

Posted: Mon Feb 22, 2021 11:44 am
by jamesd
Got it thank you. The second topic "$ti = new Track_Item( $idTrack, getLogUserId() );" was the one that fixed it for me.