Lesson -- popup to file or web page: How do I increase maximum attachments or do I not need to do it?

Lesson -- popup to file or web page: How do I increase maximum attachments or do I not need to do it?

by Rodney Wolford -
Number of replies: 6

Hello,

Given a choice, I'd rather just incorporate my html with its CSS in the html editor for the lesson page. But I've tried that without success.

So now I'm trying to add a "pop-up to file or web page" in the lesson. What I have is an html link that includes an image file with two images in a zip file. I load the zip file into the pop-up loader. Then I unzip it. Now I receive a message that says maximum attachments allowed is one and so it doesn't work.

I guess its not clear to me what I am supposed to do. First, to use the pop-up is there a way to increase the maximum allowed number of attachments for upload to make this work?

If not, then do I have to modify my html file to look elsewhere for the images, and if so, where would those files best be located? on the Moodle site? In the MoodleData Folder, perhaps? Or completely external to the Moodle Site?

Also, I am curious why I can't load my html data, with css files, into the html editor for the page. I have turned off html tidy, I have permitted embeds, and I have given myself trusted rights, but the html data is just stripped from the html editor.

Any assistance or guidance would be greatly appreciated. I am using Moodle 2.4.3.

Rod Wolford

 

Average of ratings: -
In reply to Rodney Wolford

Re: Lesson -- popup to file or web page: How do I increase maximum attachments or do I not need to do it?

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Rodney "Given a choice, I'd rather just incorporate my html with its CSS in the html editor for the lesson page. But I've tried that without success."

Sorry, but it is not clear what you are trying to do. Can you please provide a concrete example?

Joseph

In reply to Joseph Rézeau

Re: Lesson -- popup to file or web page: How do I increase maximum attachments or do I not need to do it?

by Rodney Wolford -

Joseph,

My pleasure! This is what I want to have in my lesson.

http://fofcom.com/WZC/repository/dswmedia/homescreen_hotspots2.html

It incorporates rollovers, tooltips, and links (currently set to same moodle page, but will be set to other custom pages when done). I have tried creating this in the Moodle Lesson HTML window to no avail.

This would become a template for me to provide instruction on using the site to new users.

Thanks for any ideas you may have.

Rod Wolford

In reply to Rodney Wolford

Re: Lesson -- popup to file or web page: How do I increase maximum attachments or do I not need to do it?

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Rod,

I'm afraid you want to stretch the Moodle Lesson activity to more than it can do.

Joseph

In reply to Joseph Rézeau

Re: Lesson -- popup to file or web page: How do I increase maximum attachments or do I not need to do it?

by Rodney Wolford -

Joseph,

Two more questions about this.

1) Why is my CSS code stripped out of the html (tinyMC) editor when I insert it?

2) I have been able to load the html and its associated image file into a folder (as a resource) in the lesson. Why can't I use a short cut to the folder resource in the lesson to run my html materials? I can link them with an href, but that requires a button to run it. Isn't there a script that could run the html when the window opened?

Thanks

Rod

In reply to Rodney Wolford

Re: Lesson -- popup to file or web page: How do I increase maximum attachments or do I not need to do it?

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

@Rod,

"1) Why is my CSS code stripped out of the html (tinyMC) editor when I insert it?"

For security reasons, lots of things are stripped out of the HTML editor. This is not related to the Lesson activity, but to all Moodle activities using the HTML editor.

"2) I have been able to load the html and its associated image file into a folder (as a resource) in the lesson."

Sorry, I don't understand HOW you did this. Please provide a step-by-step explanation.

Joseph

In reply to Joseph Rézeau

Re: Lesson -- popup to file or web page: How do I increase maximum attachments or do I not need to do it?

by Rodney Wolford -

Joseph,

1) In the document http://docs.moodle.org/24/en/Site_policies it discusses "trusted content." It states: "By default Moodle will always thoroughly clean text that comes from users to remove any possible bad scripts, media etc that could be a security risk. The Trusted Content system is a way of giving particular users that you trust the ability to include these advanced features in their content without interference."  The same document also discussed "allow embed and object tags." Wouldn't that permit an administrator to add to the html tinyMC editor things like CSS?

2) I was imprecise in my statement "into a folder (as a resource) in the lesson." I should have said "into a folder (as a resource) for the lesson." The folder is in the same course as the lesson, not in the lesson. With that clarification, I am sure the HOW is now trivial :-| But the basic question remains the same. Why am I unable to create an alias of the html file that can be loaded in the lesson. Elsewhere in a discussion of "folder" this capability is discussed.

3) Finally, I have been able to load the html in the lesson by using the following javascript and html entered into the html tinyMC editor, but all it does is generate a "go" button that must still be clicked to run the script. Do you know of a way in which this could "autoexecute" when arriving on the page. That would solve my problem too.

<title>JavaScript for HomePage</title>
<script type="text/javascript">// <![CDATA[
window.open ("http://fofcom.com/WZC/repository/dswmedia/homescreen_hotspots2.html");
// ]]></script>
<p><a href="http://fofcom.com/WZC/repository/dswmedia/homescreen_hotspots2.html" target="_self">Go</a></p>

Again, let me say thanks for any insight you might provide. I am enjoying working with Moodle. It is a very interesting and potentially very powerful tool for me to learn to use.

Rod