Wiki Initial Content Directories

Wiki Initial Content Directories

by Mike Churchward -
Number of replies: 5
Picture of Core developers Picture of Plugin developers Picture of Testers

We are going to remove the current initial content directory selector functions from the wiki module. As it stands, its too complex for people to use effectively.

Instead, there will be an optional field when the wiki is defined that will allow the teacher to add initial content that will be seeded in all initial wiki pages for that wiki.

Down the road, we will add an import wiki structure function that will allow for more complex wiki structures to be brought in by default.

Any comments or questions?

mike

Average of ratings: Useful (1)
In reply to Mike Churchward

Re: Wiki Initial Content Directories

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
That makes perfect sense. approve approve

The help files should be Moodle help files.
In reply to Mike Churchward

Re: Wiki Initial Content Directories

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers

I just checked in a large change to CVS that updates the way initial content and initial page names are handled.

You can now upload initial pages to be used by a wiki in the course files area. It is best if you use an individual subdirectory for any wiki default content as the entire directory will be used to create the pages. Selecting a file in that directory chooses the directory for content and the file for the index (first) page.

If you don't select initial content, the wiki will be empty to start. In this case, the first page name can be specified with the 'pagename' field. If this field is blank, the wiki name will be used.

There is a database change so make sure you visit your admin page after applying this update.

Michael - sorry about this. You'll have to restore some of the translations you removed.

mike

In reply to Mike Churchward

Re: Wiki Initial Content Directories

by Marc Grober -
I have been trying to get someone to discuss this functionality wth me for almost a year, and have finally found this note..... aha!

Using 1.9.2 if I export a wiki (there is only one option, html format) it downloads it to my local machine. I can then upload the zip of html files, create iuts own directory and unzip the files, then select the index file as the source of initial content..... unfortunately, while the wiki that is created does use the index page as the initial page (albeit with an extra half dozen mentins of "index" ) no other content is linked.......

And, I assume if I now go link it, the student instance won't reflect the changes.

WHat am I doing wrong and how can I fix this so that I can create a multipage individual student wiki????
In reply to Marc Grober

Re: Wiki Initial Content Directories - baby steps

by Marc Grober -
It would appear that at least from a formatting perspective there are the following initial considerations:

1) If the pages have been already mocked up in a moodle wiki (erfurtwiki) then the best way to provide them to a new moodle via directory is to edit the existing wiki page, click on html view, then copy the html to a text file.
2) you must not have any extension on the filename so that the filename matches the page name used in the wiki (arguably if you used extensions in the wiki pages you might be able to keep the extension... but I have not tried it and why make it that much more confusing)
3) Exporting to html apparently creates links which the wiki will choke on... and the old wiki apparently does not currently support any other method of export. However, if one uses an html to mediawiki converter such as
http://openfacts2.berlios.de/html2wiki/index.php, will that convert content so that one can automate the process, and if so, if there a conversion routine that can be applied to a whole directory? {Would mediawiki be the closest approximation or is phpwiki closer. Would editing result in more time being spent fixing the conversion??}

Comments?

If one does all this for an individual student wiki of say 5 pages (as perhaps with a journal that has various prompts over a set of exercises) will all student wikis then contain these five pages?
In reply to Marc Grober

Re: Wiki Initial Content Directories - baby steps

by Marc Grober -
Caveats to the above:
1) Watch out for class statements in your markup! If there is no class definition then text in the paragraphs tagged with the class will simply be dropped when the page is pulled into the wiki.
2) the file must have no extensions (well, your file can have extensions but the extensions must then be referenced in your mark-up) so with MS Windows PCs this can be a royal pain as the OS does not typically show the file extensions in the file name. The manual drudgery amounts to creating a text file, copying the html markup from your wiki mockup, saving the file and then zipping all the files - then upload, unzip, and rename each file, deleting txt - yes there are undoubtedly easier ways to do this.....
3) Watch out for things like spaces in your page names! While the wiki itself may handle spaces in the page names just fine, when you create the text file for that page you have a problem. WHile there may be some more elegant solution, simply putting underscores between words in the files works fine, but this means that you also have to do that inside your text files any time you internally reference another wiki page.

And as to html2wiki conversion?

This actually worked better than I had expected, but the obvious cautions must be observed:
4) You must have comparable markup. In testing phpwiki there were issues as well as with a number of others.... I will post the question of comparability among wiki markup syntax separately in the hope that the additional question will draw some attention....
5) Beware of the caveats above, however some conversions will attempt to resolve spaces in the names and other such questions.
6) The results of the conversion is real wiki markup, while the results produced by the process recommended in the prior post (develop wiki mockup and then cut and paste html) produces html interpreted by the wiki module.

WIll this work for student as well as group wikis? It appeared to do just that!

Bottom line: Yes, this appears to be a way to create extensive wiki "templates" that can be rolled out to individual students to provide everything from a senesters reading prompts and journals to laboratory notebooks. Why, you might ask, are details about how to implement this so difficult to find when one might expect that this might be a critical tool in the use of Moodle.... And that indeed is the question....