Feature Request: multiple "main files" from same context

Feature Request: multiple "main files" from same context

by Neil Haskins -
Number of replies: 3

Hi everyone. I'll try to explain as well as I can, but if anything doesn't make sense, please ask.

When creating a new file resource for multiple files I upload a zip, and then unzip it, giving a collection of files and folders.

Folders together

I go into my lesson 2 folder and set the file I want as main.



Even though these files aren't in this directory structure really, they act as though they are. When a student accesses that file resource it is displayed in the context of this folder structure, so all the css, etc. works and the pages can link between each other.

Now I want to add another lesson. I create a new file resource and upload and unzip my lesson. However, it doesn't exist in the same context as the first.

folder by itself

I could upload my template files again und unzip them seperately but it won't be the same files (or even if it is on the server, it isn't treated as such) if I want to update my css, I need to update it twice, once in each file resource.
I was informed that Moodle 2.3 will have an option whereby I could select a pre-exisiting file by the add button and set it to be a reference, not a copy. I couldn't see this option in 2.3dev which I downloaded this morning, but even were I to have this option the issue is that it takes prohibitivley long to add in all my template files via the add button. For example to add my css file is 7 clicks

add > Server files > Lesson 2 (File) > Files and subfolders > css > course.css > select this file

I have about 30 template files in this course, and I have 30 Lessons so 30 x 30 x 7 = 6300 clicks - and it's not even a math course :P

What I would like is to be able to upload all my files and have moodle see them in the same contextsuch that I can have relative links between them. But I want to have multiple file resource links from the moodle course page (one for each lesson).

Average of ratings: -
In reply to Neil Haskins

Re: Feature Request: multiple "main files" from same context

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

For the reference(alias/shortcut) to work you'd have to use Private files http://docs.moodle.org/23/en/Private_files  or else a repository such as Box.net, Equella or Filesystem

In reply to Mary Cooch

Re: Feature Request: multiple "main files" from same context

by Neil Haskins -

Probably that's why I didn't see it smile

In reply to Mary Cooch

Re: Feature Request: multiple "main files" from same context

by Neil Haskins -

Just to follow up, this morning I updated to the latest version of 2.3 and had a try with the filesystem repository. The "create an alias/shortcut" option does show up when selecting a file to add from the repository, but I would still need to add every file individually or links between them won't work.