Linking across multiple HTML files in HTML mini-site

Linking across multiple HTML files in HTML mini-site

by Stuart Anderson -
Number of replies: 12

Dear All,

I've trawled this forum for about 30 mins and read the FAQs to check for my specific question, but no joy, however, I suspect it has come up many, many times before.

I'm trying to support a colleague with a moodle 2.5.1 instance which was migrated from 1.9 about 12 months ago.  From our 1.9 site we had a HTML mini-site built in Dreamweaver with all the usual relative paths to css, a little javascript, images etc.  The moodle course site has file links to specific pages within the HTML site and these were autocreated in 2.5 from the legacy 1.9 migration.  For example,

1.1 - File pointing to HTML page in mini-site
1.2 - File pointing to HTML page in mini-site
1.3 - File pointing to HTML page in mini-site

2.1 - File pointing to HTML page in mini-site
2.2 - File pointing to HTML page in mini-site
2.3 - File pointing to HTML page in mini-site

...

You can see a sample of the exact setup if you login as a guest user to this course sample:

http://www.hazopstc.com/course/view.php?id=7

A problem has arisen since I needed to add a new page.  Although I can add a new page to the Legacy Course Files section in the Course Admin, I cannot link to this using the File resource tool as the legacy files are not seen.  For obvious maintenance reasons, I want to have one set of HTML files (including associated css, framework images, etc) to which I can link to specific pages in each moodle course layout section. 

From information I've managed to find, one approach is to grab the URL for the target page when viewing it as an admin in the Legacy Course Files section, and add this to the moodle site via the Add URL link tool.  You can see that I've used this approach to create the new "1.6 Comments from users" resource on the course sample site linked above.

I don't like this approach as it feels too much of a hack.  Could anyone tell me if there is a better way to create multiple file links in a course to a single set of HTML files stored in moodle?

Thanks,

Stuart Anderson, UK

URL


Average of ratings: -
In reply to Stuart Anderson

Re: Linking across multiple HTML files in HTML mini-site

by G. M. -

Hello Stuart,

Frames are not that user friendly. I would recommend you to: stop using and get rid of legacy files, and use Moodle's own resources (e.g. page, book).

If you still want to maintain the current system of work, stop using and get rid of legacy files, create all your html pages in a public directory and use the link resource.

--- References

http://docs.moodle.org/25/en/Legacy_course_files
https://moodle.org/mod/forum/discuss.php?d=256840

https://moodle.org/mod/forum/discuss.php?d=251415

http://docs.moodle.org/25/en/Resources

Average of ratings:Useful (1)
In reply to G. M.

Re: Linking across multiple HTML files in HTML mini-site

by Tiffany Morgan -

Hi Stuart and Guillermo

This conversation deals with exactly the issues I have been tackling this week myself. We were also big mini-site users on 1.9. Our html, css, images, etc were developed outside of moodle and then all the files, supporting directories were uploaded into the then Moodle file structure. When we wanted to update a file we just uploaded the new version, overwrite the old file with the same named files, and we were done. We are still trying to find a workflow to approximate what we had in 1.9. From what I can tell so far here are the options available, but if I am missing other options I would be more than grateful to learn of them:

1. Use an external repository

2. Enable legacy course files (more on that below)

