MOODLE / MediaWiki integration

MOODLE / MediaWiki integration

by Will Taylor -
Number of replies: 67
Am wondering if the partial integration of MediaWiki authenication with MOODLE - as operating in the MOODLE documentation - is available?
I'd be quite interested in this.
- will
Average of ratings: -

Re: MOODLE / MediaWiki integration

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
My plugin for MW is *not* SSO. It gives you no advantage over discrete authentication. It was written, primarily, for the situation where all Moodle users are "manual".

Now then an MNET SSO plugin for MediaWiki.... wink

Re: MOODLE / MediaWiki integration

by Ely Pa -

Hi,

trying with Moodle 1.9.4 and MediaWiki 1.14, I followed the instructions from the install file for the mediawiki_sso module, but I can't get the notification of the new module installation. Would please anyone have suggestions?

Re: MOODLE / MediaWiki integration

by Todd Aiken -
Ack... I checked and double checked those pages... it was right in front of me. Thanks.

I had tried using the Mediawiki LDAP plugin to connect to my AD without any luck, but then today found another tutorial on how to do it, and got it working. Talking to some other people, I'm thinking that it's probably best to keep Moodle and Mediawiki separate, although I'm not upper management will agree. I think the two main reasons they wanted to integrate Mediawiki into Moodle is that we've had so much success with Moodle that they want that success to continue with Mediawiki, and they also wanted to be able to do SSO so that users could log into Moodle and then go right to Mediawiki without having to sign on again... something that I just could not get working with your solution or any others that I tried. Oh well, maybe we'll be able to do something with our AD Federated Services.

Thanks again for your assistance.

Re: MOODLE / MediaWiki integration

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
IIRC, there's an option in the LDAP authentication setup page to permit passwords to be stored locally.

Why not simply get MediaWiki to authenticate against your AD server?

Re: MOODLE / MediaWiki integration

by Todd Aiken -
Thanks Howard. I was able to install it on my test server this morning and it works... sort of.

My problem is that I am using Active Directory for Moodle authentication, and import all my users via the cron script. If I try to login to Mediawiki as my local Moodle administrator, it works fine. But if I try to login using any of my AD users account credentials, I get an invalid password error. I believe this is because the password for these users is not stored locally in the mdl_user table where your extension is checking... just wondering if there is a way I can get this field populated whenever someone logs in to Moodle successfully?

Re: MOODLE / MediaWiki integration

by Don Hinkelman -
Picture of Particularly helpful Moodlers Picture of Plugin developers
Thank you, Howard. I am eager to try it. The reasons I like Mediawiki over nWiki are:
  • forced, consistant formatting (we want a public wiki with common formats)
  • external wiki that all parts of the non-Moodle-using university can use
  • familiarity--I have used mediawiki on Moodle Docs now for several years

Re: MOODLE / MediaWiki integration

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Dug....

Caveat: this works or did work on version 1.13.something (1.9 Moodle). The client no longer uses it and I don't remember much about it to be honest. The bit from LocalSettings.php is as follows...

# setup for AuthMoodle...
# require_once( 'extensions/moodle.php' );
# $wgAuth = new AuthMoodle();
# $wgAuth->setPrefix('mdl_');
# $wgAuth->setHost('localhost');
# $wgAuth->setDatabase('moodle');
# $wgAuth->setDbuser('moodleuser');
# $wgAuth->setDbpassword('moodlepassword');

...obviously, change to reflect your Moodle db.

The script for extensions/moodle.php is attached. Now I've found it I'll probably stick it in contrib when I get a mo.

Re: MOODLE / MediaWiki integration

by Todd Aiken -
Yes, please dig, as I'm looking to do this at my site as well, and not having much luck. Using Moodle 1.9.4+ and MediaWiki 1.14.0.

Re: MOODLE / MediaWiki integration

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I wrote something to do it that more or less worked. Now I can't find it. It's reminded me to go and have a dig!!

Re: MOODLE / MediaWiki integration

by Fr de Thysebaert -

Hi

I come back to this topic.

Is this integration runing with Moodle 1.9.4+ and last version of mediaWiki ?

thanks

This forum post has been removed

The content of this forum post has been removed and can no longer be accessed.

This forum post has been removed

The content of this forum post has been removed and can no longer be accessed.

