I'm about to ask a rather involved question ,so... sorry.
I've recently started with a large online school, and we are planning to move about 200 courses from Moodle 1.9 to 2.2 or 2.3 for the coming school year.
All of our courses are based around html pages with linked css,scripts,images and often links between the different subparts of a lesson. Each of our courses have their own html templates for the lessons seperate from the moodle site template. I can see that the moodle css files are still loaded, but we're overriding them with our css.
I'm trying to figure out how to make this work using the new repositories feature (or somehow bypassing it).
linking to my pages using a "file" resource type only displays the html text inside and object tag embaded in the moodle site template, and using the URL resource type I am unable to link to a filesystem repository.
The Legacy Course File repository is incompatible with html, and from what I've experienced we (too) often have changes being made to our courses on the fly. I think If we had to zip up a whole course, reupload, and relink everything to make a change it would cripple our productivity.
The only feature from moodle we are using in our courses are links to resources in the moodle course. A former employee wrote some custom plugins such that for example %QUIZLINK:Name of quiz% would open the quiz named "Name of quiz". obviously we will need to rewrite all of that, but I'd like to be able to access the page not purely as an external URL so that we can touch it with some plugins to implement that functionality.
I am open to the idea that we should write moodle templates for our courses eventualy, and implement them in a more moodle specific way, but my deadline for this move is September so I don't think that will fly just yet.
What have others done? Has anyone successfully completed a move while maintaining html outside of moodle? What sacrifices did you have to make? Ideas?
I'm about to ask a rather involved question ,so... sorry.
I think we're going to use the 3rd party "course file area" plugin. I'm sorry to post such a big post then not need it, but, ya don't bother replying unless you just find the topic interesting. I think we're good for now.
Id be interested in knowing what plug in you are going to be using...
Our Developers have decided not to go with the "Course Files Area" module, so I'm back to square one.
We have our 2.2 install live and I'm trying to add a course now. The course is 30 weeks long. Each week has 6 pages with a menu to move between them. I can use the file module to upload a zip of the week 1 pages, and another zip with my CSS and the accompanying images, unpack it and select the first page as main file, and it works fine. When I go the upload the next week however, I need to upload the CSS and images again, and it stores them separately from the first weeks. If I were to continue with this process I would have 30 copies of my CSS file, and 30 copies of my images. Not so great if I want to make any stylistic updates.
So, what workarounds are others using?
I understand that with the new Files API, even if you upload the same file multiple times, it will only be stored on disk once (http://docs.moodle.org/dev/File_API_internals#File_API_internals), so if you're worried about wasted space, you needn't be.
We have a similar setup (but with 10 week courses); we're still working out how best to approach it, but this seems to be workable:
- uploading the whole course in one zip,
- adding the first Page manaully, (setting the main file) then
- using the Duplicate button to create the other Pages (without repeated uploads or digging around the File interface a lot).
I'm not sure how to approach updating the multiple copies of CSS, etc. though...
I don't know how often it's stored, but as for updating, when I tried to change the css file it only affected the file resource I accessed it through, so that would still be 30 updates to change anything.
I'll read about Moodle 2.3 as mentioned below, maybe there's something there.
Neil—or anyone—did you get a solution here?
I'm building a course from the ground-up. I have always used html files with relative CSS links in the head. I only want to upload a CSS once. I want to be able to update my HTML and CSS files right from Dreamweaver. I don't want to manually attach a style sheet every time I upload a course to Moodle. I have CSSs specific for departments, then for courses, then for units, so I really would rather have the CSS some place on the server and have Moodle point to it.
Can anyone offer me any suggestions?
Also, there appear to be plans to better support this use case: http://docs.moodle.org/dev/Improved_support_for_external_File_content
Have you investigate file handling in Moodle 2.3 due out shortly? If you upload to your private files you can then make shortcuts/aliases to files and when you update in your private files they are updated in other places - this might help you in the long run. See section 3 here http://docs.moodle.org/23/en/Working_with_files
I just installed Moodle 2.3dev on my test server. Unfortunately I can't find the create alias option (although it's very clear on the page you linked to). At this point even if I could get it to work it still probably wouldn't be practical for my courses.
As I understand for each week of my course I need to create a file resource, upload my HTML files for the week, select the first as main, then using the add button go in and add all of my CSS and image files (henceforth "template files") one at a time. I probably have 20 - 30 files I would need to add for each week, and the speed of the file manager is just brutal on that scale.
If I'm doing something wrong someone please tell me. Please.
At this point it looks like my best option short term would be to place all my template files in a separate directory on my server, and use absolute links in my HTML.
I'm hoping in the future to start using Moodle templates for my pages, but really all I'd want it to do is display my pages as I designed them, and stay out of the way. It could be useful for incorporating the lesson module though.
I don't have a solution, rather a first question in a much simpler version of your exercise. This is what I do:
- create a complete HTML file externally. For example,
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
- create a directory in a course and upload the HTML file into the directory
- In a label link some text to that file through the file picker. The link looks like
Now in the course, if one clicks the link it works as expected, the HTML is rendered full page. But if one navigate to the directory and click on the file, I get completely different results in different browsers. In Firefox (V. 17) it says, "You have chosen to open filename.html which s a Zip-archive(!)" and gives me the choice of opening in the browser (!!) or save it. If I select "Open with: Iceweasel (default)" only I get the html rendered.
In Chromium (V 25) it downloads the file. Clicking on the downloaded file in the bottom bar opens the HTML in Firefox! OK, Firefox is the default browser, but why this difference?
Moodle version 2.4.4+
If this is a new topic you are welcome to separate it. "Displaying uploaded HTML" would be a more appropriate subj. for the new thread.