Re: MOODLE / MediaWiki integration
Now then an MNET SSO plugin for MediaWiki....
Re: MOODLE / MediaWiki integration
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
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
Why not simply get MediaWiki to authenticate against your AD server?
Re: MOODLE / MediaWiki integration
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
- 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
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
Re: MOODLE / MediaWiki integration
Re: MOODLE / MediaWiki integration
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
This forum post has been removed
Svar: Re: MOODLE / MediaWiki integration
Re: MOODLE / MediaWiki integration
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
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
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
I suppose I need to fix it
Odp: Re: MOODLE / MediaWiki integration
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
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: MOODLE / MediaWiki integration
Odp: Re: Odp: Re: MOODLE / MediaWiki integration
I use moodle version : Legacy 1.7 Stable Build Moodle 1.7.4+ MOODLE_17_WEEKLY,
and php version 5.1.6, here are informations about php:
http://bydgoszcz.serwery.pl/moodle/info.php
Best regards
Arek
Re: Odp: Re: MOODLE / MediaWiki integration
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
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
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
Re: MOODLE / MediaWiki integration
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
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
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
Re: MOODLE / MediaWiki integration
Thanks for your Moodle/MediaWiki integration code.
Regarding where to put it, perhaps you could add it to the Modules and plugins database, update the page docs.moodle.org/en/AuthMoodle, and mention it on the page docs.moodle.org/en/Integrations.
Re: MOODLE / MediaWiki integration
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
http://meta.wikimedia.org/wiki/User_talk:Ryan_lane
Re: MOODLE / MediaWiki integration
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
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
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
Is that you were searching for?
Re: MOODLE / MediaWiki integration
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
Why one or the other?
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
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
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
Re: MOODLE / MediaWiki integration
Does anyone has an idea how can I solve this? Thanx!
Re: MOODLE / MediaWiki integration
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
Re: MOODLE / MediaWiki integration
Re: MOODLE / MediaWiki integration
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
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
- If they wanted to can they create an account on mediawiki or is it locked?
- If they can create an account I assume it must be with the same user name and password, correct?
- If they dont create an account does it mean they have less functionality in media wiki.
- Should I use the groupee API for all the other programs?
- Will mediawiki and moodle require profiles?
- Is there a better solution for integrating php programs?
Re: MOODLE / MediaWiki integration
Re: MOODLE / MediaWiki integration
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
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
Re: MOODLE / MediaWiki integration
Re: MOODLE / MediaWiki integration
Re: MOODLE / MediaWiki integration
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
1. DFWiki?
2. Built-in wiki?
3. Mediwiki?
Whcih one should I use and what are the advantages of each?
Re: Moodle / MediaWiki integration
Martin et.al., would it be possible to share the hacks for your full name mod?
Re: Moodle / MediaWiki integration
Re: MOODLE / MediaWiki integration
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
Re: Moodle / MediaWiki integration
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
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
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
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
- will
Re: Moodle / MediaWiki integration
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
Thanks goes to Martin for the Moodle Docs authentication against moodle.org. 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).
I assume that Martin and Eloy would be willing to make their code available if anyone wants it.
Re: MOODLE / MediaWiki integration
Re: MOODLE / MediaWiki integration
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.