Creating a Wiki (Collaborative Document) Module

Creating a Wiki (Collaborative Document) Module

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

I am undertaking the task of fitting a Wiki module into Moodle. The group that I will have using Moodle need to be able to work together on documents both as planning operations and as assignments. Wikis seem to be the best web-based choice for this.

Features of Wikis:

  1. Group document creation.
  2. Non-HTML formatting controls.
  3. Automatic document versioning.
  4. Undoing last changes.
  5. Displaying similar pages.
  6. Ability to 'lock' documents.
  7. Ability to set 'read-only' function.
  8. (Any Others?)

Nice To Haves:

  1. Comments on Wiki pages.
  2. Comments on changes (versions).
  3. Attachments.

Software:

  1. PHPWiki
  2. ErfurtWiki
  3. PMWiki

My cursory investigation leads me to believe that ErfurtWiki will be easier to integrate into Moodle than PHPWiki. ErfurtWiki, or ewiki, has been built as a library rather than a stand-alone application. It is OpenSource and has many plug-ins which can be integrated or not.

If anyone has any information that can affect this choice, please post it here.

Some Moodle specific functionality I will look into:

  • Visibility - Can we define a wiki at a global, course and topic level? In other words, can a wiki be limited to a topic such that it will only link to other wikis in that topic. Same with course. An can we make it global so that it can link to all wikis (or, in fact can we prevent this).
  • Any Others?

mike

Average of ratings: -
In reply to Mike Churchward

Re: Creating a Wiki (Collaborative Document) Module

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
I hadn't heard of ErfurtWiki before but after a quick glance I agree it does look like a good starting point.

My brain is too tired to think about the linking issues right now but I look forward to hearing what that usual suspects have to say about it.  big grin


In reply to Mike Churchward

Re: Creating a Wiki (Collaborative Document) Module

by Tom Murdock -
Mike, these sound great.