3. Use a folder resource to hold all course resources, build a page resource that links to the files in that directory (I had engaged in this similar conversation many years ago as well about this topic: https://moodle.org/mod/forum/discuss.php?d=201714)


Also, a follow up-you are recommending not using legacy course files. I have read the documentation about the advantages of legacy course files (http://docs.moodle.org/20/en/Course_files#Why_is_it_better.3F). Are these the reasons that you are recommending not using legacy files or are there additional reasons?

Thanks to you both and to Stuart for sharing the sample of his course

Tiff

Average of ratings:Useful (1)
In reply to Tiffany Morgan

Re: Linking across multiple HTML files in HTML mini-site

by G. M. -

Hello Tiffany,

It seems there is some confusion here.

Please start with the following (which belongs to the Files in Moodle 1.9 section):

Problems with the Moodle 1.x

Now, under the Files in Moodle 2 section, notice the following:

The course files area in Moodle 2 is deprecated and is not available by default due to the problems described above (i.e. Problems with the Moodle 1.x model). When a site is upgraded from 1.9, all course files are migrated into new file areas and the old course files area is hidden from view.

Then, the Why is it better? section refers to the Moodle 2.x File System model, not the legacy file system. As mentioned in the same page, one can mimic the old 1.9 functionality:

How to duplicate Moodle 1.x functionality in 2.

As I mentioned before, it would certainly be best to migrate everything into Moodle, that is, use Moodle's own resources (page, book, folder, etc.). Of course, in order to know which are the best options one would actually need to know the course design requirements.

Regarding the use of an external repository and given the "mini site" concept being handled, maybe the following could be of help:

Host Websites With Dropbox.

Average of ratings:Useful (1)
In reply to G. M.

Re: Linking across multiple HTML files in HTML mini-site

by Tiffany Morgan -

Thanks Guillermo

Thanks for the reminder about WebDav. Im connecting with our server admin to explore that as an option for our institution.
If that would not be an option of us, I guess one more thing I'm not understanding (though there are lots of things I don't understand yet when it comes to the new file management) is how to manage html files, as page resources, on a large site wide scale if you are not using any repository option (so no WebDav, no Dropbox, etc).

So thinking in terms of designing html page. When I'm outside of Moodle I write an html page, linking to css files, images, docs, etc and then take that directory and post it. We used to do that in Moodle 1.9 using the files location.  Unless I am missing something, if I am not using an external repository, it seem that there is no way to upload the html and associated linked files (the css, images, docs, etc) in a Moodle 2 environment. I suppose I could paste the html in the page resource, upload the individual image file, have it insert the link, but there is no easy way that I can find to reuse that image link. 

Is that correct? If not I'm grateful to learn what I am missing-it has been a problem that has been vexing me for quite sometime.

Thank again!
In reply to Tiffany Morgan

Re: Linking across multiple HTML files in HTML mini-site

by G. M. -

Hello Tiffany,

I think I may be missing something quite obvious here; if so, please disregard my suggestions smile

1. Wouldn't a URL resource work? You have your external site as you have it, with all its files (css, images, etc.), and then you would just link to the required pages. I'd say this is the best option, but once again, I guess I'm missing the real issue and requirement.

2. I don't know how complex your site is, but if it has a relatively simple layout maybe you could define it as a SCORM Shareable Content Object (SCO). I've seen that kind of courses, web pages contained in a SCO. Depending on whether you need the object to communicate or not with the LMS you would define it as a SCORM activity or as an IMS resource, respectively. There are some free, simple and easy to use authoring tools. Please take a look at any of the following:

http://docs.moodle.org/27/en/Creating_SCORM_Content#Free_OpenSource (eXe, Reload and Xerte have been popular options)

Best SCORM authoring tools.

3. I don't think this one really applies to your case, but I'll throw it in anyway smile

Joomdle (Joomla + Moodle).

https://moodle.org/plugins/view.php?plugin=auth_joomdle

In reply to G. M.

Re: Linking across multiple HTML files in HTML mini-site

by Tiffany Morgan -

Hi Guillermo

Thanks for the reply--happy to clarify  smile

1. We actually don't have an external site where files are stored. Our workflow previously (1.9) was to develop html lesson pages offline along with all accompanying files (images, css, word docs, pdf, etc) . We would then zip those up and upload to Moodle. When we first launched we created webpage resources that embedded an object, linking to the html file (example:  <object height="5000" width="630" id="embeddedhtml" type="text/html" data="http://mysite.com/file.php/575/0c_01_01.html?="></object> As we developed new courses/updated courses we uploaded all associated files to the 1.9 courses files (css, images, word docs, etc) and then placed the html code directly into the webpage resource. While we did keep backups offline, all files for production were served from within the moodle 1.9 file structure. This is the structure/workflow that seems like is not possible in the 2+ environment (or at least not done easily for a large number of classes/files). This is where I would love to learn I am wrong and there is a easy way that I am just not seeing smile

2. Ive done a tiny bit of SCORM work for side-projects (mostly adjusting things that had been development by others), but hadn't heard of those tools specifically so I will take a look--thanks smile It would take some modification to get our files in SCO's, but I can look into that as an option.

3. Thanks for the reminder about Joomla. We explored that a few years ago and didn't go that direction (though now I can't remember why). Always worth a second look. 