Svar: Re: MOODLE / MediaWiki integration

by Magnus Eriksson -

Hi,

Would a MediaWiki installation be possible on the moodle.org demo server?

Why have moodle chosen to use Nwiki instead of MediaWiki? Both Moodle and Mediawiki are based on Apache, PHP and mySQL.

Kindly,
Magnus

Re: MOODLE / MediaWiki integration

by Chris Waters -

Hi Howard

Any chance I can get the plugin/docs you mention?

Does it only work for MW 1.12? I'm using 1.13

Thanks

Re: MOODLE / MediaWiki integration

by Bryn Jones -

Hello Howard,

I've just read your post and I'm very interested to see your integration method for Moodle and MediaWiki.

Could you please supply the code and / or details (I'm a php developer).

Best Regards,

Bryn.

Re: MOODLE / MediaWiki integration

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
If anybody's interested... I have rattled together (about 30 minutes - so you can guess the quality) a plugin to do this that works.

Moodle 1.9.3, MediaWiki 1.12, MySQL only.

With a bit more testing in the live, I'll put it in contrib and modify the docs.

Re: MOODLE / MediaWiki integration

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I agree... I tried with Moodle 1.9.3 and MediaWiki 1.13 and no joy.

I suppose I need to fix it sad

Odp: Re: MOODLE / MediaWiki integration

by Arkadiusz Wszołek -
Filipe this Module doesn't work. I work over him very long. I installed moodle and mediawiki on base mysql and postgresql and errors are all the time. I have other problem than You, but in README is written to use Moodle v1.7and Mediawiki 1.9. You use Moodle 2.0 and MediaWiki 1.12.

My errors:

Warning: pg_query(): supplied argument is not a valid PostgreSQL link resource in /usr/local/apache2/htdocs/mediawiki/includes/DatabasePostgres.php on line 389

Warning: pg_last_error() [function.pg-last-error]: No PostgreSQL link opened yet in /usr/local/apache2/htdocs/mediawiki/includes/DatabasePostgres.php on line 450

Warning: pg_last_error() [function.pg-last-error]: No PostgreSQL link opened yet in /usr/local/apache2/htdocs/mediawiki/includes/DatabasePostgres.php on line 450

Warning: pg_last_error() [function.pg-last-error]: No PostgreSQL link opened yet in /usr/local/apache2/htdocs/mediawiki/includes/DatabasePostgres.php on line 450

Internal error

A database error has occurred Query: SELECT username,firstname,lastname,email,id FROM mdl_user WHERE username='admin' LIMIT 1 Function: AuthMoodle::verify_moodle_cookie Error: 0 No database connection

Backtrace:

#0 /usr/local/apache2/htdocs/mediawiki/includes/Database.php(665): DatabasePostgres->reportQueryError('No database con...', 0, 'SELECT usernam...', 'AuthMoodle::ver...', false)
#1 /usr/local/apache2/htdocs/mediawiki/includes/Database.php(1057): Database->query('SELECT usernam...', 'AuthMoodle::ver...')
#2 /usr/local/apache2/htdocs/mediawiki/includes/Database.php(1076): Database->select('mdl_user', Array, 'username='admin...', 'AuthMoodle::ver...', Array)
#3 /usr/local/apache2/htdocs/mediawiki/extensions/AuthMoodle.php(405): Database->selectRow('mdl_user', Array, 'username='admin...', 'AuthMoodle::ver...')
#4 /usr/local/apache2/htdocs/mediawiki/extensions/AuthMoodle.php(468): AuthMoodle->verify_moodle_cookie()
#5 [internal function]: AuthMoodle_autologin()
#6 /usr/local/apache2/htdocs/mediawiki/includes/Setup.php(219): call_user_func('AuthMoodle_auto...')
#7 /usr/local/apache2/htdocs/mediawiki/includes/WebStart.php(90): require_once('/usr/local/apac...')
#8 /usr/local/apache2/htdocs/mediawiki/index.php(4): require_once('/usr/local/apac...')
#9 {main}

best regards
Arcadius

Re: MOODLE / MediaWiki integration

by Filipe Carneiro -
I'm using Moodle 2.0 and MediaWiki 1.12.
I made all the changes described on article http://docs.moodle.org/en/AuthMoodle and get this Internal Error:

"Ocorreu um erro externo à base de dados durante a autenticação ou não lhe é permitido actualizar a sua conta externa."
(can't update your external account)

Backtrace:

#0 C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\docs\includes\SpecialUserlogin.php(338): User->setPassword('aluno')
#1 C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\docs\includes\SpecialUserlogin.php(384): LoginForm->initUser(Object(User), true)
#2 C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\docs\includes\SpecialUserlogin.php(447): LoginForm->authenticateUserData()
#3 C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\docs\includes\SpecialUserlogin.php(100): LoginForm->processLogin()
#4 C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\docs\includes\SpecialUserlogin.php(17): LoginForm->execute()
#5 [internal function]: wfSpecialUserlogin(NULL, Object(SpecialPage))
#6 C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\docs\includes\SpecialPage.php(678): call_user_func('wfSpecialUserlo...', NULL, Object(SpecialPage))
#7 C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\docs\includes\SpecialPage.php(464): SpecialPage->execute(NULL)
#8 C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\docs\includes\Wiki.php(193): SpecialPage::executePath(Object(Title))
#9 C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\docs\includes\Wiki.php(45): MediaWiki->initializeSpecialCases(Object(Title), Object(OutputPage), Object(WebRequest))
#10 C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\docs\index.php(90): MediaWiki->initialize(Object(Title), Object(OutputPage), Object(User), Object(WebRequest))
#11 {main}



Please Help




Re: Odp: Re: MOODLE / MediaWiki integration

by Luke Hudson -
Hi there -- which moodle version are you trying to apply the patch to?
If you tell me the release and version (from version.php), I can possibly send you an updated patch file.

Cheers
- Luke

Re: MOODLE / MediaWiki integration

by Luke Hudson -
Here's the latest code (attached), but I'm afraid this is still somewhat neglected. I originally wrote it for a client's site, which is no longer running.

I'm adding this to the Moodle modules and plugins database, and hopefully someone has time to update this plugin to the latest Moodle and Mediawiki, as it still seems a popular request.

Cheers
- Luke

Odp: Re: MOODLE / MediaWiki integration

by Arkadiusz Wszołek -
Hi all.
I have problem with patch when I instal Single Sign-on.
During puttings patch jumps out me error.

Hunk #1 FAILED at 1
The rest overlapped without problem. I enclose drop from putting patch.
Writing first line alone to file moodlelib.php i.e. adding variable require_once $CFG->dirroot.' /sso/mediawiki/lib. php';
which this she is not added to this of file, services in spite of this don't work well.
Before putting patch-a services moodle and mediawiki worked good.
Someone who can help?
Best regards.
Arek
Attachment patch.JPG

Re: MOODLE / MediaWiki integration

by Jack Eapen -
Hi All,

I have a silly doubt. sorry for it. i'm trying to implement single sign-on to my Moodle and Mediawiki. I enabled the extension in MW; patched moodlelib.php and copied the files to moodle/SSO.

I login to Moodle. Now what should I do? should i provide some link from Moodle to Mediawiki? How do I share the cookie?

after logging into Moodle, if i open mediawiki site and click login, i'm getting a "page not found" error for /index.php?title=Special:UserLogin

plz help

Jack eapen

Re: Moodle / MediaWiki integration

by Sigurdur Jonsson -
I'm having problem with this intergration code, or to be exact the one found in http://docs.moodle.org/en/AuthMoodle.

I keep getting this error:
from within function "AuthMoodle::authenticate". MySQL returned error "1146: Table 'xxx.xxx_mdl_user' doesn't exist (localhost)".

I'm using FreeBSD and MySQL 5.0.45. Could anyone give me a hint as to what could be causing this. The table is certainly there.

regards,
S.Fjalar

Ang: Re: MOODLE / MediaWiki integration

by Jens Gammelgaard -
Picture of Translators
Hi,

I've tried Lukes snippets and guidelines.

And it seems not to work with MediaWiki 1.10 and Moodle 1.81+

NB: It is including implementing thise changes:

http://docs.moodle.org/en/AuthMoodle

Can anyone reveal full code to make the authentication and SSO work between these 2 - in the versions mentioned above??

Thanks!

Re: MOODLE / MediaWiki integration

by J m -
Has anyone come up with anything new on this?  Can we use mediawiki with moodle?  thanks

Re: MOODLE / MediaWiki integration

by Luke Hudson -
Hi there, I've put together a patch for Moodle+Mediawiki Single-sign-on integration. It currently requires that both installations reside on a single server, but it supports transparent integration of the two sites.

The mediawiki side is based on Martin D.'s AuthMoodle.php extension, but goes a little further to provide auto-login.

This integration is based on Mediawiki 1.9 and Moodle 1.7, but it shouldn't be too hard to backport it to other versions.

Here it is attached, with some documentation inside the archive. Do let me know where else I should put it on Moodle.org as I still don't know my way around the site very well.

Cheers,
-- Luke Hudson

Re: MOODLE / MediaWiki integration

by Alastair Hole -
Hi All,
Thought this would be the best place to mention it, I've just hacked together the LDAP login script and the REMOTE_USER auth script for MediaWiki.

In good old English, this means you can have transparent windows authentication (NTLM) against Active Directory, similar in function to Dan Marsden's auth_ntlm module for Moodle.
http://meta.wikimedia.org/wiki/LdapNtlmAuthentication.php

It is still a bit of a hack at the moment, should work for most setups. Let me know if you want any further details.

Re: MOODLE / MediaWiki integration

by Bartłomiej Polakowski -
Hi Im new here.
Im very interested in integrating Moodle with MediaWiki. I search for some information on this forum but it looks that it is not possible now. Hovewer I would like to add at least this authorization ability which aru U talking about. Im absolut beginner and dont know how to do it. Are there any instuctions?
Thanx for answers

Re: MOODLE / MediaWiki integration

by Adam Brown -
Hi,
Thanks for your reply. I saw the option you mention, and gave it a try, but for some reason moodle studiously ignored the mw user database completely!

Also, the options available for password encryption go as far as md5. MW seems to use a password that is md5 hashed and then md5 hashed again using the user's UID as the seed (this is off the top of my head, so might not be accurate). Will moodle's md5 option be enough?

Cheers,

Adam

Re: MOODLE / MediaWiki integration

by Alexandre Belousov -
You may use the "Authentificate from external database" in moodle options. That means you'll have only MW-user database.
Is that you were searching for?

Re: MOODLE / MediaWiki integration

by Alexandre Belousov -
Actually when you delete user from MOODLE via admin interface, the user record is NOT deleted from the database (I suppose this is done to preserve logs, assignments etc. and not to mess up existing stats). There's a "deleted" field in the mdl_user database, and the value "1" is assigned to it when you delete somebody.

As the auth plugin for mediawiki checks only the presence of user (i.e. "username" field) in the mdl_user db and coincidence of password entered to the db-hash, it pays no attention to the state of the "deleted" field, so the user deleted from moodle may successfully login into the associated mediawiki.

Imho, that's the explanation smile

Why one or the other?

by Mark Penny -
I use MediaWiki for several sites and nwiki in Moodle. I like both, but they are different and Ludo's comments are correct: MediaWiki has its limitations. In fact, I wish MediaWiki would take a few cues from nwiki and allow users and administrators more options in terms of control.

I'll go even further and say that I'd like to see a standalone version of nwiki that I could use to run a site. How's that for an endorsement?

Re: MOODLE / MediaWiki integration

by Adam Brown -
Evening all,
I was wondering if anyone has approached the Moodle/MW integration issue from the other side:

I am an administrator for a MW-based website (http://ganfyd.org) and would like to integrate moodle into this somehow.
Ideally we'd like to use the user info from the MW database and use the MW cookie to validate a user's Moodle session.

Anyone have any thoughts on this?

Cheers,

Adam

PS: I should add that we use our own user registration system (quick and dirty SQL table inserts after a bit of email validation), so it wouldnt be a problem adding the extra info that Moodle likes (such as location) to this registration, though obviously existing users would not have this info filled in so would need to be able to go back and add it at a later date.

Re: MOODLE / MediaWiki integration

by Stuardo Herrera -

Thank you very much Alexandre, already fixed it. But now I have another question. I have noticed that when a user is erased from Moodle, it still stays on MediaWiki's database. Is there a way to automatically erase them from both when a user is erased from Moodle?  

Re: MOODLE / MediaWiki integration

by Stuardo Herrera -
I'm trying to do this integration, but when a user tries to log in, I get the following Fatal error: Call to undefined method User::newFromRealName() in C:\xxxxxxx\mediawiki\extensions\AuthMoodle.php on line 223
Does anyone has an idea how can I solve this? Thanx!

Re: MOODLE / MediaWiki integration

by Ludo (Marc Alier) -
Revisiting this thread I'd like to point that we should look at it at the oposite side:
Mediawiki is very robust but is not intended as a educational wiki, in the sense that it does not fit tnto courses, nor suport groups, or evaluation or lots of other things that even the standard moodle wiki does. Just for starters the HTML editor option that most students prefer when given the option (dfwiki allows to choose format every time you create a page).
and Mediawiki does not have an impoprt format ( lats time I checked one year ago) it works out of sql dumps of the mysql database...
So I strongly beliebe that we should focus in IMPORTING FROM mediawiki not likewise.

Re: MOODLE / MediaWiki integration

by Mark Schumann -
Would you have any idea how to integrate a staff-only section on a MediaWiki integration?  One of the possibilities I'm looking at is a staff documentation wiki which authenticates against the Moodle database, of course only if they have teacher privileges.

Re: MOODLE / MediaWiki integration

by Robert Barnebeck -
Hello Will,

could you please explain how you realized in mediawiki the user authentification by using an other database? I installed a Mediawiki and searched for such preferences, but I didn´t find them.

Robert

Re: MOODLE / MediaWiki integration

by Will Taylor -
You can set up user read and edit permission in MediaWiki any way you wish.  I've set up mine with world-wide read privileges, and registered-users edit privileges.  Registered users are authenticated from the MOODLE users database; so anyone registered on the MOODLE site can login to MediaWiki with their Moodle username/password and edit away.  Though it's a separate login, the login data is inherited from MOODLE, so there is no need to set up a separate MediaWiki profile.

If your'e looking to muckle together a mess of platforms, this can get more than a little messy.  re links and forums, I run several sites & have been totally happy with the built-in functions in MOODLE.  These may work in ways that differ from the platforms you may be used to using, but you may find that after getting used to them, they really do accomplish what you need.

Another solution that might work if you REALLY feel the need to step outside of Moodle for some functions, is to use the MOODLE integration with PostNuke (or Mambo/Joomla).  This would allow you to pull in the functionalities of the PostNuke platform, with a single login to the integration.

Re: MOODLE / MediaWiki integration

by Eliyahu Mitterhoff -
"without needing to create a separate account on MediaWiki"
  1. If they wanted to can they create an account on mediawiki or is it locked?
  2. If they can create an account I assume it must be with the same user name and password, correct?
  3. If they dont create an account does it mean they have less functionality in media wiki.
This whole issue is stating to make me a little crazy I have 4 programs that need to work together, groupee forums, gossamer links, moodle and mediawiki. Google offers a API which I set up with gossamer links. But now I need to add the other two programs into the equation and I dont want my site to feel like an amusement park. A professional image is very important to me and I need tight integration.
  1. Should I use the groupee API for all the other programs?
  2. Will mediawiki and moodle require profiles?
  3. Is there a better solution for integrating php programs?


Re: MOODLE / MediaWiki integration

by Will Taylor -
For this purpose, I don't see any downsides.  I have MediaWiki integrated now with Moodle versions 1.5.3 and 1.6, very easy to set up.  Users need to log in separately to MediaWiki to edit, but they are authenticated off the Moodle database, so use the same username & password without needing to create a separate account on MediaWiki.  Using the MediaWiki permissions system, I have editing privileges reserved for registered, logged-in users, and read privileges open to the world - but you could configure this in many ways if you wish.  Check out the various projects created in MediaWiki (WikiPedia, Wiktionary, &c.) to see the potential of this platform.  If you're creating a site-specific, rather than a course-specific Wiki, it seems the way to go at this point.
Average of ratings: Useful (1)

Re: MOODLE / MediaWiki integration

by Ludo (Marc Alier) -
Hi Timothy,
I've proposed this project for the google summer of code.

"integration of moodle wiki and mediawiki ...
The main idea is to work in two lines :
- improve (df)wiki parser to meet current mediawiki markup dialect. ( I allready have the discussions implemented comming this week in dfwiki and two weeks in new wiki)
- import export tool ... to allow new wiki to import mediawiki backups ... and export in mediawiki format (last time I looked they are mysqldumps, so will be easy)"

http://moodle.org/mod/forum/discuss.php?d=43938

Regards
Ludo

Re: MOODLE / MediaWiki integration

by Ludo (Marc Alier) -
Hi,
if you need just one big wiki as MoodleDocs use mediawiki, but if you need to integrate wiki as a moodle course activity you should try dfwiki or even better the new wiki module (to download in dfwiki home page). Regards
Ludo

Re: MOODLE / MediaWiki integration

by Eliyahu Mitterhoff -
Thank you. I want my commmunity to build a encylopedia. I do not need to structure a course around a Wiki. My main concern is not loosing anything in the version upgrades. Which wiki would you recomend?

Re: MOODLE / MediaWiki integration

by Will Taylor -
See this thread:
http://moodle.org/mod/forum/discuss.php?d=44205

I'm using MediaWiki for a project alongside MOODLE, that requires authentication off the MOODLE users database for editing privileges.  Similar to what MoodleDocs is doing for Moodle.org.  This is intended to be a world-readable "wikipedia"-like project and portal, edited/maintained by my moodle-registered user community.  It's linked from my MOODLE site, but is not a course resource.

I have both the dfWiki and the built-in Moodle Wiki modules (& am playing with the new "Wiki" wiki in beta from the dfWiki folks) available for use as course resources on my sites; either or both can be added as a course resource by instructors.  I'd suggest installing them both, playing with them a bit, & seeing which suites your purpose(s) better.  The Wiki module included with the standard MOODLE package is very simple (=sometimes the best choice, depending on what is needed).  dfWiki offers many more features, & the dfWiki course format - which structures a course around a Wiki - is a very nice feature, if this is what you need.

will taylor
moodle-master at the National College of Naturopathic Medicine
Portland, Oregon/US

Re: MOODLE / MediaWiki integration

by Eliyahu Mitterhoff -
Which wiki should I use? I am about to launch a moodle site and wiki is going to be a big part of it. I see that even though moodle has a built-in wiki http://docs.moodle.org/ was built with mediwiki! So which wiki willit beee?

1. DFWiki?
2. Built-in wiki?
3. Mediwiki?

Whcih one should I use and what are the advantages of each?

Re: Moodle / MediaWiki integration

by Will Taylor -
Thanks for this Jos, I'd just gotten around to setting my installation up, and ran into the same problem - came here to ask what to do & found your work-around waiting.  This is working nicely for me.

Martin et.al., would it be possible to share the hacks for your full name mod?

Re: Moodle / MediaWiki integration

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
Sorry about that, our Moodle Docs wiki is slightly modified from a standard MediaWiki codebase to use the full Moodle names as the Wiki user name. Your changes to workaround those calls sounds fine.

Re: MOODLE / MediaWiki integration

by Timothy Takemoto -

Dear Lior

I do like MediaWiki and use it for a homepage but....

I think it would be sad if "the future" of the Moodle wiki were MediaWiki. It is my understanding that DFWiki is designed to be Mediawiki and more. DFwiki is intended to offer both a conventional Moodle/moodle wiki interface, and a Mediawiki alike interface. And while robustness may be an issue now, hopefully that will not be an issue very soon.  

As far as I know, MediaWiki has quite a lot of drawbacks when it comes to setting privelidges, made as it is for maximising cooperation.

DFWiki is planning to satisfy educational requirements that no wiki has satisfied before.

Tim

Average of ratings: Useful (1)

Re: Moodle / MediaWiki integration

by Jos Winkel -

Martin or Eloy,
I am very pleased with the partial integration of MediaWiki authentication with MOODLE but can you please have one more glance at the AuthMoodle.php file and respond to the changes I made in it as written in de forumpost above?
In AuthMoodle.php there are items (line89: mDBconn and line 223: newFromRealName) unknown to my configuration and give Notices and a Fatal Error. I changed them and it seems to work but I am quite unsure about my changes.
Thanks, Jos

Re: Moodle / MediaWiki integration

by Jos Winkel -

I had the same Fatal Error (cannot find function newFromRealName) and two Notices (mDBconn unknown) concerning line 89.

I changed the two lines as below and it seems working now. But I am totally unsure about if these are proper changes.

line 89:
if(! is_object($this->mAuthMoodleDBconn) ) {   //original: if(! is_object($this->mDBconn) ) {

line 223:
while ($user->setRealName($completerealname)) {   //original: while ($user->newFromRealName($completerealname)) {

Someone who can help?

Re: Moodle / MediaWiki integration

by Mark Schumann -
Did you make sure to enter in the correct table prefix?  In my case it was mdl_ (remember the _) .  The problem I'm now getting is this:

Fatal error: Call to undefined method User::newFromRealName() in /home/moodle/moodle/wiki/extensions/AuthMoodle.php on line 223

Any ideas?

Re: Moodle / MediaWiki integration

by Ger Tielemans -

Must I remove/change other parts in settings when I put this in place?

What is this bb_ prefix?

I get now this : (where coop is my moodle database)


Error in numRows(): Table 'coop.coop_mdl_user' doesn't exist

Backtrace:

  • GlobalFunctions.php line 450 calls wfbacktrace()
  • Database.php line 543 calls wfdebugdiebacktrace()
  • Database.php line 646 calls databasemysql::numrows()
  • LinkCache.php line 162 calls databasemysql::selectfield()
  • Title.php line 1150 calls linkcache::addlinkobj()
  • Skin.php line 1289 calls title::getarticleid()
  • SkinTemplate.php line 182 calls skinmonobook::makeurldetails()
  • OutputPage.php line 467 calls skinmonobook::outputpage()
  • OutputPage.php line 680 calls outputpage::output()
  • Database.php line 400 calls outputpage::databaseerror()
  • Database.php line 347 calls database::reportqueryerror()
  • Database.php line 723 calls database::query()
  • Database.php line 742 calls database::select()
  • AuthMoodle.php line 121 calls database::selectrow()
  • SpecialUserlogin.php line 299 calls authmoodle::userexists()
  • SpecialUserlogin.php line 90 calls loginform::processlogin()
  • SpecialUserlogin.php line 19 calls loginform::execute()
  • SpecialPage.php line 382 calls wfspecialuserlogin()
  • SpecialPage.php line 265 calls specialpage::execute()
  • index.php line 142 calls specialpage::executepath()

Re: Moodle / MediaWiki integration

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
Sure! Here it is attached. Save it in extensions/AuthMoodle.php.

Then you just put this in LocalSettings.php:

require_once( 'extensions/AuthMoodle.php' );
$wgAuth = new AuthMoodle();
$wgAuth->setAuthMoodleTablePrefix('');
$wgAuth->setAuthMoodleDBServer('yoursite.org');
$wgAuth->setAuthMoodleDBName('yourdb');
$wgAuth->setAuthMoodleUser('yourdbuser');
$wgAuth->setAuthMoodlePassword('yourdbpass');


We made a number of other small hacks to make MediaWiki look nicer but that's all you need to get this authentication working.

Re: Moodle / MediaWiki integration

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi,

Thanks goes to Martin for the Moodle Docs authentication against moodle.org. approve Please check bug 4666 for some useful links plus our initial discussions, and Moodle Docs Authentication for additional information.

We also decided that, since moodle.org displays users' full names, then Moodle Docs should do the same. Thanks goes to Eloy for lots of small hacks (e.g. bug 4808, bug 4862, bug 4864). approve

I assume that Martin and Eloy would be willing to make their code available if anyone wants it.

Re: MOODLE / MediaWiki integration

by Mark Schumann -
I'd also love to see this integration.  I'm looking at providing a bunch of student and staff resources in wiki format (trying to decentralise the whole intranet process) and would love to use mediawiki.  What I'd need is a way to identify whether I can hide pages that should only be available to staff, etc.

Re: MOODLE / MediaWiki integration

by Lamar James -

I'm looking into it, too. MediaWiki is much more robust than the standard Moodle and DF Wikis, and users are very familiar with its tools and UI, mostly because it's used by Wikipedia.

While it may take a while to integrate MediaWiki with Moodle, one important aspect to keep in mind is the transferabilty of content - ensuring that content currently developed with the standard or DF wikis, will be able to be exported in the future to MediaWiki.