(usual suspect #3 steps in).

  • Somebody will probably be interested in grading the collaborative documents, so you might keep your idea on the forum code (that is also used in the glossary module) that allows flexible scale assessments (for each version?).
  • I would recommend that we don't create new pages with wiki-style StickWordsTogether formatting. Your module has great potential of being wide-spread and IMHO ThisParticularConvention speaks to webheads more than classrooms. Maybe links don't appear unless the corresponding pages are already created? (Hyperlink/Library/Glossary style?).
  • When you choose the non-html formatting controls, you might want to post them up for some discussion, as folks might want to wrangle over the most sensible formats.
  • Comments are cool (and appropriate), but I wonder whether it might be more useful simply to attach a forum to the document, so that all of the cool functionality of the forums gets sewn onto the end of the wiki page (I've thought about this similarly with the glossary module).

This is a huge project--thanks for jumping into it. A bunch of us would be happy to test the code as it develops.

-Tom



In reply to Tom Murdock

Re: Creating a Wiki (Collaborative Document) Module

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

Since I'm new to Moodle, is there any place you can steer me to find out more about the Forum code? Especially w.r.t. what I would use from it? (or, do I just pore through).

You know, I hated the Wiki convention of creating new pages, but as I used it, it made more sense. It really does inspire free-thinking without boundaries. I'm thinking of having am alernative way to create pages as well - I need it to create one in a course/topic anyway. I cam probably make it WikiPageCreate an option, or something you can turn off if you didn't mean that word to be a Wiki. Most also use another convention as well, like enclosing words in "{{}}" or something.

I'm going to use what comes out-of-the-box for formatting control initially. But as development progresses, we can refine the standards. There are several Wiki formatting schemes, and I need to see if anyone has actually looked at standardizing these.

Attaching a forum works as long as you can do it while your reading.

mike

In reply to Mike Churchward

Re: Creating a Wiki (Collaborative Document) Module

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

Just to let everyone know, I am still working on this piece. I've had to put it aside recently due to other priorities, but I intend to get back to it soon.

mike

In reply to Mike Churchward

Re: Creating a Wiki (Collaborative Document) Module

by Ger Tielemans -
What is the status of your project now?
In reply to Ger Tielemans

Re: Creating a Wiki (Collaborative Document) Module

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

I'm embarassed to say I have not had time to get back to it. It was fourth on my Moodle task list, behind revamping the nav organization, implementing a calendar and implementing a document management system.

I did do the nav re-org. If anyone's interested, I set it up so that every category has a default forum associated with it, just like the home page. It creates a 'special' course that is ignored by the rest of the system and is only used by the categories to control the forum. In this way, each category has an intro, portal page to its categories and courses.

The calendar seems to be coming along so I am waiting to integrate that. And it looks like there may be a viable document management system coming along. So... I will be trying to get back to the wiki by week's end. I just have to support the actual launch of our site this week, by training the teachers and creators and getting them documentation.

But, I will get to it (unless someone else does first).

mike

In reply to Mike Churchward

Re: Creating a Wiki (Collaborative Document) Module

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

I am in the process (again) of integrating ErfurtWiki into Moodle as an activity module. The biggest issue I've come up against is handling multiple wikis.

The basic design of a wiki allows for all wiki pages to access all other wiki pages simply by using their names. Obviously, wikis will have much more value to Moodle if they can be separate structures that only access pages within their own structure. These whole structures can have limited lifetimes (as long as a course runs). As a minimum I can see that we would need to be able to have self-contained wikis by course, group and user. I would like to have them also by category and site.

Unfortunately, ErfurtWiki doesn't support multiple wikis directly. Its based on the basic concept of "one open document".

The good news is that the developers of ErfurtWiki are looking into it to see how much effort it would take to make these changes.

I'll keep you posted.

mike

In reply to Mike Churchward

Re: Creating a Wiki (Collaborative Document) Module

by Michael Schneider -
Ooops, it seems like there is work duplicated. I have an activity-"Wiki"-module with Erfurt-wiki. You can get around the "single" Wiki issue by adding a field to the erfurt-table which distinguishes between the Wikis and interface the DB-Calls...

The attachment should install clean after unpacking it in /mod/ and calling http://yourhost/moodle/admin/ . Copy the language-files in /mod/wiki/lang/en to /lang/en and it should work.

We use this activity over here with no problems, but it is not as tested as it should be and only English is working at the moment, but I did not want to wait any longer if there is a chance that this work is done twice.

If you like this activity, I am more than willing to add features and bring it to a stable state. I am also more than happy if you like to work on it... It's open source, isn't it ?

Happy Hacking and thanks so much for Moodle !
In reply to Michael Schneider

Re: Creating a Wiki (Collaborative Document) Module

by Ger Tielemans -

Nice job, thanks.

  • I did try to change the table on the wikimarkup page and ended up with html?php? spagetti.. I forgot to use the preview button blozend (is there a way to go back to the previous state of a page?)
  • Is the presence of the German Page Wikiwort on purpose?
  • On the Notepad page there is a strange backlink with a ringel-S in it (Spanish? EditarEstaPãgina ?? )

What is the difference between Sandbox and Notepad

In reply to Ger Tielemans

Re: Creating a Wiki (Collaborative Document) Module

by Ger Tielemans -

I replaced the corrupt text with a fresh WikiMarkup page from the dir wiki\ewiki\init-pages\

  • after saving it for the first time it saved correct
  • open it for edit again WITHOUT ANY CHANGE
  • save.... spagetti

Does Moodle interfere? Why not the first time?


I did not realise that ErfurtWiki has not a "previous version of the page" mechanism like Swiki, So you have to stress the importance of the PREVIEW button, because SAVE means that all the old information on the page is lost if you made a big change. 

In reply to Ger Tielemans

Re: Creating a Wiki (Collaborative Document) Module

by Michael Schneider -
Hello Ger,

I hope I can help:
1) Sorry I cannot reproduce this error. Could you send or post an example ?
2) Yes, there is one: try to replace the "wikipage" parameter with the following: wikipage=WikiWort . Multiple language is on my todo-list, if someone likes this activity smile
3) Yes, in this version all the languages get imported and the Spanish page links to NotePad...
4) There is a possibibility to get back to old pages: Try the Link "PageInfo" on bottom right, you can revert to all old versions.
In reply to Michael Schneider

