General help

Copy/paste internal image links in label

 
This discussion has been locked because a year has elapsed since the last post. Please start a new discussion topic.
Picture of Mitchell Platt
Copy/paste internal image links in label
 

Hi all,

Just moved from 1.9 to 2.08 and am trying to get my head around the way files are stored now. All our labels include graphics (stored at the course level) to make them more appealing and it seems I can no longer simple copy and paste the html including the img tag to duplicate the label. When I do this the link seems to alter itself to a "draftfile" directory and break. Can someone let me know how I can get around this?

We do have a file repository, should i be using this instead?

 
Average of ratings: -
Picture of Mitchell Platt
Re: Copy/paste internal image links in label
 

Is there another forum on moodle.org where I might have more luck with this question?

 
Average of ratings: -
It's only an avatar...
Re: Copy/paste internal image links in label
Group Core developersGroup Documentation writersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

Hi Michael,

Luckily I just saw this and can give you an answer.

If you have a copy of the image on your computer, the easiest way is to edit the label from the course page and replace the image manually. You would do all this in the text editor when you edit the label.

Apologies if I have misread the question, whichever way you are trying to do this, if don't have the correct url for the image, which may/or may not be on your server, your old code wont work, that is why I suggest that you basically reset each image tag by adding the image via the editor in your course summary or wherever.

At least that is what I think you do, I would do that if I were you.  In doing this you might actually come accross your missing images when you see the file picker when adding the image, as you have an option to look for any image files on your system. As far as I know they will be in your Moodledata folder, but finding them is not easy as they are all encoaded with a very long filename made up of mainly numbers.

The file system for images has changed dramatically since Moodle 1.9 days.

You will find the Themes forum is helpful in things like images and such I am the Moderator there.

HTH

Mary

 
Average of ratings: -
Picture of Paul Lovatt
Re: Copy/paste internal image links in label
 

You are not the only one baffled by this "dramatically different" file "system".  You cannot simply copy and past links to objects as each one is stored as a separate instance somewhere mysterious in your moodle and cannot exist twice.  Mary's advice to re-insert each image separately is the best you can do.

It amazes me how little information is out there for people in our position of having to cope with our logical and useable file system being taken away.  I have watsed days on just this nonsense already.

I believed at one point that the "my private files" option was going to save me, until I realised that not only do I have to upload each file there individually, but that I would have to then place each file into the course one-at-a-time as well, duplicating the work.  I have stopped using it.

Luckily course page URLs can still be copied and pasted and used for links but objects on pages cannot.   If this disastrous nonsense is not fixed in future versions then who knows what is the future of Moodle.

As far as I can tell the whole repositories idea does not work at all, making every single task I have tried so far immensely more complex than it used to be.  The problem is not what you have to do but how on Earth you get help trying to find out what to do.

The usual form is that the people who broke it will cry out for others to stop moaning and fix it.  Watch this space ...

 
Average of ratings: -
Brendan Newlon
Re: Copy/paste internal image links in label
 

For anyone with a similar issue, my simple workaround was to create a directory under /moodle/pix/ and I upload any images I'll use frequently to that directory so I can refer to them by their URL directly. This makes copying the image link from existing labels, etc, much easier. 

It was also the easiest way I found to add an image to the site footer, since there's no image picker when editing Additional HTML. 

 
Average of ratings: -
Picture of Howard Miller
Re: Copy/paste internal image links in label
Group Core developersGroup Documentation writersGroup Particularly helpful MoodlersGroup Plugin developers

You noticed that this was a 3 year old post? wink

In effect you are hacking core code by doing that, which is hard to recommend. There's nothing wrong with 'hosting' often used images on your server but I would put them somewhere else outside of the Moodle code.

 
Average of ratings: -