I want to add a simple menu in the editor. However when I copy/paste following HTML Code, the system strips off the tags form, select and option.
I don't have access to the PHP-Source-Code, is there any way to change the allowed tags in the admin-section of the moodle site? using 1.8.3+
<form id="form1" name="form1" method="post" action="">
<label>
<select name="Menu" id="Menu">
<option>Volksschule</option>
<option>Hauptschule/Unterstufe</option>
<option>Oberstufe</option>
</select>
</label>
</form>
Thanks for your help!
David
Re: Allow form, option und select HTML-Tags ro be added by admin
Go to Administration -> Security -> Site policies
and select
Enable Trusted Content
After that you should be able to paste that code in all activities
Re: Allow form, option und select HTML-Tags ro be added by admin
I did activate the option "Enable Trusted Content". This works fine if I do some editing in a topic, but if I make a new database and then want to add the form-tag in the introduction-section in the editor, it still does not work.
Is this a bug in the database module, or am I doing something wrong?
Thanks,
David
Re: Allow form, option und select HTML-Tags ro be added by admin
Well it's not actually a bug but that field has format type format_text in file mod/data/view.php
If you find
if ($data->intro and empty($page) and empty($record) and $mode != 'single') {
print_box(format_text($data->intro), 'generalbox', 'intro');
}
and change it to
if ($data->intro and empty($page) and empty($record) and $mode != 'single') {
print_box(format_string($data->intro), 'generalbox', 'intro');
}
your intro field should show that option box again. If you want to add javascript to that selection box do not use editor but edit your profile first and select "When editing text" - "Use standard web forms" first to disable editor...
Re: Allow form, option und select HTML-Tags ro be added by admin
thanks a lot! That worked fine for me, nevertheless I ran into some other problem, I posted there:
Filter problem in the introduction-section of the database module
Thanks again for your help!
David
Re: Allow form, option und select HTML-Tags ro be added by admin
I am trying place media and java resources in ewiki. Info suggests that ewiki extensions, much like mediawiki extensions should allow for this. I started by trying to embed flash in an ewiki page. If I try and take the same steps in a web resource there is no problem using the code I try to embed using ewiki.
However, when I use ewiki and save, the code is cleaned out, no matter my role.
I am unclear regarding weblib.php use of allowembedobject variable vs trustedcontent vs ewiki plugin (see below).
I started with trsutedcontent and allowembedobject both off, then tried turning trustedcontent on, which seemed to have no effect. Does allowembed object have to be turned on for trustedcontent to be used (this seems counterintuitive based on what the various settings indicate which allows use of these tags, but that is not set at present, but I enabled trustedcontent to see if that might have some impact and it didn't. Of course the moodle docs indicate that the pparent last work on trusted content was that it was "virtually unusable" and there is no info on allowembedobject in the moodle doc, believe it or not..... and tracker offers little....
http://tracker.moodle.org/browse/MDL-16717
So is there any docs about what can or can't be embedded in wikis and by whom? Can I assume that the use of htmleditor is materially different from the statdpoint of editing a web resource or other resource and acctivities (where non-trusted users can create material)? Assumign the latter, is this purely a failure to roll trsutedcontent to the ewiki or is this an issue with an ewiki plugin? Where are the docs explaining the specific relationships among allowobjectembed and the rest of moodle (as in what aspects of moodle does this switch apply to and what roles limit its application if any.....) Or to put it another way, does turning allowobject embed work to allow embedding of any object by any role? AND, can I embed objects in an ewiki if the initial creations contains the objects
Lastly, how is any of this potentially related to adding an applet to ewiki, as the effort to embed was simply the first step towards inserting an applet in a wiki....
http://xref.moodle.org/nav.html?mod/wiki/ewiki/plugins/moodle/f_fixhtml.php.source.html
Re: Allow form, option und select HTML-Tags ro be added by admin
Will this change extend to <applet>?
Does this mean that this is now available for every user, and was the solution trustedcontent, which is commented as almost unusable?