Re: Creating a Wiki (Collaborative Document) Module

by Ger Tielemans -

Great that Fetchback, a big relief, and much easier then in Swiki!!

I think that I near the point that I can say: "farwell Swiki, hello eWiki"


This is what I get when I save (again), it is from the point where the changes happen:
(I run this on windows2000, easyphp1-7, Moodle CVS Moodle 1.2.1 beta (2004032200)

This is my testmachine, I will try it later under Debian Linux, but I think that I wait for Moodle 1.3 before I make all my patches...

HyperLinks

  • just enter a WikiWord inside your text to create a new HyperLink
  • enclose some words in square brackets? to create a HyperLink inside the WikiWikiWeb which is not made up of a valid WikiWord
  • any valid internet address (starting with entry" class="autolink" title="html: http" href="http://127.0.0.1/moodle/mod/glossary/showentry.php?courseid=5&concept=http"xxx"return openpopup('/mod/glossary/showentry.php?courseid=5\&concept=http', 'entry', 'menubar=0,location=0,scrollbars,resizable,width=600,height=450', 0);?) like <a target="entry" class="autolink" title="html: http" href="http://127.0.0.1/moodle/mod/glossary/showentry.php?courseid=5&concept=http"xxx"return openpopup('/mod/glossary/showentry.php?courseid=5\&concept=http', 'entry', 'menubar=0,location=0,scrollbars,resizable,width=600,height=450', 0);">http</a>://www.example.com/ inside the text will be made clickable automagically
  • enclose a www address or a WikiLink inside square brackets [entry" class="autolink" title="html: http" href="http://127.0.0.1/moodle/mod/glossary/showentry.php?courseid=5&concept=http"xxx"return openpopup('/mod/glossary/showentry.php?courseid=5\&concept=http', 'entry', 'menubar=0,location=0,scrollbars,resizable,width=600,height=450', 0);?] and assign it a neat title using quotation marks or the | character
    • [title | <a target="entry" class="autolink" title="html: http" href="http://127.0.0.1/moodle/mod/glossary/showentry.php?courseid=5&concept=http"xxx"return openpopup('/mod/glossary/showentry.php?courseid=5\&concept=http', 'entry', 'menubar=0,location=0,scrollbars,resizable,width=600,height=450', 0);">http</a>://example.com]
    • [WikiWord "title"] or ["title for" WikiLink]
  • if you don't want a WikiWord or a !<a target="entry" class="autolink" title="html: http" href="http://127.0.0.1/moodle/mod/glossary/showentry.php?courseid=5&concept=http"xxx"return openpopup('/mod/glossary/showentry.php?courseid=5\&concept=http', 'entry', 'menubar=0,location=0,scrollbars,resizable,width=600,height=450', 0);">http</a>://www-address (or [anything] inside square brackets) to become a HyperLink then just prepend it with a exclamation mark or a tilde

Tables with |

just enclose things with the dash character
to build a <a target="entry" class="autolink" title="html: Table" href="http://127.0.0.1/moodle/mod/glossary/showentry.php?courseid=5&concept=Table"xxx"return openpopup('/mod/glossary/showentry.php?courseid=5\&concept=Table', 'entry', 'menubar=0,location=0,scrollbars,resizable,width=600,height=450', 0);">table</a> structure
browsers usually leave out the missing cells

Please always put an empty line before and after a <a target="entry" class="autolink" title="html: Table" href="http://127.0.0.1/moodle/mod/glossary/showentry.php?courseid=5&concept=Table"xxx"return openpopup('/mod/glossary/showentry.php?courseid=5\&concept=Table', 'entry', 'menubar=0,location=0,scrollbars,resizable,width=600,height=450', 0);">table</a>, so it stands out from other text in its own paragraph.

Pictures

  • to include an image into a page enclose its absolute www-address in square brackets, like [<a target="entry" class="autolink" title="html: http" href="http://127.0.0.1/moodle/mod/glossary/showentry.php?courseid=5&concept=http"xxx"return openpopup('/mod/glossary/showentry.php?courseid=5\&concept=http', 'entry', 'menubar=0,location=0,scrollbars,resizable,width=600,height=450', 0);">http</a>://www.example.com/pics/image.png]
  • alternatively you could use the ImageUploading function, see EditThisPage

More markup

Please see the page about ExtendedWikiMarkup, if you'd like to know a bit more about available markup.

In reply to Ger Tielemans

Re: Creating a Wiki (Collaborative Document) Module

by Ger Tielemans -

How can I give students a clean eWiki, without all these starting pages?

Do I have to replace the init-pages for a different language? which are not removable? 

In reply to Ger Tielemans

Re: Creating a Wiki (Collaborative Document) Module

by Michael Schneider -
When you create a new wiki, chose "No" in "Fill in default content" and you will get a clean eWiki. (hopefully smile )

In the next version, I will create a system to choose which language and init-content you want to import.
In reply to Michael Schneider

Re: Creating a Wiki (Collaborative Document) Module

by Ger Tielemans -

Great!! works!!

Now another question, refering to your last statement:

If I use it for a portfolio, I want not (always) an empty eWiki.. but a catalog of pages with names (+ descriptions + approval criteria) of products students will have to deliver:

Is it possible to change the choice for yes/no content into a choice from directories, one empty, the others filled with a delivery catalog for a specific schoolyear/schooltype?

I and other Moodlers then can fill the different dirs for our schools or institutes with adapted sets of pages:

These sets could for example be created/preformatted in an empty eWiki and then exported to one of these dirs to have and keep the connections/references?..) 

In reply to Ger Tielemans

Re: Creating a Wiki (Collaborative Document) Module

by Michael Schneider -
I have just implemented something like this (I will upload this version on Sunday). You can create a directory in lang/(LANGUAGE)/help/wiki/initialcontent/ and then you are able to choose the contents of this folder as initial fillings.

I am working at the "Group" issue. I think we should handle this not over the "Wiki-Type" but over the group settings of the activity.

Hope these assumptions work smile...

Thnx a lot for your feedback...
In reply to Michael Schneider

Re: Creating a Wiki (Collaborative Document) Module

by Ger Tielemans -

What do you propose with group issue?

I imagine that I can create several types of wiki in the same course

  • For example in a section with a big assignment I want to place a link to the personal portfolio of a student as a kind of "hint" to think about placing that result in your personal portfolio. If a student clicks on that link he will view HIS portfolio
  • In another section I place a wiki link for collab work. For example when students will work together on a WebQuest and are on the point to start collecting and reshuffeling the results for their final presentation. If a student clicks on that link, he will access the Wiki of his group. (Are you meaning something like this?)
  • I think that placing a link on the personal page for a personal portfolio will then also be easy, isn't it?
In reply to Ger Tielemans

Re: Creating a Wiki (Collaborative Document) Module

by Michael Schneider -
Ah, oky. What do you think about the following Idea:

- A teacher can always edit every wiki in his course
- There are three wiki-types: Teacher, Group, Student (or Course, Group and User: now I think I got that idea, sorry Mike)
The Activity has the Moodle-Group states: "No Groups" "Separate Groups" and "Visible Groups"
- The same initial Content is filled in for all groups

There is now a matrice:

No Groups
Separate Groups
Visible Groups
Teacher
Teacher creates and changes the Wiki. Students can read the contents.
There is a Wiki for every group which just the teacher can change. Every student just sees the wiki of his group.
There is a Wiki for every group which just the teacher can change. The students can see all Wikis, choseable by a Drop-Down box which contains all groups.
Group
Teacher creates and changes the Wiki. Students can read the contents.Students can change and see the Wiki of their own group.
Students can change the Wiki of their own group. They can see all Wikis, choseable by a Drop-Down box which contains all groups.
Individual
Every student sees and can change his own Wiki.
Every student can change his own Wiki, and sees all other Wikis of the students in his group, choseable by a Drop-Down box which contains all students of his group.
Every student can change his own Wiki, and sees all other Wikis, choseable by a Drop-Down box which contains all students.


I am afraid i cannot implement this until Sunday smile... But I will create a stable version for the cvs.
In reply to Michael Schneider

Re: Creating a Wiki (Collaborative Document) Module

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

You're definitely right about the groups thing; it should be handled by the groups setting.

The only think I would change with your matrix is the 'Group / No Groups' setting. That should be what I was previously calling 'course'. In other words, it would be open to all students to edit as well as read.

Also, I would call 'Individual', 'Student' instead, and use the Moodle string for 'Student. (I was wrong with 'user' too).

Sorry, I haven't got back to my changes yet; had work someone was paying me to do (damn smile). I'll put it all together this afternoon (EST) and get it into CVS.

mike

In reply to Mike Churchward

Re: Creating a Wiki (Collaborative Document) Module

by Michael Schneider -
Yes, you are completely right with the 'Group / No Groups' setting and the Student-term. I will incoorperate it.

I am in the process of incoorporating the group-changes, which are fairly major. Maybe it would be better to wait until Tuesday evening or so.

I will ask Martin for a cvs-account.

It is so great working with you, guys ! Thanks a lot for all your ideas and corrections. I hope you are happy with the results.


In reply to Ger Tielemans

Re: Creating a Wiki (Collaborative Document) Module

by Michael Schneider -
I have found the error !!! It's the Glossary... I am gonna repair it ASAP...
In reply to Michael Schneider

Re: Creating a Wiki (Collaborative Document) Module

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

Michael -

Very cool. It seems we did do some overlap, but I think it'll make both versions better (I haven't uploaded mine, yet).

Two problems I had installing yours:

  1. The MySQL.sql file has an extra comma after the 'PRIMARY KEY ('id') statement for the first table, which prevented the table from getting set up. You'll see it between the two parentheses - '),)'
  2. If you set titles to 'on', it initially tells me I'm editing 'mod/wiki/view.php'. This title sticks with the first page from then on.

I like the 'Allow safe HTML' and 'Fill in Default Content' options, not sure about the title one though.

I got around the multi-wikis issue by talking with the Erfurt Wiki developers. They gave me a plug-in (feature/subwiki.php) which allows me to specify a prefix for any wiki. That gives me any level of separation I need. Is that what you are doing with 'ewikimoodlelib.php'?

I believe I can re-apply the multi-wiki code to your 'ewikimoodlelib.php', or should we use the 'feature/subwiki.php' code? (I've attached that file here for your persual).

Another option I put in mine was to specify using the name given to the Wiki activity as the name of the first page. That would probably fix the second problem I had above.

For mine, instead of giving the option 'Allow students to contribute to the Wiki', I created a 'Wiki type' options which could be 'course', 'group' or 'user'. If its is a 'course' type, anyone registered in the course can edit it. If its a 'group', anyone in the group can. If its a 'user', only that user can. For 'course' wikis, every wiki page is prefixed by the course id; if its a group, they're prefixed by the course id and the group id; if its a user, they're prefixed by the course id and the user id.

I was planning on uploading mine tonight or tomorrow, but I'll wait and see if you can solve the problems I had. I think it might be better for me to force fit my changes onto yours. Do you handle multiple wikis in a similar fashion?

mike

In reply to Mike Churchward

Re: Creating a Wiki (Collaborative Document) Module

by Ger Tielemans -

I created two Wikis, and edited them different: they do not see each other as far as I can see...

This course group user switch idea is very powerful!! course and group can be used for collab work, user could be an addition for the personal portfolio for Tom. (is it possible to attach an eWiki with a preset "switched to user, even when he is in another course.."  on the personal profile page, then it is complete!)

If the user links in his personal portfolio a file from a course, that course never can be removed...? (will DMS solve this?)


I have only one big problem: if Moodle keeps developing with the current speed, what is there left to ask for next Xmas?

In reply to Mike Churchward

Re: Creating a Wiki (Collaborative Document) Module

by Michael Schneider -
Thank you very much for your response... I have not seen this thread earlier, an I hope, you did not lose too much time. It would be great if you could integrate your ideas into this Wiki or I could code mine into yours..

I have corrected the "," error. The user, group and course Wiki is way cool and the way to go ! Thanks a lot. I will implement it until Sunday.

The title-problem; I am not sure if I have understood you correct: You do not see "ErfurtWiki" on the first page, you just see this strange "view.php" ? The idea having the Wiki-Name as the first Page is very good, but I am not sure if I can implement it. These pages are read from static pages.
What OS do you use ? We just use Linux with PHP 4.3. I am very sorry, I have no Windows-machine to test it. It would be great if someone could make it portable if it is not.

For the Wiki-Separation: I went a different way. There is a system in EWiki to hook on the database-functions. I translated all database calls to use the ones from the moodle-library, this should make it much more integrated into the system with the advantage, that the ErfurtWiki-code did not change at all. Also on this hook, I added the Wiki separation, and as far as I can see, it seems to work. I am not very fond of the idea replacing this working code, or do you see a special advantage I have overseen ?

BTW: I will set up a website for this one with a download section for new versions if you like.

BTWBTW: Very cool: Glossaries work inside of the Wiki ! Moodle is so great !

Thank you very much for your response. You can change the code however you like, I do not own it and I would like to take your changes also for our Moodle-Site.
In reply to Michael Schneider

Re: Creating a Wiki (Collaborative Document) Module

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

Michael -

No time wasted on my end...

I agree with you on using your database functions. I will add my changes to your system. We'll start from there.

I may need to ask you some questions about how your 'ewikimoodlelib.php' works.

I'm going to create a 'contrib/wiki' directory in the Moodle cvs. I'll upload the system once I've applied my changes. That way, we can work together. smile

mike

In reply to Mike Churchward

Re: Creating a Wiki (Collaborative Document) Module

by Michael Schneider -
I am happy to answer all the questions I can, just ask smile . Shall I dens my changes directly to you, so that you commit them to cvs ?
Do we need something like a bug-tracker ? I could set up one...
In reply to Michael Schneider

Re: Creating a Wiki (Collaborative Document) Module

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

We can probably get you CVS access to the 'contrib' area (where this will be). You just need a SourceForge account and then Martin's blessing.

Moodle has a bugtracker, that I think Martin wants us to use. I think he wants us all to hate ot so that someone will volunteer to enhance it (wink).

mike

In reply to Michael Schneider

Re: Creating a Wiki (Collaborative Document) Module

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

Michael -

I finally ran through your solution - very elegant! I'm not going to use any of my ewiki changes at all; let's stick with yours.

I'll add the Moodle changes I made (wiki_type, wiki_page_name and wiki_summary), but otherwise, we'll use yours as the base.

Did you get a SourceForge id? Have you received access to the Moodle contrib CVS?

mike

In reply to Mike Churchward

Re: Creating a Wiki (Collaborative Document) Module

by Andy Fundinger -
Aha!  Now I know why we did that!

AndyFundinger
In reply to Mike Churchward

Implementing Wiki Types

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

I'm going to release the code, based on Michael Schneider's modifications to Erfurtwiki this weekend. This code should be considered 'in development' for now, and not used on a production system unless you are prepared for potential problems.

For Developers:
To implement the wiki types, I believe we will need another table. With the current implementation, wiki's are differentiated by wiki id's from the wiki table. This id's are specific to a wiki instance added to a course. If we were to set one as a 'student' wiki, we need another level of differentiation. To stay within the Moodle standards, the wiki table should probably remain as holding records for every specific instance of a wiki added to a course. Therefore, we need another level that keeps track of specific wiki structures (per student or per group). Then we need to update Michael's code to use this new identifier.

For now, I have left the 'allowstudentstowiki' field in the database, pending the resolution of the wiki type issue.

Thoughts?

mike

In reply to Mike Churchward

Re: Creating a Wiki (Collaborative Document) Module

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

Released a new version of the wiki module into CVS. This one implements 'teacher' and 'student' wiki types and partially implements 'group' wiki types.

Completely remove any old wiki modules before adding this one.

mike