Moodle

cmi.comments_from_learner not read - write

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.8.2, 1.8.3
  • Fix Version/s: 1.8.7, 1.9.3, 2.0
  • Component/s: SCORM
  • Labels:
    None
  • Database:
    MySQL
  • Affected Branches:
    MOODLE_18_STABLE
  • Fixed Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE, MOODLE_20_STABLE

Description

when creating a scorm 2004 course, i can set and read cmi.comments_from_learner like i'm supposed to do it. but when i leave the course, and enter again, cmi.comments_from_learner._count returns zero, and i can't read my previous comments. the disturbing thing is, they are recorded in the database (scorm_scoes_track) , i can see the comment, userid, lessonid and scoid are correct, but somehow it gets lost and doesn't make it to the interface

help!

Activity

Hide
Dan Marsden added a comment -

Hi there,

could you please attach a scorm object that allows us to reproduce this?

thanks,

Dan

Show
Dan Marsden added a comment - Hi there, could you please attach a scorm object that allows us to reproduce this? thanks, Dan
Hide
Jamison Johnson added a comment -

I have experienced the same issue...

writing a flex player packaged as SCORM 2004. The comments are written and visible through the SCO tracker and are accessible while in the SCO instance/attempt the comments were created in. However, upon exiting and re-entering the same SCO, _count returns 0 not allowing for basic error checking (bounds) when trying to access the comments.

Show
Jamison Johnson added a comment - I have experienced the same issue... writing a flex player packaged as SCORM 2004. The comments are written and visible through the SCO tracker and are accessible while in the SCO instance/attempt the comments were created in. However, upon exiting and re-entering the same SCO, _count returns 0 not allowing for basic error checking (bounds) when trying to access the comments.
Hide
Dan Marsden added a comment -

Hi There, a lot of fixes have gone into scorm in the latest versions of 1.8Stable and 1.9Stable - if you are using an older version of Moodle, please upgrade, and try again.

then - turn debug developer on, and a pop-up window with logging will appear.

navigate through your object untill it reproduces your issue, then attach the output of the logging window here.

If you can also provide a scorm object that allows us to reproduce the issue that would help.

thanks.

Dan

Show
Dan Marsden added a comment - Hi There, a lot of fixes have gone into scorm in the latest versions of 1.8Stable and 1.9Stable - if you are using an older version of Moodle, please upgrade, and try again. then - turn debug developer on, and a pop-up window with logging will appear. navigate through your object untill it reproduces your issue, then attach the output of the logging window here. If you can also provide a scorm object that allows us to reproduce the issue that would help. thanks. Dan
Hide
Jamison Johnson added a comment -

Howdy Dan,

