Here's my problem:
(I'm on Moodle 2.2.3, Windows server.)
I have two Moodle websites hosted on the same server, under the same domain. One is < www.my domain.com/A > and the other is < www.mydomain.com/B >. The thing is I've been unable to insert pictures on one of them simply because when I click the "Insert/Edit Picture" button in the HTML editor it opens a window without the "Find or upload an image" option. But the other is ok, it always gives me that option (see screenshots attached).
"Find or upload an image" option unavailable
I'm also experience the missing "find or upload an image" button, but the behaviour is consistent across all sites.
I wonder whether this is related to the issue described in the tracker at http://tracker.moodle.org/browse/MDL-27520?
Can you say exactly where you are not seeing the image upload button? Is it everywhere on your Moodle sites or in specific places? Are you unable to add any images this way at all? On any site?
As far as I can tell, the issue occurs in places where the admin_setting_confightmleditor textarea element is used on a config / seetings page (e.g. Front page settings).
Pages that use the 'htmleditor' MoodleQuickForm element (e.g. the user profile edit form) don't seem to have the issue.
I'm running the same version of Moodle (2.2.5) on two sites on the net and an instance on my laptop. The issue also occurs on a 2.2.1 instance on my laptop.
If you mean in Front page description of Front page settings, that is expected behaviour - ie, not to have the image upload button.
It appears my issue is different from that of the OP.
If as you say, the behaviour is expected, then it begs the question of why a button for uploading image/media files is provided in the HTML area, when the user interface of the popup rendered by those buttons does not provide an easy way for the user to actually upload image/media files.
IMHO, the admin_config_htmleditor and QuickForm textarea are visially identical, and having them behave differently is sure to confuse users.
It could be caused by the fact the versions of Moodle are different in A & B.
Clearly A could be missing an update which B has. The versions could be 1 week apart. I recall this happening some while ago. The fact you can upload images using the Filepicker in B but NOT A is obviously a missmatch of versions.
It would be interesting to find out the difference between the two sites. Perhaps filters or some other factors are at play here. Browsers? Chrome v IE7 even? Safari v Firefox? Chrome v Opera?
The second thing to mention is that some text areas in Moodle support uploading files and some do not. There are reasons why a particular area does or doesn't support files such as the ability to backup/restore or compatibility with other areas in Moodle such as the gradebook. If a text editor does not support file areas - you can still use images - but only by entering the URL to an image already hosted somewhere else on the internet.
Hope this helps
Damyon "[...] some text areas in Moodle support uploading files and some do not. There are reasons why a particular area does or doesn't support files such as the ability to backup/restore or compatibility with other areas in Moodle such as the gradebook. "
What are those "reasons" you talk about? Why is it that students are able to use the file picker to upload images (etc.) to the HTML editor in some Moodle activities (Assignment, Glossary) but not in other activities (the Essay question in the Quiz and the Lesson activities)? What is the rationale there?
"[...] you can still use images - but only by entering the URL to an image already hosted somewhere else on the internet."
Yes, but that is not really user-friendly.
Uploading files is not always disabled in Quiz Essay questions. It is a setting when you edit the question whether you (the teacher) want to allow students to upload things.
Daniel, Tim and Danyon, I was far too casual in this post.
My question is more specific. Why can we not upload images in the usual way on the home page and in some theme settings? They require a URL. Gareth in Shoehorn has gone to a lot of trouble to get this sorted.
I get quizzes. But not themes.
In these cases, there is no place to store them as system files. The filebrowser normally (historically?) associates an uploaded file using the plugin file mechanism with a specific course and activity instance. The file is then backed up and restored along with the activity. Theme settings are not associated with activities so the file browser is not really an appropriate tool to use.
The image tool or filebrowser has been hacked to allow inserting of image urls with certain repositories instead of the actual file. For example wikimedia finds a image to download and then offers an option to put the url instead. This sequence seems a little strange to me, but works.
It might be better to have ask first whether the user wants a file or a url and pull up a browser with repositories that support that type. The url browser alone could be available in themes, etc.
If they are on the same server and in the same domain (cept located in a different directory), have you made sure the cookie prefix for A and B sites are different (not the default cookie)? That has, in the past, affected users who used the same browser in two sites from same domain/server.
What happens if one uses one browser for site A and another browser for site B? IE/Safari/FireFox don't share cookies nor caches. Does the button for 'Find Upload ...' show?
'spirit of sharing', Ken
The solution is very simple, sometime you have to mention some parameters in the code, to work the TinyMCE editor work in other mod/blocks/ or any other instance of moodle.
Go to your moodle folder and then the sub folder(for which the TinyMCE Find or upload an image... is not working properly).
Find the the php page from where the html form is rendered. The php page starts with the name xxx_form.php
Search with the tag $mform->addElement('editor'
Suppose you get something like this(make sure you have search the proper tinymce editor, where you are facing the problem)
$mform->addElement('editor', 'logo', 'Insert Category Logo');
add just another two parameters in the above line i.e.,
$mform->addElement('editor', 'logo', 'Insert Category Logo', null, array('maxfiles' => EDITOR_UNLIMITED_FILES));
Then save the php file and refresh the web page and Find or upload an image... option will be available.
Pardon me if this is an ignorant question, but what impact does this have on where Moodle stores the uploaded files? Are there any dangers in applying this patch?
Keen to see if it could work for our students trying to upload images into the Journal activity on Moodle 2.5
All the best,
I had same problem on the front page. Turns out database: mdl_course.maxbytes was set to '0'.
This will set the "Front Page" course id 1 to 500MB
UPDATE `mdl_course`SET`maxbytes`='52428800' WHERE `mdl_course`.`id`=1;
Warning this will reset all courses to 500MB