Forum .LRN Q&A: Re: SCORM dev update

21: Re: SCORM dev update (response to 20)
Posted by Jose Agustin Lopez Bueno on
Hello, Ernie!

First of all, thanks for your time!

Testing your Random package, it works well
but when I try to view the files (extracted of
your example of course) I get the next error.

Any pointer?

Best regards,

Database operation "0or1row" failed (exception NSDB, "Query was not a statement returning rows.")

ERROR:  -20000: Invalid item ID: <NULL>
CONTEXT:  PL/pgSQL function "content_template__get_path" line 7 at return


          content_item__get_live_revision(content_item__get_template('3282525', 'public')) as template_id,
          content_template__get_path(content_item__get_template('3282525', 'public'),'-200') as template_url

    while executing
"ns_pg_bind 0or1row nsdb0 {

          content_item__get_live_revision(content_item__get_template(:item_id, :context)) as template_id,

22: Re: SCORM dev update (response to 21)
Posted by Ernie Ghiglione on

The reason that's happening is because the uploaded files aren't file-storage objects but learning objects (acs_object subtypes). I was using file-storage UI  to browsing the content repository items I just added.

In a more design note, learning objects are stored in the file-system instead of the database. Since learning objects could easily be a 80MB video file, if it is stored on the database and many students on a class want to access it simultaneously, pulling such file out of the DB would be rather intense and hit performance pretty hard. Therefore, LORS doesn't provide the option to store them in the DB.

What you can do is to change the code so instead of adding the files as learning object type, to be file-storage types. Have a look at lors::cr::add_folder and lors::cr::add_files (modify/change lors__new_lo / lors__new_lo_version for the file-storage equivalent).

Maybe it would be a good idea to have the option to create folders and files within the file-storage or any other object subtypes... Hmmm...