adding code to html in moodle

adding code to html in moodle

by Doug Smith -
Number of replies: 2

Hi,

I'm trying to figure out how to add code to html inside Moodle, such that the actual code is displayed instead of code output. For example, this can be seen on Moodle.org's page on the TeX filter: http://docs.moodle.org/en/Using_TeX_Notation

I thought maybe the <pre> tag might work but I'm not having any luck with it. I've also tried to look into "trusted user" (which results in very few search results btw). I'm the admin of my own test site running Moodle 2.0. I've enabled allow trusted content and my role shows that "Trust submitted content"  I'm not sure if there are any other settings for "trusted user" in moodle 2.0.

thanks

Average of ratings: -
In reply to Doug Smith

Re: adding code to html in moodle

by Amber Moore -

I am also have this problem.  I want to embed a clock and count-down to my moodle page but have been unsuccessful.  I am adding an HTML block to the side bar and pasting the codes, but the actual clock never shows up, just the crazy HTML code.  Please let me know if you have solved this problem.  smile

In reply to Amber Moore

Re: adding code to html in moodle

by Itamar Tzadok -

Code may be added in the html mode of the editor (<> in the toolbar of the 1.9 editor). It is recommended to turn the editor off (in your user profile) for adding/editing code which contains javascript. And for all that to work 'trust content' in the site level should be enabled. hth smile