moodle-an-hochschulen / moodle-local_staticpage

Moodle plugin which displays static information pages which exist outside any course, imprint or faq pages for example, complete with Moodle navigation and theme
GNU General Public License v3.0
46 stars 28 forks source link

JavaScript code deletions? #40

Closed matasoy closed 4 years ago

matasoy commented 4 years ago

When we add something like this

$(".soruliste").append("<li><a class='btn btn-danger btn-sm sorul' data-kat='"+kat+"' data-id='"+sorusay+"'>SİL</a> "+listesay+") "+soru+" ["+kategori[kat]+"] "+resim+medya+"</li>");

plugin or something delete the </a> tag from the script.

And we have this now $(".soruliste").append("<li><a class='btn btn-danger btn-sm sorul' data-kat='"+kat+"' data-id='"+sorusay+"'>SİL "+listesay+") "+soru+" ["+kategori[kat]+"] "+resim+medya+"");

This can be figure out with a backslash <\/a> or <\/li>, but it was hard to find why delete these tags. Maybe you can fix this.

abias commented 4 years ago

Hi @matasoy ,

I think I can say that this plugin was not built to deliver interactive / dynamic pages with JavaScript. There is code which handles a style tag in the HTML head of a static page, but there isn't anything which is handling script tags.

Reading through your report, I would like to propose that you have a look at the local_staticpage | cleanhtml setting and set it to no to see if this solves your problem. See https://github.com/moodleuulm/moodle-local_staticpage#24-process-content for more details about this setting.

Cheers, Alex