Thanks again! 

In reply to Tiffany Morgan

Re: Linking across multiple HTML files in HTML mini-site

by Douglas Broad -

Tiffany,

I am not sure that this will add value to the discussion but I think what I typically do is what you want to do.

1. Develop the html pages offline and test them in a local apache server with various browsers.  Develop within a folder structure as you would any site.  Use  sub-folders for css and for java-script according to your standards.

2. Once you have tested and have all the required non-public resources within the folder structure, zip the folder up.

3. Drag the zipped folder to moodle course (in course editing mode).  Use the file resource option if asked (not the folder resource).  Unzip the folder if it is not done automatically.

4. Edit the file resource and decide how it should appear (embed, open, pop-up, etc).  Select the main page htm(l) file and choose "set main" from the menu. Rename the file resource on your course main page.

5. You now have access to your multi-page web site local to your course.

Average of ratings:Useful (2)
In reply to Tiffany Morgan

Re: Linking across multiple HTML files in HTML mini-site

by G. M. -

Hello Tiffany,

While this all went sideways because of the legacy issue and all the posts afterward, it is actually as Douglas explained, you just need to pack the site and upload it into a File resource:

https://moodle.org/mod/forum/discuss.php?d=262556#p1142487

In reply to G. M.

Re: Linking across multiple HTML files in HTML mini-site

by William Graves -

Hi Guillermo:

Thank you for your suggestions but they don't solve my particular issue. I have a mini website and I've already done what Douglas has suggested. It's true that I can access my website inside of moodle by zipping it up and uploading it to my moodle site as a file, then unzipping it and selecting the main starting page. That works fine because it provides a single access to the entire mini website but it doesn't solve the problem that I'm trying to solve:

I need my students to be able to access my mini website from various locations in my moodle course and I need them to be able to access different parts of my mini website from these different locations.  For example, I have a website that covers the material of an entire course.  When students are answering questions that I've created inside of moodle, I want to be able to place links within those questions that can take students directly to a specific page in my mini website that provides the help they need for that particular question. Yes, I can do this task with no problem by placing my website outside of moodle, however, I am trying desperately to avoid doing this because I do not want my website to be accessable to the general public and I don't want my students to have to log in with a new username and password each time they need help with a question. Unfortunately, when I attempt using the various methods for doing this within the moodle environment, I am only able to access a single html page in my website from various locations in my moodle course.   Except for the initial entry location, all the links to other pages including images, etc are completely broken. This is just very disappointing.  I hope I've explained myself well enough and I think my needs are similar to others in this post. It would really make my day if someone out there knows what I'm talking about and can tell me if what I want is even possible to do. Thanks people. BTW: I'm currently using moodle version 2.6. I'm a physics teacher and moodle has been a blessing for me and for my students. I just want to take the next step.

Bill Graves

In reply to William Graves

Re: Linking across multiple HTML files in HTML mini-site

by G. M. -

Hello William,

Have you considered Joomdle?

http://www.joomdle.com/jdemo/

Average of ratings:Useful (1)
In reply to G. M.

Re: Linking across multiple HTML files in HTML mini-site

by seaghan moriarty -


Might this work ... ?

  1. Upload your mini-sites to a repository (eg WebDav)
  2. Use the Moodle API (http://docs.moodle.org/dev/Access_API) in the header of your mini-site HTML/PHP files to check that the user is logged in to a particular course before granting access to view
  3. Link directly from mini-site X to mini-site Y


I've had this problem in the past - where uploading a full mini-site via Moodle seems to work, but it just links to the main index.html as the 'main file' and is not aware of the image, CSS and surrounding files - and thus just loads the main (bare) html file.

Average of ratings:Useful (1)
In reply to seaghan moriarty

Re: Linking across multiple HTML files in HTML mini-site

by William Graves -

Guillermo and Seaghan:

Thank you so much for your suggestions.  I'm going to investigate both. I'll get back to you soon with the results. smile

Bill