Javascript include runs mad

Javascript include runs mad

Amy Bellinger發表於
Number of replies: 2

This is making me crazy.

http://nsc.learnandteachonline.com/mod/resource/view.php?id=5

The tutorial I'm doing is actually about how to use a Javascript include. So, I need to show it a couple times. I paste it in, in code view, but then, when I have to go back to edit in the web page resource WYSIWYG editor, the include starts spouting the code, duplicating the output of the include, and I have to go back into code and strip it out. I'm almost finished. I know what to do to fix, and I suppose I need to just live with it, but I know me and I'm going in be in there 47 more times fiddling with a word or spacing. Anything I can do? Maybe just stick to code view?

評比平均分數: -
In reply to Amy Bellinger

Re: Javascript include runs mad

Jan Dierckx發表於

If sticking to code view doesn't help, you could try editing the field 'alltext' in the database table 'mdl_resource' itself. There is a tool to directly access the database on the download page. Directly editing a field in the database itself is not something for the faint of heart! But if you're careful in selecting and editing the field, it may be a solution...

Good luck!

In reply to Jan Dierckx

That's a handy thing!

Amy Bellinger發表於
Thanks, Jan. I sometimes peek into a dB in other PHP apps with phpMyAdmin. I've never seen it built into a program like this. Very nice. I can see how this would be handy for a lot of things, like dumping a table for use outside Moodle. Is this also the means by which an external user list is imported, or is that done in a more automated way? What do others do in the database area? I don't suppose you'd typically give an instructor access to it.