Thanks for the quick reply. I have given the directions to our Moodle guy (I'm the Flex/AS3 guy) and will post the output as soon as I get it from him.

I have a quick test object that I created specifically to illustrate the problem; however, I do not have attach rights to this issue. If you will grant it to me, I will post the scorm .zip.

Thanks.

JJ

Show
Jamison Johnson added a comment - Howdy Dan, Thanks for the quick reply. I have given the directions to our Moodle guy (I'm the Flex/AS3 guy) and will post the output as soon as I get it from him. I have a quick test object that I created specifically to illustrate the problem; however, I do not have attach rights to this issue. If you will grant it to me, I will post the scorm .zip. Thanks. JJ
Hide
Dan Marsden added a comment -

might be quicker to get the file e-mailed through! - I thought everyone could attach files! - but maybe it's only the person who created the bug.... - my e-mail is dan.marsden@gmail.com

thanks

Show
Dan Marsden added a comment - might be quicker to get the file e-mailed through! - I thought everyone could attach files! - but maybe it's only the person who created the bug.... - my e-mail is dan.marsden@gmail.com thanks
Hide
Piers Harding added a comment -

Hi Jamison -
I've attempted to test the SCORM package Moodle-Scorm-Tester.zip using IE7 and I get a JavaScript error at line 808 of the SCORM_API_wrapper.js. - Error 'console' is undefined.

Also - using the Moodle SCORM API debugging/tracing tools, I cannot see any communication between the SCORM package and the API, when I have been using the "add new comment" button and/or navigating away from the SCO via the Exit Activity link

Can you ensure that your example behaves correctly (the new SCORM debugging tools help with this . http://moodle.org/mod/forum/discuss.php?d=103921).

Thanks,
Piers Harding.

Show
Piers Harding added a comment - Hi Jamison - I've attempted to test the SCORM package Moodle-Scorm-Tester.zip using IE7 and I get a JavaScript error at line 808 of the SCORM_API_wrapper.js. - Error 'console' is undefined. Also - using the Moodle SCORM API debugging/tracing tools, I cannot see any communication between the SCORM package and the API, when I have been using the "add new comment" button and/or navigating away from the SCO via the Exit Activity link Can you ensure that your example behaves correctly (the new SCORM debugging tools help with this . http://moodle.org/mod/forum/discuss.php?d=103921). Thanks, Piers Harding.
Hide
Piers Harding added a comment -

Hi Jamison - Further to my earlier comments, why would you be wanting to read back comments between SCO instances? These comments are for use at the discretion of the LMS according to the SCORM 2004 specification? I have tracked down that these values are not reconstituted by mod/scorm between instances of a SCO running (although they are kept track of during each run of a SCO).
Cheers,
Piers Harding.

Show
Piers Harding added a comment - Hi Jamison - Further to my earlier comments, why would you be wanting to read back comments between SCO instances? These comments are for use at the discretion of the LMS according to the SCORM 2004 specification? I have tracked down that these values are not reconstituted by mod/scorm between instances of a SCO running (although they are kept track of during each run of a SCO). Cheers, Piers Harding.
Hide
Jamison Johnson added a comment -

Hi Piers,

The javascript errors are originating from the portion of the wrapper that deals with debugging. It is specifically designed to use Firebug (for Firefox) to output information about the running script. It is an open source file and I just haven't made the time to insert code to determine if it is running with firebug. I have not seen the Moodle SCORM API tracing tool; I will look at it as soon as I have a chance. I am new to SCORM and am basing the success of the communication based upon the fact that we can pull user_id, username, and successfully insert comments_from_learner and view them in the SCORM detail tracker.

The project that spawned this discussion is a Flex/XML configured presentation player that is based upon a series of views. Each view contains a visual presentation (slide), narration audio, narration text, notes, and additional media links. The user has the option to make notes on each view. When the player was standalone, we simply used a shared object to persist the notes to local storage; however, we are attempting to make the player completely SCORM compliant. We were using the comments_from_learner to store these user generated notes for persistence.

This was the best option that I could find given the SCORM 2004 definition. Is there something better to use? Are the comments_from_learner supposed to be persistent between instances by SCORM definition or are they simply on a single instance basis? Aka, is this a Moodle bug or am I simply trying to use it the wrong way...

Thanks.

JJ

Show
Jamison Johnson added a comment - Hi Piers, The javascript errors are originating from the portion of the wrapper that deals with debugging. It is specifically designed to use Firebug (for Firefox) to output information about the running script. It is an open source file and I just haven't made the time to insert code to determine if it is running with firebug. I have not seen the Moodle SCORM API tracing tool; I will look at it as soon as I have a chance. I am new to SCORM and am basing the success of the communication based upon the fact that we can pull user_id, username, and successfully insert comments_from_learner and view them in the SCORM detail tracker. The project that spawned this discussion is a Flex/XML configured presentation player that is based upon a series of views. Each view contains a visual presentation (slide), narration audio, narration text, notes, and additional media links. The user has the option to make notes on each view. When the player was standalone, we simply used a shared object to persist the notes to local storage; however, we are attempting to make the player completely SCORM compliant. We were using the comments_from_learner to store these user generated notes for persistence. This was the best option that I could find given the SCORM 2004 definition. Is there something better to use? Are the comments_from_learner supposed to be persistent between instances by SCORM definition or are they simply on a single instance basis? Aka, is this a Moodle bug or am I simply trying to use it the wrong way... Thanks. JJ
Hide
asdf added a comment -

Hello guys, thanks for working on scorm again.
i've changed my job, so i don't have any packages available, nor do i have to work with scorm any more.

@piers: it's a requirement for scorm platform compliance
it's all there in scorm runtine_env.pdf

REQ_57.3.1 The LMS shall implement the cmi.comments_from_learner.n.comment data
model as read/write.

cmi.comments_from_learner._count The cmi.comments_from_learner._count keyword describes the
current number of learner comments that are being stored by the
LMS for the SCO. The total number of entries currently being
managed by the LMS shall be returned

cmi.comments_from_learner.n.comment
GetValue(): The LMS shall return the value stored for
the cmi.comments_from_learner.n.comment data model
element and set the error code to 0 - No Error.

the description is pretty straightforward: set cmi.comments_from_learner.0 ( .id and .comment), and it's all ok, everything works, including _count. but when you return to your sco, you lose it all, as if it were session only.

Show
asdf added a comment - Hello guys, thanks for working on scorm again. i've changed my job, so i don't have any packages available, nor do i have to work with scorm any more. @piers: it's a requirement for scorm platform compliance it's all there in scorm runtine_env.pdf REQ_57.3.1 The LMS shall implement the cmi.comments_from_learner.n.comment data model as read/write. cmi.comments_from_learner._count The cmi.comments_from_learner._count keyword describes the current number of learner comments that are being stored by the LMS for the SCO. The total number of entries currently being managed by the LMS shall be returned cmi.comments_from_learner.n.comment GetValue(): The LMS shall return the value stored for the cmi.comments_from_learner.n.comment data model element and set the error code to 0 - No Error. the description is pretty straightforward: set cmi.comments_from_learner.0 ( .id and .comment), and it's all ok, everything works, including _count. but when you return to your sco, you lose it all, as if it were session only.
Hide
asdf added a comment -

@jamison: i think it'a s moodle bug, happened with other commands before. why else would you need to store and read a variable that would be destroyed after the lesson is completed?

ps: I tried to use it to overcome the 4000 character limit on cmi.suspend_data, when i was trying to save a big xml. i dont' remember why exactly, but cmi.learner_response wasn't working right, so i had to resume to dirty tricks.

i think neither did cmi.objectives at the time
http://tracker.moodle.org/browse/MDL-10744

Show
asdf added a comment - @jamison: i think it'a s moodle bug, happened with other commands before. why else would you need to store and read a variable that would be destroyed after the lesson is completed? ps: I tried to use it to overcome the 4000 character limit on cmi.suspend_data, when i was trying to save a big xml. i dont' remember why exactly, but cmi.learner_response wasn't working right, so i had to resume to dirty tricks. i think neither did cmi.objectives at the time http://tracker.moodle.org/browse/MDL-10744
Hide
Piers Harding added a comment -

@asdf - I disagree. If you look at sections 4.2.2 of the Runtime specification, it says that the how the comments are made available are at the discression of the LMS.
As it stands - in the current mod/scorm implementation, the values are read/write, and are correctly maintained for the life of the SCO instance, so it does not break the specification there.
From looking at the code, it seems that there are a number of elements like cmi.comments_from_learner, and cmi.comments_from_lms (and some others, that I haven't identified yet I suspect),
aren't reconstituted either when the SCO is revisited.

@all - The way you are describing your use of the comments is not really in keeping with their purpose, but as I am not a SCORM content developer, I cannot advise on what the usual way of
dealing with this is, and relying on an ambiguous part of the SCORM specification sounds like a recipe for portability headaches - maybe this is something that someone on the forums can help with?

Back to these comment elements - I will see what can be done with respect to persisting them - we have got mod/scorm to a point where it passes the 1.2 compliance tests, and the next focus is 2004,
but there is a lot of work to be done throughout.

Cheers,
Piers harding.

Show
Piers Harding added a comment - @asdf - I disagree. If you look at sections 4.2.2 of the Runtime specification, it says that the how the comments are made available are at the discression of the LMS. As it stands - in the current mod/scorm implementation, the values are read/write, and are correctly maintained for the life of the SCO instance, so it does not break the specification there. From looking at the code, it seems that there are a number of elements like cmi.comments_from_learner, and cmi.comments_from_lms (and some others, that I haven't identified yet I suspect), aren't reconstituted either when the SCO is revisited. @all - The way you are describing your use of the comments is not really in keeping with their purpose, but as I am not a SCORM content developer, I cannot advise on what the usual way of dealing with this is, and relying on an ambiguous part of the SCORM specification sounds like a recipe for portability headaches - maybe this is something that someone on the forums can help with? Back to these comment elements - I will see what can be done with respect to persisting them - we have got mod/scorm to a point where it passes the 1.2 compliance tests, and the next focus is 2004, but there is a lot of work to be done throughout. Cheers, Piers harding.
Hide
Piers Harding added a comment -

Hi -
I've patched HEAD, 1.9, and 1.8 with what I hope will suffice for managing comments (and objectives) in both SCORM 1.2 and 2004. Please try this out, and let me know what you find.

Cheers,
Piers Harding.

Show
Piers Harding added a comment - Hi - I've patched HEAD, 1.9, and 1.8 with what I hope will suffice for managing comments (and objectives) in both SCORM 1.2 and 2004. Please try this out, and let me know what you find. Cheers, Piers Harding.
Hide
Dan Marsden added a comment -

Piers has commited fixes that should affect this to 1.9Stable, 1.8Stable and HEAD, please download the latest 1.9.2Weekly and test. If this is still an issue, please let us know.

thanks,

Dan

Show
Dan Marsden added a comment - Piers has commited fixes that should affect this to 1.9Stable, 1.8Stable and HEAD, please download the latest 1.9.2Weekly and test. If this is still an issue, please let us know. thanks, Dan
Hide
Jamison Johnson added a comment -

Howdy guys,

Sorry it took me so long to get back on this. Been busy on other projects. I installed the most recent stable weekly build last week (1.9.2+) and have the site up and running. I uploaded the Tester SCORM that I created and am experiencing the same problem. Since it is my own test site, I am going to enable debug/developer mode and play with it some more to see what comes out of it.

I will post when I have done some more exhausting testing/investigation.

Thanks.

JJ

Show
Jamison Johnson added a comment - Howdy guys, Sorry it took me so long to get back on this. Been busy on other projects. I installed the most recent stable weekly build last week (1.9.2+) and have the site up and running. I uploaded the Tester SCORM that I created and am experiencing the same problem. Since it is my own test site, I am going to enable debug/developer mode and play with it some more to see what comes out of it. I will post when I have done some more exhausting testing/investigation. Thanks. JJ

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: