Ray Morris的帖子

I didn't know which file to insert the javascript code into. Is this correct?

Don't embed Javascript into themes.  See:

http://docs.moodle.org/dev/JavaScript_guidelines

 

I'm trying to make the activity icons in Moodle 2.4 to wiggle

Oh dear.  What do people think, is that worse than making the text on your geocities page blink?

 

 

 

 

The adlnet page you linked to has some samples.  Using their API javascript,  you could set and get suspend data like this:

doSetValue("cmi.suspend_data", yourdata);
yourdata = doGetValue("cmi.suspend_data");

Before getting and setting values, you have to do some setup work to initilaize the API connection.  See their samples for code you can copy-paste, then hopefully once you have it working you can look at it an understand a little bit about what it's doing.

 

Which version of Moodle are you using?  Most / all such problems should be fixed by Moodle 2.3.2.  As someone else said, if you find some that aren't fixed in the current version, it would be best to create a tracker issue with your proposed fix and let other people look at that specific case.

 If you're fixing an old version, have a look at how it has been fixed in newer versions.  Look at the diff in the tracker issue.

It needs a close look because changing from ntext to nvarchar will make the column comparable against other nvarchar columns, but make it not comparable against the columns it used to be comparable to!  So you could fix one problem, but create three more in the process.   Submitting a tracker issue and letting other people look at it will reduce those problems, and it'll get the fix into the next version so that it continues to work when you upgrade.

 

P.S. sorry it took me so long to reply to this. If you need more help, please ask.

Thanks so much for your response. You don't owe me a reply ever so I certainly can't complain if you don't reply the same day!  It certainly is great to get a reply from the module maintainer, just to be sure I wasn't overlooking existing functionality and rewriting what's already there.  (Or otherwise doing something really dumb, considering the existing codebase.)

It looks like you will need to make some changes to the standard quiz code to make this work

Which implies, to me, trying to do it in a way that is likely to get a commit() into standard Moodle. If anyone has any comment on how this should look in order to be most useful to others, please let me know.  Surely we're not the only ones who would want to know when a student passes or fails a test?  Tim, knowing that you can expect a patch coming your way, is there anything in particular you'd like to see from that patch, other than the standard "don't submit garbage" rules?