Malfunction trying to insert images in lesson *answers*

Malfunction trying to insert images in lesson *answers*

by Orestes Mas -
Number of replies: 8
Picture of Translators

Using Moodle 2.0.1+

I create a lesson, and a question page (multiple choice) within it.

I've no problem inserting images into the page's content, using the HTML editor: When I click the "insert/edit image" icon, a dialog shows up asking me to enter the image's URL. Just above the URL input fiels there's a link with the text "Find or upload an image...". If I click on it file picker shows and I can use it to upload an image (that gets saved into new Moodle 2.0 file repository, I presume).

The above is fine, but when I try to do the same with the answers, i.e. inserting (and uploading) an image within the answer field, the "insert/edit image" dialog does not have the "Find or upload image..." link on it, so you cannot upload and insert new images there.

To reproduce:

  1. Create new lesson: Settings don't matter.
  2. Insert new question page. Multichoice type.
  3. Fill in the required fields. Go to the "Answer1" field. TinyMCE editor doesn't show up because the field type is "Moodle auto-format" by default. Change the field type to "HTML format". Save the page and re-edit it. Now the "Answer1" field is surrounded by the TinyMCE editor. Try to insert an image here using the toolbar button. Try to insert one in the page contents field and you can see the difference.

Maybe there's a workaround (i've not tried it yet): inserting the desired image into the main page's text and then reusing the assigned URL into the response field, deleting the former image after that. But, anyway, this will be very cumbersome and hard to figure out.

Attachment moodle1.png
Average of ratings: -
In reply to Orestes Mas

Re: Malfunction trying to insert images in lesson *answers*

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

Hi Orestes,

I reported this bug as MDL-23575 on 29/Jul/2010. You are welcome to vote for the bug report to hopefully get it fixed by Moodle HQ programers any time soon.

In the meantime there is a simple workaround. Insert the image you need inside the Question text field, then copy-paste to the Answer field.

Joseph

In reply to Joseph Rézeau

Re: Malfunction trying to insert images in lesson *answers*

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

Anyone interested may vote for this long-standing bug MDL-23575, in the hopes to see it fixed some time in 2012.wink

Joseph

In reply to Joseph Rézeau

Re: Malfunction trying to insert images in lesson *answers*

by Ted Lorance -

I am curious if anyone is aware that this workaround doesn't seem to work in Moodle 2.2.1.  Or perhaps its failure to function is simply a local version issue.  At any rate, when I try the workaround, it appears to work in the page editor, but when I view the page, all the images which I uploaded to the page content, cut, and pasted into the answer content boxes appear as broken links.

In reply to Ted Lorance

Re: Malfunction trying to insert images in lesson *answers*

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

@Ted,

  1. When editing your Lesson page, you have to make sure that the fields where you want to insert an image have been set to HTML format, instead of the default Moodle auto-format.
  2. Then, in moodle 2.2 etc. you have access to the Image insert button, so you can insert images in the REsponse field, no need to resort to the workaround I suggested (for Moodle 2.0)
  3. Unfortunately, there is now a new bug, you cannot insert images from your hard disk or your course repositories, you can only insert an image from a Web URL. You may wish to vote for my bug report MDL-23575. I reported this bug 2 years ago, it currently has 15 votes, but is still pending.

Hope that helps.

Joseph

In reply to Joseph Rézeau

Re: Malfunction trying to insert images in lesson *answers*

by Ted Lorance -

Thanks for the warning; I had the HTML set already and was using the Image insert button, and was already experiencing the bug you mentioned.  It is unfortunate, as it has completely stymied my attempt to construct a retrosynthesis questions as a Lesson; without chemical structure images, the students will never decipher the lesson.  I have voted for the bug; I guess now we wait and see. smile

In reply to Ted Lorance

Re: Malfunction trying to insert images in lesson *answers*

by Ted Lorance -

If it helps the analysis of this bug any, I uploaded the chemical structure images to My Private Files and used the Image Insert in the page content area to get the URL of the images stored there; these URLs do not result in visible images either.  Even when I used an image address from the WWW, no image was displayed; the error may be deeper than a missing button in the answert content Image Insert popup box and may involve the image location reference code as well.